/* =========================================================================
   Toniva — global styles
   Brand palette, no gradients, mobile-first, Kilimall-style layout.
   ========================================================================= */

:root {
  --sky: #0054E6;        /* primary blue — navbar, buttons, links */
  --sky-dark: #003399;   /* dark blue — hover states */
  --cyan: #25C3FE;       /* sky cyan — accents, highlights */
  --navy: #111827;       /* dark text */
  --navy-soft: #374151;  /* secondary text */
  --orange: #FF9D00;
  --orange-dark: #e88c00;
  --teal: #00A8A8;
  --green: #70B030;
  --pink: #E03078;
  --purple: #7838D0;
  --bg: #FFFFFF;
  --bg-soft: #F5F8FF;    /* light background */
  --bg-card: #FFFFFF;
  --line: #E6EAF0;
  --muted: #6b7889;
  --danger: #d93025;
  --radius: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(0,51,153,.06), 0 1px 3px rgba(0,51,153,.05);
  --shadow: 0 4px 14px rgba(0,51,153,.08);
  --shadow-lg: 0 12px 30px rgba(0,51,153,.12);
  --maxw: 1180px;
  --header-h: 96px;
  --bottomnav-h: 54px;
  --gap: 8px;
  --pad: 12px;
  --font: "Segoe UI", Roboto, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--navy);
  background: var(--bg-soft);
  line-height: 1.45;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
}
img { max-width: 100%; display: block; }
a { color: var(--sky); text-decoration: none; -webkit-tap-highlight-color: rgba(11,149,239,.12); }
a:hover { color: var(--sky-dark); }
h1,h2,h3,h4 { color: var(--navy); margin: 0 0 .35em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.2rem; }
h2 { font-size: 1.05rem; }
p { margin: 0 0 .9em; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }
.page-title { margin: 12px 0 8px; display: flex; align-items: center; gap: 8px; }
.page-title i { color: var(--cyan); font-size: .95em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 14px; font-weight: 600; font-size: .88rem; cursor: pointer; min-height: 40px;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  text-decoration: none; line-height: 1; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--sky); color: #fff; }
.btn-primary:hover { background: var(--sky-dark); color: #fff; }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--navy); }
.btn-whatsapp { background: #25D366; color: #fff; border-color: #20bd5a; }
.btn-whatsapp:hover { background: #20bd5a; color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #f3c2be; }
.btn-danger:hover { background: #fdecea; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 11px; font-size: .8rem; min-height: 34px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--sky);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-top {
  display: flex; align-items: center; gap: 10px;
  padding: 0 var(--pad); max-width: var(--maxw); margin: 0 auto;
  height: 44px;
}
.brand {
  display: inline-flex; align-items: center; flex-shrink: 0;
  height: 100%; text-decoration: none; padding: 3px 0;
}
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 100%;
  width: auto;
  max-height: 100%;
  display: block;
  border-radius: 4px;
  object-fit: contain;
}
.brand:hover .brand-logo { opacity: .92; }
.footer-brand { display: flex; flex-direction: column; gap: 10px; }
.footer-brand .brand-logo-footer { max-height: 40px; }

.search-bar {
  flex: 1; display: flex; background: #fff; border-radius: var(--radius-sm);
  overflow: visible; min-width: 0; box-shadow: var(--shadow-sm); position: relative; height: 34px;
}
.search-bar select {
  border: 0; background: var(--bg-soft); color: var(--navy);
  padding: 0 22px 0 9px; font-size: .78rem; max-width: 100px; border-right: 1px solid var(--line);
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23111827' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center;
  cursor: pointer; flex-shrink: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.search-bar input {
  flex: 1; min-width: 0; border: 0; padding: 0 10px; font-size: .88rem; color: var(--navy);
  outline: none; height: 100%;
}
.search-bar button {
  border: 0; background: var(--orange); color: #fff; padding: 0 14px; font-weight: 700; cursor: pointer;
  font-size: .9rem; border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.search-bar button:hover { background: var(--orange-dark); }

/* ---------- Live search dropdown ---------- */
.live-search {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 100;
  background: #fff; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto;
  border: 1px solid var(--line); border-top: 0;
}
.ls-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  text-decoration: none; color: var(--navy); border-bottom: 1px solid var(--line);
  transition: background .12s;
}
.ls-item:hover { background: var(--bg-soft); }
.ls-item:last-child { border-bottom: 0; }
.ls-thumb { width: 40px; height: 40px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-soft); display: grid; place-items: center; }
.ls-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ls-noimg { color: var(--muted); font-size: 1.1rem; }
.ls-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ls-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls-price { font-size: .8rem; color: var(--sky); font-weight: 700; display: flex; gap: 8px; align-items: center; }
.ls-out { color: var(--muted); font-weight: 600; font-size: .72rem; }
.ls-empty { padding: 16px; text-align: center; color: var(--muted); font-size: .85rem; }

/* Font Awesome icon sizing in UI chrome */
.icon-btn i { font-size: 1rem; }
.btn i { font-size: .9em; }
.btn.btn-sm i { font-size: .85em; }
.empty-state .big i { font-size: 2.2rem; color: var(--muted); }

.header-actions { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  color: #fff; background: transparent; border: 0; border-radius: 999px;
  width: 36px; height: 36px; padding: 0; font-size: .85rem; font-weight: 600; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.18); color: #fff; }
.icon-btn .label { display: none; }
.icon-btn .badge {
  position: absolute; top: 1px; right: 1px; background: var(--orange); color: #fff;
  font-size: .62rem; min-width: 15px; height: 15px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 3px; font-weight: 700; line-height: 1;
}

/* category tab strip */
.cat-strip {
  background: #fff; border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.cat-strip::-webkit-scrollbar { display: none; }
.cat-strip .inner { display: inline-flex; gap: 2px; padding: 6px var(--pad); max-width: var(--maxw); }
.cat-strip a {
  color: var(--navy-soft); font-weight: 600; font-size: .78rem; padding: 6px 10px;
  border-radius: 999px; white-space: nowrap; transition: background .15s, color .15s;
}
.cat-strip a:hover { background: var(--bg-soft); color: var(--navy); }
.cat-strip a.active { background: var(--sky); color: #fff; }

/* ---------- Promo icon row (unboxed, app-style) ---------- */
.promo-icons {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch;
  padding: 10px 8px 8px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.promo-icons::-webkit-scrollbar { display: none; }
.promo-icon {
  display: flex; flex-direction: column; align-items: center; gap: 5px;
  flex: 0 0 auto; width: 76px; scroll-snap-align: start;
  text-align: center; padding: 4px 2px; color: var(--navy);
  font-size: .68rem; font-weight: 600; line-height: 1.2;
}
.promo-icon span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.promo-icon .emoji {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff;
}
.promo-icon .emoji i { font-size: 1.05rem; }
.promo-icon:active .emoji { transform: scale(.94); }

/* ---------- Hero slider ---------- */
.hero-slider {
  position: relative; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); aspect-ratio: 16 / 9;
}
.hero-slide {
  position: absolute; inset: 0; opacity: 0;
  transition: opacity 1s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: flex-end; padding: 0 var(--pad) 14px;
  pointer-events: none;
}
.hero-overlay .hero-text {
  pointer-events: auto;
  background: rgba(0, 17, 40, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--cyan);
}
.hero-overlay .tag {
  display: inline-block; background: var(--cyan); color: var(--navy); padding: 3px 8px;
  border-radius: 999px; font-size: .64rem; font-weight: 700; letter-spacing: .3px; margin-bottom: 6px;
}
.hero-overlay h1 { color: #fff; font-size: 1rem; margin: 0 0 2px; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.hero-overlay p { margin: 0 0 10px; font-size: .76rem; color: rgba(255,255,255,.92); }

/* Mobile: no panel — compact caption with a flat dark strip */
@media (max-width: 599px) {
  .hero-overlay {
    padding: 0; align-items: flex-end;
    background: none;
  }
  .hero-overlay .hero-text {
    background: rgba(0,17,40,.55); backdrop-filter: none; -webkit-backdrop-filter: none;
    border-left: 0; border-radius: 0; padding: 6px var(--pad) 8px; width: 100%;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  }
  .hero-overlay .tag {
    font-size: .56rem; padding: 2px 7px; margin-bottom: 0;
    background: var(--cyan); color: var(--navy);
  }
  .hero-overlay h1 { font-size: .78rem; margin: 0; text-shadow: 0 1px 4px rgba(0,0,0,.7); flex: 1 1 100%; }
  .hero-overlay p { display: none; }
  .hero-overlay .btn {
    font-size: .66rem; padding: 4px 10px; margin: 0;
  }
  .hero-overlay .btn i { font-size: .6rem; }
}

/* ---------- Hot deals: image-led compact cards ---------- */
.deal-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.deal-card {
  display: flex; gap: 8px; align-items: center; background: #fff; border-radius: var(--radius);
  padding: 7px; box-shadow: var(--shadow-sm); color: var(--navy); min-width: 0;
}
.deal-thumb {
  width: 58px; height: 58px; border-radius: 8px; overflow: hidden; flex-shrink: 0;
  background: var(--bg-soft); position: relative;
}
.deal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.deal-thumb .pct { position: absolute; top: 3px; left: 3px; font-size: .58rem; padding: 2px 4px; border-radius: 4px; }
.deal-body { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.deal-name {
  font-size: .74rem; font-weight: 600; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.deal-price { font-size: .82rem; font-weight: 800; color: var(--orange-dark); }
.deal-compare { font-size: .66rem; color: var(--muted); text-decoration: line-through; }

/* ---------- Category tile grid ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cat-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  background: #fff; border-radius: var(--radius); padding: 10px 4px; box-shadow: var(--shadow-sm);
  color: var(--navy); font-size: .66rem; font-weight: 600; line-height: 1.2;
}
.cat-tile .emoji { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; }
.cat-tile .emoji i { font-size: .95rem; }
.cat-tile span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Trust strip ---------- */
.trust-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.trust-item {
  display: flex; align-items: center; gap: 9px; background: #fff; border-radius: var(--radius);
  padding: 9px 10px; box-shadow: var(--shadow-sm); min-width: 0;
}
.trust-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex-shrink: 0; font-size: .9rem; }
.trust-item div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.trust-item strong { font-size: .74rem; }
.trust-item span:not(.trust-ico) { font-size: .66rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: 10px 0; }
.section-tight { padding: 6px 0; }
.section-head {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
}
.section-head h2 { margin: 0; font-size: .98rem; display: flex; align-items: center; gap: 6px; }
.section-head h2 i { color: var(--cyan); font-size: .9em; }
.section-head a { font-size: .76rem; font-weight: 600; }
.promo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.promo-card {
  border-radius: var(--radius); padding: 12px; color: #fff; min-height: 88px;
  display: flex; flex-direction: column; justify-content: space-between; box-shadow: var(--shadow-sm);
}
.promo-card h3 { color: #fff; font-size: .9rem; margin: 0; }
.promo-card p { margin: 3px 0 0; font-size: .72rem; opacity: .95; }
.promo-card .tag {
  align-self: flex-start; background: rgba(255,255,255,.22); padding: 3px 8px;
  border-radius: 999px; font-size: .64rem; font-weight: 700; letter-spacing: .3px;
}

/* ---------- Product cards ---------- */
.product-row {
  display: flex; gap: var(--gap); overflow-x: auto; scrollbar-width: none;
  padding: 2px 2px 6px; margin: 0 -2px; scroll-snap-type: x mandatory;
}
.product-row::-webkit-scrollbar { display: none; }
.product-row > * { scroll-snap-align: start; flex: 0 0 auto; width: 132px; }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }

.product-card {
  background: var(--bg-card); border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column; position: relative;
  transition: box-shadow .15s, transform .15s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.product-card .thumb {
  aspect-ratio: 1/1; background: var(--bg-soft); display: grid; place-items: center;
  font-size: 2.4rem; position: relative; overflow: hidden;
}
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card .thumb .pct { position: absolute; top: 6px; left: 6px; z-index: 2; }
.product-card .thumb .thumb-badge { position: absolute; top: 40px; right: 6px; z-index: 2; box-shadow: var(--shadow-sm); }

/* Wishlist heart */
.wish-form { position: absolute; top: 6px; right: 6px; z-index: 3; margin: 0; }
.wish-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255,255,255,.92); color: var(--navy-soft);
  display: grid; place-items: center; font-size: .8rem;
  box-shadow: var(--shadow-sm); transition: transform .15s, color .15s;
}
.wish-btn:hover { transform: scale(1.12); color: var(--danger); }
.wish-btn.active { color: var(--danger); }
.pdp-wish { top: 10px; right: 10px; }
.pdp-wish .wish-btn { width: 40px; height: 40px; font-size: 1.05rem; }
.product-card .body { padding: 7px 8px 8px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.product-card .name {
  font-size: .76rem; font-weight: 600; color: var(--navy); line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.product-card .badge-pill { align-self: flex-start; }
.product-card .price { font-size: .9rem; font-weight: 800; color: var(--navy); }
.product-card .compare { font-size: .68rem; color: var(--muted); text-decoration: line-through; }
.product-card .price-row { display: flex; align-items: baseline; gap: 5px; flex-wrap: nowrap; }
.product-card .price-row .price { white-space: nowrap; }
.product-card .price-row .compare { white-space: nowrap; }
.product-card .add-btn {
  margin-top: 4px; background: var(--sky); color: #fff; border: 0; border-radius: 7px;
  padding: 7px 6px; font-weight: 700; cursor: pointer; font-size: .74rem; min-height: 32px;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px; width: 100%;
}
.product-card .add-btn:hover { background: var(--sky-dark); }

/* badges */
.badge-pill {
  display: inline-flex; align-items: center; padding: 2px 7px; border-radius: 999px;
  font-size: .62rem; font-weight: 700; letter-spacing: .3px;
}
.badge-sale { background: var(--orange); color: #fff; }
.badge-new { background: var(--green); color: #fff; }
.badge-hot { background: var(--pink); color: #fff; }
.badge-stock-out { background: #eef1f6; color: var(--muted); }
.badge-in-stock { background: #e9f7e9; color: #1e7a32; }
.pct { background: var(--orange); color: #fff; font-weight: 700; font-size: .64rem;
  padding: 2px 6px; border-radius: 5px; }

/* ---------- Bottom mobile nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 60;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  box-shadow: 0 -2px 10px rgba(0,51,153,.05);
}
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: .62rem; font-weight: 600; position: relative;
}
.bottom-nav a .ico { line-height: 1; }
.bottom-nav .ico i { font-size: 1.15rem; }
.bottom-nav a.active { color: var(--sky); }
.bottom-nav a[href*="wa.me"] .ico i { color: #25D366; }
.bottom-nav a .badge {
  position: absolute; top: 5px; left: 50%; margin-left: 6px; background: var(--orange);
  color: #fff; font-size: .58rem; min-width: 14px; height: 14px; border-radius: 999px;
  display: grid; place-items: center; padding: 0 3px; font-weight: 700; line-height: 1;
}

/* ---------- Floating WhatsApp button ---------- */
.float-wa {
  position: fixed; bottom: calc(var(--bottomnav-h) + 12px); right: 14px; z-index: 60;
  width: 50px; height: 50px; border-radius: 50%; background: #25D366; color: #fff;
  display: grid; place-items: center; font-size: 1.6rem; line-height: 1;
  box-shadow: 0 4px 12px rgba(37,211,102,.4), 0 2px 6px rgba(0,0,0,.15);
  transition: transform .15s, box-shadow .15s; text-decoration: none;
}
.float-wa:hover { transform: scale(1.08); box-shadow: 0 6px 16px rgba(37,211,102,.5), 0 2px 8px rgba(0,0,0,.2); color: #fff; }
.float-wa i { font-size: 1.6rem; }
@media (min-width: 600px) {
  .float-wa { bottom: 18px; width: 56px; height: 56px; font-size: 1.8rem; }
  .float-wa i { font-size: 1.8rem; }
}

/* ---------- Forms ---------- */
.field { margin-bottom: 12px; }
.field label { display: block; font-weight: 600; font-size: .8rem; margin-bottom: 4px; color: var(--navy); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 11px; font-size: .9rem; color: var(--navy); background: #fff; outline: none;
  transition: border .15s, box-shadow .15s; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--sky); box-shadow: 0 0 0 3px rgba(37,195,254,.25);
}
.field textarea { min-height: 80px; resize: vertical; }

/* Searchable combobox (checkout town picker) */
.combo { position: relative; }
.combo-list {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  max-height: 230px; overflow-y: auto; box-shadow: var(--shadow);
}
.combo-item {
  padding: 9px 12px; font-size: .88rem; cursor: pointer; color: var(--navy);
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
}
.combo-item:hover, .combo-item.sel { background: var(--bg-soft); }
.combo-item.combo-empty { color: var(--navy-soft); cursor: default; }
.combo-item.combo-empty:hover { background: none; }
.combo-count { font-size: .74rem; color: var(--navy-soft); white-space: nowrap; }

/* Return request form */
.return-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--line); border-radius: 8px; margin-bottom: 6px;
  cursor: pointer; font-size: .88rem; font-weight: 500;
}
.return-item:hover { border-color: var(--cyan); }
.return-item input { width: 16px; height: 16px; accent-color: var(--primary); }
.badge-pill.ret-new { background: var(--orange); color: #fff; }
.badge-pill.ret-approved { background: var(--primary); color: #fff; }
.badge-pill.ret-completed { background: var(--green); color: #fff; }
.badge-pill.ret-rejected { background: var(--danger); color: #fff; }
.field .hint { font-size: .74rem; color: var(--muted); margin-top: 4px; }
.field .err { font-size: .76rem; color: var(--danger); margin-top: 4px; }

.card {
  background: var(--bg-card); border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 12px;
}
.card + .card { margin-top: var(--gap); }
.card h2 { font-size: .98rem; }

/* ---------- Product detail page ---------- */
.pdp { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.pdp-card { padding: 0; overflow: hidden; }
.pdp-media {
  position: relative; background: var(--bg-soft); aspect-ratio: 1/1; display: grid; place-items: center;
  overflow: hidden;
}
.pdp-media img { width: 100%; height: 100%; object-fit: cover; transition: opacity .35s ease; }
.pdp-media .emoji { font-size: 5rem; }
.pdp-badge { position: absolute; top: 10px; left: 10px; }
.pdp-thumbs {
  display: flex; gap: 8px; padding: 8px 10px 10px; overflow-x: auto;
  scrollbar-width: thin;
}
.pdp-thumb {
  width: 60px; height: 60px; flex-shrink: 0; border-radius: 8px; overflow: hidden;
  border: 2px solid var(--line); background: var(--bg-soft); cursor: pointer; padding: 0;
  transition: border-color .15s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-thumb:hover { border-color: var(--cyan); }
.pdp-thumb.active { border-color: var(--primary); }
.pdp-info { padding: 12px; }
.pdp-title { font-size: 1.05rem; margin: 0 0 6px; line-height: 1.3; }
.pdp-price-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.pdp-price { font-size: 1.3rem; font-weight: 800; color: var(--navy); line-height: 1.1; }
.pdp-price-line { display: flex; align-items: baseline; gap: 8px; flex-wrap: nowrap; }
.pdp-price-line .pdp-price { white-space: nowrap; }
.pdp-price-line .pdp-compare { white-space: nowrap; }
.pdp-compare { font-size: .8rem; }
.pdp-desc { margin: 10px 0 0; color: var(--navy-soft); font-size: .86rem; line-height: 1.5; }
.pdp-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.pdp-actions form { display: contents; }
.pdp-actions .pdp-wa, .pdp-actions .pdp-wa .btn { grid-column: 1 / -1; }
.pdp-actions .btn { min-height: 42px; font-size: .84rem; }

/* ---------- Cart ---------- */
.cart-item { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 10px; }
.cart-thumb {
  width: 64px; height: 64px; border-radius: 8px; overflow: hidden; background: var(--bg-soft);
  display: grid; place-items: center; flex-shrink: 0;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .emoji { font-size: 1.9rem; }
.cart-info { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.cart-name { font-weight: 600; color: var(--navy); font-size: .84rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cart-line-total { font-weight: 800; font-size: .95rem; margin-top: 2px; }
.cart-controls { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; }
.qty-form { display: flex; align-items: center; gap: 6px; flex: 1; }
.qty-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: #fff;
  color: var(--navy); display: grid; place-items: center; cursor: pointer; font-size: .75rem;
}
.qty-btn:active { background: var(--bg-soft); }
.qty-input {
  width: 46px; height: 34px; text-align: center; border: 1px solid var(--line); border-radius: 8px;
  font-size: .9rem; font-weight: 700; color: var(--navy); -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.remove-btn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid #f3c2be; background: #fff;
  color: var(--danger); display: grid; place-items: center; cursor: pointer; margin-left: auto;
}
.remove-btn:active { background: #fdecea; }
.summary-card { max-width: 100%; }
.auth-card { max-width: 420px; margin: 14px auto; }
.summary-card .flex-between { padding: 4px 0; font-size: .88rem; }

/* ---------- Star ratings ---------- */
.rating-mini { display: inline-flex; align-items: center; gap: 3px; font-size: .72rem; color: var(--navy-soft); }
.rating-mini .fas { color: #f5a623; font-size: .68rem; }
.rating-mini .rating-val { font-weight: 700; color: var(--navy); }
.rating-mini .rating-count { color: var(--muted); }

.review-stars-display { display: inline-flex; gap: 1px; }
.review-stars-display .fas { color: #e0d6c5; font-size: .78rem; }
.review-stars-display .fas.filled { color: #f5a623; }
.review-date { color: var(--muted); font-size: .72rem; margin-left: 6px; }

/* Rating summary on PDP */
.rating-summary { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.rs-score { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rs-avg { font-size: 1.4rem; font-weight: 800; color: var(--navy); line-height: 1; }
.rs-stars { display: inline-flex; gap: 2px; }
.rs-stars .fas { color: #e0d6c5; font-size: .9rem; }
.rs-stars .fas.filled { color: #f5a623; }
.rs-count { font-size: .78rem; color: var(--muted); }
.rs-bars { margin-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.rs-bar-row { display: flex; align-items: center; gap: 6px; }
.rs-bar-label { display: inline-flex; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); width: 32px; }
.rs-bar-label .fas { font-size: .58rem; color: #f5a623; }
.rs-bar-track { flex: 1; height: 6px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; }
.rs-bar-fill { height: 100%; background: #f5a623; border-radius: 999px; transition: width .3s; }
.rs-bar-count { font-size: .68rem; color: var(--muted); width: 24px; text-align: right; }

/* Reviews section */
.reviews-section { margin-top: 14px; }
.review-form-card { margin-bottom: 10px; }
.review-form-card h3 { margin: 0 0 8px; }

/* Star input */
.star-input { display: inline-flex; flex-direction: row; gap: 6px; justify-content: flex-end; }
.star-input input[type="radio"] { display: none; }
.star-input-label { cursor: pointer; font-size: 1.6rem; color: #e0d6c5; transition: color .12s; line-height: 1; padding: 4px; }
.star-input-label .fas { font-size: inherit; }
.star-input-label:hover,
.star-input-label.hover,
.star-input-label.selected { color: #f5a623; }

/* Reviews list */
.reviews-list { display: flex; flex-direction: column; gap: 0; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: 0; padding-bottom: 0; }
.review-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 6px; }
.review-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--sky); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: .82rem;
}
.review-meta { flex: 1; min-width: 0; }
.review-meta strong { font-size: .85rem; display: inline-block; margin-right: 6px; }
.review-meta .review-stars-display { vertical-align: middle; }
.review-title-text { display: block; font-size: .85rem; margin-bottom: 2px; }
.review-body { font-size: .82rem; color: var(--navy-soft); margin: 0; line-height: 1.5; }
.verified-badge { display: inline-flex; align-items: center; gap: 4px; font-size: .72rem; color: var(--green); font-weight: 600; margin-top: 2px; }

/* Admin reviews */
.review-admin-row { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-admin-row:first-child { padding-top: 0; }
.review-admin-row:last-child { border-bottom: 0; }
.review-admin-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.review-admin-product { margin-bottom: 4px; }
.review-admin-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Flash messages ---------- */
.flash { border-radius: var(--radius-sm); padding: 10px 12px; margin: 10px 0; font-size: .84rem; font-weight: 500; }
.flash.success { background: #e9f7e9; color: #1e7a32; border: 1px solid #bfe6c4; }
.flash.error { background: #fdecea; color: #b3261e; border: 1px solid #f3c2be; }
.flash.info { background: #e8f3ff; color: #0a5fa8; border: 1px solid #c4e1fb; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table th { font-size: .76rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); }
.table tr:hover td { background: var(--bg-soft); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy); color: #c7d2e3; padding: 22px 0 16px; margin-top: 20px; font-size: .8rem;
}
.site-footer h4 { color: #fff; font-size: .86rem; margin-bottom: 8px; }
.site-footer a { color: #c7d2e3; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.footer-grid .footer-brand { grid-column: 1 / -1; }
.footer-brand p { font-size: .78rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 16px; padding-top: 12px; font-size: .72rem; color: #93a3bd; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer-social { display: flex; gap: 6px; }
.footer-social a { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.1); display: grid; place-items: center; color: #fff; font-size: .82rem; transition: background .15s; }
.footer-social a:hover { background: var(--cyan); color: var(--navy); }

/* ===== Article prose ===== */
.article-content h1, .article-content h2, .article-content h3 { font-size: 1.1rem; margin: 18px 0 8px; }
.article-content h1 { font-size: 1.3rem; }
.article-content p { margin-bottom: 12px; }
.article-content ul, .article-content ol { padding-left: 20px; margin-bottom: 12px; }
.article-content li { margin-bottom: 4px; line-height: 1.7; }
.article-content blockquote { border-left: 3px solid var(--sky); padding: 8px 14px; margin: 12px 0; background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.article-content img { max-width: 100%; border-radius: var(--radius-sm); }
.article-content a { color: var(--sky); text-decoration: underline; }
.blog-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s; }
.blog-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ---------- Admin layout ---------- */
.admin-shell { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 14px 0; }
.admin-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
.admin-nav::-webkit-scrollbar { display: none; }
.admin-nav a {
  padding: 9px 14px; border-radius: 999px; background: var(--bg-soft); color: var(--navy);
  font-weight: 600; font-size: .85rem; white-space: nowrap;
}
.admin-nav a.active, .admin-nav a:hover { background: var(--sky); color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.stat-card { background: var(--bg-card); border-radius: var(--radius); padding: 12px; box-shadow: var(--shadow-sm); }
.stat-card .num { font-size: 1.4rem; font-weight: 800; color: var(--navy); }
.stat-card .lbl { font-size: .74rem; color: var(--muted); font-weight: 600; }

/* ---------- Utilities ---------- */
.row { display: flex; gap: var(--gap); }
.col { flex: 1; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: .78rem; }
.mt0 { margin-top: 0; } .mt1 { margin-top: 8px; } .mt2 { margin-top: 14px; }
.mb0 { margin-bottom: 0; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.empty-state { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-state .big { margin-bottom: 8px; }
.empty-state p { font-size: .88rem; }
.hide { display: none !important; }
main { min-height: 50vh; }

/* ---------- Mobile header: row 1 = logo + cart/account, row 2 = category + search ---------- */
@media (max-width: 599px) {
  :root { --header-h: 82px; }
  .container { padding: 0 8px; }
  .header-top {
    flex-wrap: wrap; gap: 6px; padding: 6px 8px;
    height: auto; row-gap: 6px;
  }
  .brand { order: 1; flex-shrink: 0; padding: 0; height: 28px; }
  .brand-logo { height: 28px; }
  .header-actions {
    order: 2; margin-left: auto; display: flex; gap: 2px;
  }
  .icon-btn { width: 32px; height: 32px; font-size: .92rem; }
  .icon-btn .label { display: none; }
  .icon-btn .badge { top: 0; right: 0; min-width: 14px; height: 14px; font-size: .58rem; }
  .search-bar { order: 3; flex: 1 1 100%; min-width: 0; height: 32px; }
  .search-bar select { padding: 0 18px 0 7px; font-size: .74rem; max-width: 88px; }
  .search-bar input { padding: 0 7px; font-size: .82rem; }
  .search-bar button { padding: 0 10px; font-size: .82rem; }
}

/* ---------- Responsive (tablet+) ---------- */
@media (min-width: 600px) {
  :root { --header-h: 56px; --radius: 14px; --radius-sm: 10px; --gap: 12px; --pad: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.25rem; }
  .btn { padding: 11px 18px; font-size: .95rem; }
  .btn-sm { padding: 7px 12px; font-size: .85rem; }
  .header-top { height: 56px; }
  .brand { padding: 4px 0; }
  .footer-brand .brand-logo-footer { max-height: 52px; }
  .search-bar { height: 40px; }
  .search-bar select { font-size: .85rem; max-width: 130px; }
  .search-bar input { font-size: .95rem; }
  .icon-btn { width: auto; height: auto; padding: 8px 12px; background: rgba(255,255,255,.14); }
  .icon-btn .label { display: inline; }
  .icon-btn .badge { top: -4px; right: -4px; min-width: 17px; height: 17px; font-size: .68rem; }
  .cat-strip .inner { gap: 4px; padding: 8px var(--pad); }
  .cat-strip a { font-size: .85rem; padding: 7px 13px; }
  .section { padding: 18px 0; }
  .section-tight { padding: 10px 0; }
  .section-head h2 { font-size: 1.15rem; }
  .section-head a { font-size: .85rem; }
  .promo-icons { padding: 14px 10px; gap: 10px; }
  .promo-icon { width: 92px; font-size: .78rem; gap: 7px; }
  .promo-icon .emoji { width: 50px; height: 50px; border-radius: 14px; }
  .promo-icon .emoji i { font-size: 1.3rem; }
  .hero-overlay { padding: 0 28px 18px; align-items: flex-end; }
  .hero-overlay .hero-text { padding: 14px 20px; }
  .hero-overlay h1 { font-size: 1.3rem; }
  .hero-overlay p { font-size: .9rem; }
  .deal-grid { grid-template-columns: repeat(4, 1fr); }
  .deal-card { flex-direction: column; align-items: stretch; padding: 10px; gap: 8px; }
  .deal-thumb { width: 100%; height: auto; aspect-ratio: 1/1; }
  .deal-name { font-size: .85rem; }
  .deal-price { font-size: .95rem; }
  .cat-grid { grid-template-columns: repeat(5, 1fr); gap: var(--gap); }
  .cat-tile { font-size: .78rem; padding: 14px 6px; }
  .cat-tile .emoji { width: 46px; height: 46px; }
  .cat-tile .emoji i { font-size: 1.2rem; }
  .trust-grid { grid-template-columns: repeat(4, 1fr); }
  .trust-item { padding: 12px; }
  .trust-item strong { font-size: .84rem; }
  .trust-item span:not(.trust-ico) { font-size: .74rem; }
  .promo-grid { grid-template-columns: repeat(4, 1fr); }
  .promo-card { min-height: 120px; padding: 18px 14px; }
  .promo-card h3 { font-size: 1.05rem; }
  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .product-row > * { width: 180px; }
  .product-card .body { padding: 10px 11px 12px; gap: 4px; }
  .product-card .name { font-size: .85rem; }
  .product-card .price { font-size: 1rem; }
  .product-card .add-btn { font-size: .82rem; padding: 8px; }
  .badge-pill { font-size: .68rem; padding: 3px 8px; }
  .card { padding: 18px; }
  .card h2 { font-size: 1.1rem; }
  .pdp-card { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; padding: 18px; gap: 20px; }
  .pdp-media { border-radius: var(--radius); }
  .pdp-thumbs { padding: 10px 0 0; }
  .pdp-info { padding: 0; }
  .pdp-title { font-size: 1.5rem; }
  .pdp-price { font-size: 1.8rem; }
  .pdp-desc { font-size: .95rem; }
  .pdp-actions { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); padding: 0; }
  .pdp-actions .pdp-wa, .pdp-actions .pdp-wa .btn { grid-column: auto; }
  .cart-item { grid-template-columns: 80px 1fr auto; align-items: center; padding: 14px; }
  .cart-thumb { width: 80px; height: 80px; }
  .cart-controls { grid-column: auto; }
  .summary-card { max-width: 380px; }
  .field label { font-size: .85rem; }
  .field input, .field select, .field textarea { padding: 11px 12px; font-size: .95rem; }
  .flash { font-size: .9rem; padding: 11px 14px; }
  .footer-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-grid .footer-brand { grid-column: auto; }
  .site-footer { padding: 30px 0 24px; font-size: .85rem; }
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .stat-card .num { font-size: 1.6rem; }
  .empty-state .big i { font-size: 3rem; }
}

@media (min-width: 900px) {
  .product-grid { grid-template-columns: repeat(4, 1fr); }
  .product-row > * { width: 210px; }
  .bottom-nav { display: none; }
  body { padding-bottom: 0; }
  .cat-strip { position: sticky; top: var(--header-h); z-index: 49; }
  .admin-shell { grid-template-columns: 220px 1fr; }
  .admin-nav { flex-direction: column; overflow: visible; }
  .admin-nav a { white-space: normal; }
}

@media (min-width: 1100px) {
  .product-grid { grid-template-columns: repeat(5, 1fr); }
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
  .promo-icon { font-size: .64rem; }
  .product-row > * { width: 124px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); }
}
