/* ─── tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:      #f8f6f3;
  --surface: #ffffff;
  --fg:      #1c1a18;
  --muted:   #8a8682;
  --border:  #efedea;
  --accent:  #ff5a5f;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-glow: color-mix(in srgb, var(--accent) 6%, transparent);
  --green:   #34c759;
  --green-soft: color-mix(in srgb, var(--green) 10%, transparent);
  --warn:    #ff9500;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-glow: 0 0 20px rgba(255,90,95,0.15);
  --font-body:  -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono:  ui-monospace, 'SF Mono', Menlo, monospace;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --bottom-nav: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  height: 100%;
}
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: auto;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: '';
  display: block;
  height: 1px;
  pointer-events: none;
}
img { display: block; max-width: 100%; }
img[src=""], img:not([src]) { display: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; padding: 0; }
input { font: inherit; border: 0; outline: none; }
p { margin: 0; }

/* ─── screen container (SPA) ───────────────────────────────────────── */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.25s ease; background: var(--bg); flex: 1; min-height: 0; overflow-y: auto; padding-bottom: var(--bottom-nav); box-sizing: border-box; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 767px) {
  .screen.active { scrollbar-width: none; }
  .screen.active::-webkit-scrollbar { display: none; }
  .admin-html, .admin-html * { scrollbar-width: none; }
  .admin-html::-webkit-scrollbar,
  .admin-html *::-webkit-scrollbar { display: none; }
}

@media (min-width: 768px) {
  body {
    display: flex;
    justify-content: center;
    background: #d0ccc6;
    padding-bottom: 0;
  }
  #app-shell {
    width: 100%;
    max-width: 640px;
  }
  .screen.active {
    max-width: 640px;
    padding-bottom: var(--bottom-nav);
  }
  .bottom-bar {
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%);
    width: 100%;
    max-width: 640px;
  }
}

/* ─── top header ────────────────────────────────────────────────────── */
#app-shell { height: 100%; display: flex; flex-direction: column; }
.app-header {
  flex-shrink: 0;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}
.app-header .logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-header .logo svg, .app-header .logo .header-logo-img { width: 28px; height: 28px; }
.app-header .logo .header-logo-img { border-radius: 50%; object-fit: cover; }
.app-header .back-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
  border: none;
  cursor: pointer;
}
.app-header .back-btn:active { background: var(--border); }
.app-header .admin-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: transparent;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-left: auto;
  cursor: pointer;
  transition: background 0.15s;
  border: none;
  color: var(--muted);
}
.app-header .admin-btn:hover { background: var(--bg); }
.app-header .admin-btn svg { width: 20px; height: 20px; }

/* ─── store profile (logo, desc, social) ───────────────────────────── */
.store-banner {
  width: 100%;
  padding: 0 16px;
  margin: 16px 0;
}
.store-banner .banner-img {
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: cover;
  border-radius: 12px;
}
.social-btn svg { width: 20px; height: 20px; }

/* ─── search ────────────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  margin: 12px 16px;
}
.search-wrap input {
  width: 100%;
  padding: 13px 16px 13px 44px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-sm);
}
.search-wrap .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
  pointer-events: none;
}
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 4px;
  z-index: 30;
  display: none;
  overflow: hidden;
}
.search-suggestions.show { display: block; }
.search-suggestions div {
  padding: 12px 16px;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.1s;
}
.search-suggestions div:last-child { border-bottom: 0; }
.search-suggestions div:active { background: var(--accent-soft); }

/* ─── categories ────────────────────────────────────────────────────── */
.section-title {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  padding: 0 16px;
  margin: 20px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title .see-all {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
}
.cat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}
.cat-card {
  position: relative;
  height: 150px;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-end;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.15s;
  cursor: pointer;
  padding: 0;
  background: linear-gradient(135deg, #cdc9c4, #9a9692);
  background-size: cover;
  background-position: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.cat-card:active {
  transform: scale(0.96);
}
.cat-card .cat-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  letter-spacing: -0.01em;
  padding: 14px 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.55));
}
/* ─── product card ──────────────────────────────────────────────────── */
.prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 0 16px;
}
.prod-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
.prod-card:active {
  transform: scale(0.97);
}
.prod-card .prod-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--border), var(--bg));
  position: relative;
  display: grid;
  place-items: center;
  font-size: 40px;
}
.prod-card .prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prod-card .prod-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: -0.02em;
  box-shadow: var(--shadow-glow);
}
.prod-card .prod-info {
  padding: 10px 12px 14px;
}
.prod-card .prod-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.prod-card .prod-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.prod-card .prod-old-price {
  font-size: 12px;
  color: var(--muted);
  text-decoration: line-through;
}
.prod-card .prod-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent);
}
.prod-card .prod-installments {
  font-size: 11px;
  color: var(--muted);
  width: 100;
  margin-top: 2px;
}

/* ─── product detail ────────────────────────────────────────────────── */
.prod-detail {
  padding: 0 16px 20px;
}
.prod-gallery {
  position: relative;
  margin: 0 -16px 16px;
}
.prod-gallery .main-img {
  width: 100%;
  aspect-ratio: 1;
  background: linear-gradient(135deg, var(--border), var(--bg));
  display: grid;
  place-items: center;
  overflow: hidden;
}
.prod-gallery .main-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.prod-gallery .badge-lg {
  position: absolute;
  top: 12px;
  left: 16px;
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 8px;
  box-shadow: var(--shadow-glow);
}
.prod-thumbs {
  display: flex;
  gap: 6px;
  padding: 12px 0;
  overflow: hidden;
  justify-content: center;
}
.prod-thumbs .thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--border);
  flex-shrink: 0;
  border: 2px solid transparent;
  transition: border-color 0.15s;
  display: grid;
  place-items: center;
  font-size: 20px;
  overflow: hidden;
  cursor: pointer;
}
.prod-thumbs .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.prod-thumbs .thumb.active { border-color: var(--accent); }
.prod-detail h1 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}
.prod-detail .rating {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}
.prod-detail .rating .stars { color: var(--warn); }
.prod-detail .desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin: 12px 0 16px;
}
.prod-detail .price-block {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}
.prod-detail .price-block .current {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.03em;
}
.prod-detail .price-block .old {
  font-size: 16px;
  color: var(--muted);
  text-decoration: line-through;
}
.prod-detail .price-block .tag-off {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 6px;
}

/* ─── attribute pills ───────────────────────────────────────────────── */
.attr-group { margin-bottom: 16px; }
.attr-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--muted);
}
.attr-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.attr-pill {
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  font-weight: 500;
  background: var(--surface);
  transition: all 0.15s;
}
.attr-pill:active { transform: scale(0.95); }
.attr-pill.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.attr-pill.color-pill {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  border-width: 2px;
  position: relative;
}
.attr-pill.color-pill.selected::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent);
}

/* ─── add to cart btn ───────────────────────────────────────────────── */
.add-cart-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 85%, black));
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: var(--shadow-glow);
  transition: transform 0.1s, box-shadow 0.2s;
  margin-top: 8px;
}
.add-cart-btn:active {
  transform: scale(0.97);
  box-shadow: var(--shadow-md);
}

/* ─── cart page ─────────────────────────────────────────────────────── */
.cart-page { padding: 0 16px 20px; }
.cart-page .empty-cart {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.cart-page .empty-cart .empty-icon { font-size: 56px; margin-bottom: 16px; }
.cart-page .empty-cart h3 { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--fg); }
.cart-item {
  display: flex;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.cart-item:first-child { padding-top: 0; }
.cart-item .ci-img {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background: var(--border);
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 24px;
  overflow: hidden;
}
.cart-item .ci-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cart-item .ci-info { flex: 1; min-width: 0; }
.cart-item .ci-name { font-size: 14px; font-weight: 600; }
.cart-item .ci-attr { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cart-item .ci-price { font-size: 15px; font-weight: 700; color: var(--accent); margin-top: 4px; }
.cart-item .ci-qty {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 4px;
}
.cart-item .ci-qty button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--surface);
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: background 0.1s;
}
.cart-item .ci-qty button:active { background: var(--border); }
.cart-item .ci-qty span {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
}
.cart-item .ci-remove {
  color: var(--muted);
  font-size: 18px;
  padding: 8px;
  transition: color 0.15s;
}
.cart-item .ci-remove:active { color: var(--accent); }
.cart-summary {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.cart-summary .row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 6px 0;
}
.cart-summary .total {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid var(--border);
}
.cart-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.cart-actions .btn-secondary {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 14px;
  transition: all 0.15s;
  text-align: center;
}
.cart-actions .btn-secondary:active { background: var(--bg); }
.cart-actions .btn-primary {
  flex: 1;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: var(--shadow-glow);
  text-align: center;
  transition: transform 0.1s;
}
.cart-actions .btn-primary:active { transform: scale(0.97); }

/* ─── bottom nav bar ────────────────────────────────────────────────── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 10px 16px 12px;
  z-index: 50;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.04);
  backdrop-filter: blur(16px);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bottom-bar .bb-info { min-width: 0; }
.bottom-bar .bb-label {
  font-size: 12px;
  color: var(--muted);
}
.bottom-bar .bb-total {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent);
}
.bottom-bar .bb-qty {
  font-size: 12px;
  color: var(--muted);
}
.bottom-bar .bb-btn {
  justify-self: end;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 85%, black));
  color: white;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 15px;
  box-shadow: var(--shadow-glow);
  transition: transform 0.1s;
  white-space: nowrap;
}
.bottom-bar .bb-btn:active { transform: scale(0.96); }
.bottom-bar .bb-home-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
}
.bottom-bar .bb-cart-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  cursor: pointer;
}
.bottom-bar .bb-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.bottom-bar .bb-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  padding: 0 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.bottom-bar .bb-menu-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  cursor: pointer;
  padding: 8px;
}
.bottom-bar .bb-btn:disabled {
  opacity: 0.4;
  box-shadow: none;
}

/* ─── menu page ─────────────────────────────────────────────────────── */
.menu-page { padding: 12px 16px 20px; }
.menu-list {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }
.menu-icon { font-size: 22px; line-height: 1; }
.menu-label { flex: 1; font-size: 15px; font-weight: 500; color: var(--fg); }
.menu-chevron { font-size: 20px; color: var(--muted); font-weight: 300; }
.menu-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 3px 10px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── checkout / confirmation ───────────────────────────────────────── */
.checkout-page, .confirm-page {
  padding: 20px 16px;
  text-align: center;
}
.checkout-page .icon-big, .confirm-page .icon-big {
  font-size: 64px;
  margin-bottom: 16px;
}
.confirm-page .icon-big { font-size: 72px; }
.checkout-page h2, .confirm-page h2 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.checkout-page .sub, .confirm-page .sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.order-summary {
  text-align: left;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.order-summary .os-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}
.order-summary .os-item:last-child { border-bottom: 0; }
.order-summary .os-img { width: 36px; height: 36px; border-radius: 6px; object-fit: cover; vertical-align: middle; margin-right: 4px; }
.order-summary .os-total {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 17px;
  padding-top: 12px;
  margin-top: 8px;
  border-top: 1px solid var(--fg);
  color: var(--accent);
}
.whatsapp-btn {
  width: 100%;
  padding: 16px;
  background: #25d366;
  color: white;
  font-size: 16px;
  font-weight: 700;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(37,211,102,0.3);
  transition: transform 0.1s;
}
.whatsapp-btn:active { transform: scale(0.97); }
.pedido-token {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  background: var(--bg);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin: 8px 0 16px;
}

/* ─── cat controls (search + sort) ──────────────────────────────────── */
.cat-controls {
  padding: 0 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cat-search input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-size: 14px;
  background: var(--surface);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s;
}
.cat-search input:focus {
  border-color: var(--accent);
}
.cat-sort {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.cat-sort::-webkit-scrollbar { display: none; }
.sort-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  background: var(--surface);
  transition: all 0.15s;
  cursor: pointer;
  flex-shrink: 0;
}
.sort-btn.active {
  background: var(--fg);
  color: var(--surface);
  border-color: var(--fg);
}

/* ─── subcategory screen ────────────────────────────────────────────── */
.subcat-grid {
  padding: 4px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.subcat-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-sm);
}
.subcat-btn:active {
  transform: scale(0.98);
  box-shadow: var(--shadow-md);
}
.subcat-label {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}
.subcat-chevron {
  font-size: 20px;
  color: var(--muted);
  font-weight: 600;
}

/* ─── utility ───────────────────────────────────────────────────────── */
.spacer-8 { height: 8px; }
.spacer-16 { height: 16px; }
.no-img-text { font-size: 12px; color: var(--muted); text-align: center; line-height: 1.4; }

/* ─── Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal-dialog {
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  animation: fadeIn 0.2s ease;
}
.modal-dialog p {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
  margin: 0 0 20px;
  line-height: 1.4;
}
.modal-actions {
  display: flex;
  gap: 10px;
}
.modal-actions .btn-secondary,
.modal-actions .btn-primary {
  flex: 1;
  padding: 12px;
  font-size: 14px;
  border-radius: 10px;
}
.modal-actions .btn-danger {
  background: #e74c3c !important;
}
.modal-actions .btn-danger:hover {
  background: #c0392b !important;
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Admin ──────────────────────────────────────────────────────────── */
.admin-html {
  height: auto;
  overflow: visible;
}
.admin-body {
  height: auto;
  min-height: 100vh;
  overflow-y: auto;
}
.admin-page {
  padding: 16px;
}
.admin-section h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 12px;
}
.admin-prod-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  box-shadow: var(--shadow-sm);
}
.admin-prod-img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--border);
  display: grid;
  place-items: center;
  font-size: 20px;
}
.admin-prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.admin-prod-info {
  flex: 1;
  min-width: 0;
}
.admin-prod-info strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-prod-info span {
  font-size: 12px;
  color: var(--muted);
}
.admin-prod-actions .sort-btn {
  padding: 6px 12px;
  font-size: 12px;
}
