/* RR9KK ZONE — mobile-first, dark navy header like the owner's store */
:root {
  --navy: #0b2239;
  --navy2: #10293f;
  --blue: #0b5ed7;
  --blue-dark: #0a4fc0;
  --green: #1db954;
  --green-dark: #16a34a;
  --amber: #ff9800;
  --orange: #f57c00;
  --bg: #f3f6fb;
  --card: #ffffff;
  --text: #14202e;
  --muted: #68788a;
  --red: #dc2626;
  --radius: 16px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Bengali", sans-serif;
  background: var(--bg);
  color: var(--text);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.error { color: var(--red); font-weight: 600; }
img { max-width: 100%; }

/* ---------- header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(180deg, #0d6efd, var(--blue) 55%, var(--blue-dark));
  color: #fff; padding: 10px 12px 12px;
  box-shadow: 0 2px 12px rgba(8,47,107,.35);
}
.topbar-inner { display: flex; align-items: center; gap: 8px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; min-width: 0; flex: 0 1 auto; }
.brand-logo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; background: #fff; flex: 0 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: .5px; color: #fff; white-space: nowrap; }
.brand-tag { font-size: .72rem; font-weight: 600; color: #cfe4ff; white-space: nowrap; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.call-pill {
  background: var(--green-dark); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 9px 15px; font-weight: 800; font-size: .9rem;
  white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.25);
  margin-left: auto; flex: 0 0 auto;
}
.lang-toggle { display: flex; border: 1px solid rgba(255,255,255,.35); border-radius: 999px; overflow: hidden; }
.lang-btn { background: transparent; color: #fff; border: 0; padding: 6px 9px; cursor: pointer; font-size: .82rem; }
.lang-btn.active { background: rgba(255,255,255,.92); color: var(--blue-dark); font-weight: 700; }
.pill-btn { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 999px; padding: 8px 11px; cursor: pointer; font-size: .82rem; }
.icon-btn { position: relative; background: rgba(255,255,255,.16); border: 0; border-radius: 50%; width: 38px; height: 38px; font-size: 1.05rem; cursor: pointer; color: #fff; }
.icon-btn.dark { background: #e3eaf2; color: var(--text); }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--red); color: #fff; font-size: .68rem; font-weight: 700; border-radius: 999px; padding: 2px 6px; }
/* Narrow screens: header becomes TWO rows so nothing overlaps the shop name.
   Row 1 = logo + RR9KK ZONE + tagline + Call pill.
   Row 2 = language toggle / Track Order / cart / admin, right-aligned. */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; }
  .brand-logo { width: 44px; height: 44px; }
  .brand-name { font-size: 1.18rem; }
  .call-pill { padding: 8px 12px; font-size: .85rem; }
  .topbar-actions {
    order: 3; flex: 1 0 100%; justify-content: flex-end; flex-wrap: wrap; row-gap: 6px;
    padding-top: 7px; border-top: 1px solid rgba(255,255,255,.18);
  }
  .lang-btn { padding: 5px 8px; font-size: .78rem; }
  .pill-btn { padding: 7px 10px; font-size: .78rem; white-space: nowrap; }
  .topbar-actions .icon-btn { width: 34px; height: 34px; font-size: .95rem; }
}
/* Very narrow phones (~320px): slim row 1 down so the name + tagline still fit */
@media (max-width: 380px) {
  .brand { gap: 7px; }
  .brand-logo { width: 40px; height: 40px; }
  .brand-name { font-size: 1.08rem; }
  .brand-tag { font-size: .64rem; }
  .call-pill { padding: 7px 10px; font-size: .8rem; }
}
.search-row { margin: 12px -12px -12px; padding: 10px 12px; background: var(--bg); }
.search-row input {
  width: 100%; padding: 12px 18px; border-radius: 999px; font-size: 1rem; outline: none;
  border: 1px solid #d3dfec; background: #fff; color: var(--text);
  box-shadow: 0 2px 8px rgba(15,40,70,.08);
}
.search-row input:focus { border-color: var(--blue); }

/* ---------- layout ---------- */
main { max-width: 1100px; margin: 0 auto; padding: 12px; }
/* ---------- banner slider (auto-slide, 2 slides) ---------- */
.banner-wrap { position: relative; border-radius: var(--radius); overflow: hidden; touch-action: pan-y; }
.banner-track { display: flex; transition: transform .55s ease; }
.banner-slide { flex: 0 0 100%; min-width: 0; }
.banner-img { width: 100%; display: block; }
/* Slide 2 keeps the exact box of the banner image (1798 x 875) */
.banner-offer {
  aspect-ratio: 1798 / 875;
  display: flex; align-items: center; gap: 4%;
  padding: 4% 5%;
  background:
    radial-gradient(120% 160% at 88% -20%, rgba(0,174,255,.38) 0%, rgba(0,174,255,0) 55%),
    radial-gradient(90% 130% at 8% 115%, rgba(0,102,255,.30) 0%, rgba(0,102,255,0) 55%),
    linear-gradient(118deg, #04070f 0%, #071527 42%, #0a2a5e 78%, #0b3d91 100%);
  color: #fff;
}
.banner-offer-logo {
  width: 21%; max-width: 190px; aspect-ratio: 1 / 1; flex: 0 0 auto;
  border-radius: 50%; object-fit: cover; background: #fff;
  border: 3px solid #35c4ff; box-shadow: 0 0 0 4px rgba(53,196,255,.25), 0 0 26px rgba(0,174,255,.55), 0 4px 14px rgba(0,0,0,.45);
}
.banner-offer-text { flex: 1; min-width: 0; }
.banner-offer-title {
  margin: 0 0 .35em; font-weight: 800; line-height: 1.2;
  font-size: clamp(1rem, 4.6vw, 2rem); color: #ffd54f;
}
.banner-offer-sub {
  margin: 0; line-height: 1.45; font-weight: 600;
  font-size: clamp(.72rem, 3vw, 1.08rem);
}
.banner-dots {
  position: absolute; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; gap: 6px; padding: 4px 8px; border-radius: 999px;
  background: rgba(5,20,35,.35); z-index: 2;
}
.banner-dot {
  width: 9px; height: 9px; border-radius: 50%; padding: 0; cursor: pointer;
  border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.35);
}
.banner-dot.active { background: #fff; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.badge { border-radius: 999px; padding: 7px 12px; font-weight: 700; font-size: .85rem; }
.badge-green { background: #d8f5e1; color: #0d6b31; }
.badge-blue { background: #dcecfb; color: #0d4f8a; }
/* ---------- trust strip (3 light-blue pills) ---------- */
.trust-strip { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 12px 0 0; }
.trust-pill {
  background: #dcecfb; color: #0d4f8a; text-align: center;
  border-radius: 12px; padding: 9px 4px; font-weight: 700; font-size: .82rem; line-height: 1.3;
}
.delivery-line { text-align: center; color: var(--muted); font-size: .82rem; margin: 7px 0 0; font-weight: 600; }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 2px 10px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; border: 2px solid var(--blue); background: #fff; color: var(--blue); border-radius: 999px; padding: 7px 15px; cursor: pointer; font-size: .9rem; font-weight: 700; }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.section-title { font-size: 1.28rem; font-weight: 800; margin: 18px 0 10px; }

/* ---------- product grid: 2 per row on mobile ---------- */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: var(--card); border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 3px 12px rgba(15,40,70,.10); display: flex; flex-direction: column;
}
.card-img { position: relative; aspect-ratio: 1 / 1; overflow: hidden; background: #f4f7fa; cursor: pointer; }
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.disc-badge {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--red); color: #fff; font-weight: 800; font-size: .78rem;
  padding: 3px 9px; border-radius: 8px; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.card-body { padding: 10px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card-brand { font-size: .72rem; letter-spacing: 1px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.card-name {
  font-weight: 700; font-size: .95rem; line-height: 1.3; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.6em;
}
.card-price { margin-top: 2px; display: flex; align-items: baseline; flex-wrap: wrap; }
.price-offer { color: var(--blue); font-weight: 800; font-size: 1.12rem; }
.price-regular { color: var(--muted); text-decoration: line-through; font-size: .85rem; margin-left: 6px; }
.save-badge { background: var(--amber); color: #fff; font-size: .7rem; font-weight: 800; border-radius: 6px; padding: 2px 6px; margin-left: 6px; vertical-align: middle; }
.price-soon { color: var(--amber); font-weight: 800; }
.stock-note { font-size: .8rem; color: var(--muted); }
.stock-out { color: var(--red); font-weight: 700; font-size: .8rem; }
.card-btns { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }
.card-btns .btn { flex: 1; padding: 9px 4px; font-size: .85rem; }
.btn-order {
  background: var(--orange); color: #fff; width: 100%;
  border-radius: 999px; padding: 11px 4px; font-size: .95rem;
  box-shadow: 0 2px 8px rgba(245,124,0,.35);
}
.btn-order:disabled { box-shadow: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 10px; padding: 10px 14px; cursor: pointer;
  font-weight: 700; font-size: .92rem; text-decoration: none; background: #e3eaf2; color: var(--text);
}
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-green { background: var(--green); color: #fff; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-outline { background: #fff; border: 2px solid var(--blue); color: var(--blue); }
.btn.big { width: 100%; padding: 14px; font-size: 1rem; margin-top: 10px; }
.back-btn { background: none; border: 0; color: var(--blue); font-weight: 700; font-size: 1rem; cursor: pointer; padding: 6px 0; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- product detail ---------- */
.detail-gallery-main { width: 100%; aspect-ratio: 1/1; object-fit: cover; border-radius: var(--radius); background: #fff; }
.detail-thumbs { display: flex; gap: 8px; margin: 8px 0; overflow-x: auto; }
.detail-thumbs img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; cursor: pointer; border: 2px solid transparent; }
.detail-thumbs img.active { border-color: var(--blue); }
.qty-row { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.qty-row button { width: 36px; height: 36px; border-radius: 50%; border: 1px solid #c8d6e4; background: #fff; font-size: 1.1rem; cursor: pointer; }

/* ---------- forms ---------- */
.form-card {
  background: var(--card); border-radius: var(--radius); padding: 16px;
  box-shadow: 0 2px 8px rgba(15,40,70,.08); margin: 12px 0;
}
.form-card label { display: block; font-weight: 600; margin-bottom: 12px; font-size: .92rem; }
.form-card input, .form-card select, .form-card textarea {
  width: 100%; margin-top: 5px; padding: 11px; border: 1px solid #c8d6e4;
  border-radius: 10px; font-size: 1rem; font-family: inherit; background: #fff;
}
.form-card label.check { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-card label.check input { width: auto; margin: 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.summary-box { background: #f0f6fd; border-radius: 10px; padding: 12px; font-size: .95rem; line-height: 1.7; }
.summary-box .total { font-weight: 800; font-size: 1.05rem; }

/* ---------- instant number-check box (checkout / order now) ---------- */
.num-check { border-radius: 10px; padding: 10px 12px; margin: -4px 0 12px; font-size: .9rem; font-weight: 600; line-height: 1.55; }
.num-check.nc-red { background: #fde7e7; border: 1px solid #f1a9a9; color: #8a0d0d; }
.num-check.nc-amber { background: #fff4e0; border: 1px solid #ffcc80; color: #7a4a00; }
.num-check.nc-green { background: #e2f5e9; border: 1px solid #9fd8b4; color: #0d6b31; }
.num-check.nc-new { background: #eef3f8; border: 1px solid #c8d6e4; color: #43566b; }
.risk-box { background: #fff4e0; border: 1px solid #ffcc80; border-radius: 10px; padding: 12px; margin-top: 12px; font-size: .92rem; line-height: 1.6; }
.status-pill { display: inline-block; border-radius: 999px; padding: 3px 10px; font-size: .78rem; font-weight: 800; background: #dcecfb; color: #0d4f8a; text-transform: capitalize; }
.status-pill.pending_payment, .status-pill.payment_submitted { background: #ffe0b2; color: #8a5200; }
.status-pill.delivered { background: #d8f5e1; color: #0d6b31; }
.status-pill.cancelled, .status-pill.refused { background: #fbdcdc; color: #8a0d0d; }

/* ---------- cart drawer ---------- */
.overlay { position: fixed; inset: 0; background: rgba(5,20,35,.55); z-index: 90; }
.drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: #fff; z-index: 100; padding: 16px; overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,.25);
}
.drawer-head { display: flex; justify-content: space-between; align-items: center; }
.cart-line { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #e6edf4; }
.cart-line img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.cart-line .grow { flex: 1; }
.cart-line .qty-row { margin: 4px 0; }
.cart-line .qty-row button { width: 28px; height: 28px; font-size: .95rem; }
.remove-link { background: none; border: 0; color: var(--red); cursor: pointer; font-size: .8rem; padding: 0; }

/* ---------- contact / footer ---------- */
.contact-card { background: var(--card); border-radius: var(--radius); padding: 18px; text-align: center; margin: 22px 0 6px; box-shadow: 0 2px 8px rgba(15,40,70,.08); }
.contact-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 10px; }
.footer { text-align: center; padding: 26px 14px 40px; max-width: 1100px; margin: 0 auto; }
.footer-logo { width: 74px; height: 74px; border-radius: 50%; object-fit: cover; }
.footer-name { font-weight: 800; font-size: 1.15rem; margin: 8px 0 4px; }

/* ---------- admin ---------- */
.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.tab-btn { border: 1px solid #c8d6e4; background: #fff; border-radius: 999px; padding: 9px 14px; cursor: pointer; font-weight: 600; }
.tab-btn.active { background: var(--navy); color: #fff; }
.order-card { background: #fff; border-radius: var(--radius); padding: 14px; margin: 10px 0; box-shadow: 0 2px 8px rgba(15,40,70,.08); font-size: .92rem; line-height: 1.55; }
.order-card h4 { margin: 0 0 6px; }
.order-card select { padding: 7px; border-radius: 8px; border: 1px solid #c8d6e4; }
.admin-product-row { display: flex; gap: 10px; align-items: center; background: #fff; border-radius: 10px; padding: 10px; margin: 8px 0; box-shadow: 0 1px 5px rgba(15,40,70,.07); }
.admin-product-row img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; }
.admin-product-row .grow { flex: 1; font-size: .9rem; }
.img-preview { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 12px; }
.img-preview img { width: 70px; height: 70px; object-fit: cover; border-radius: 8px; }
.flagged-row { display: flex; justify-content: space-between; align-items: center; background: #fff; border-radius: 10px; padding: 10px 14px; margin: 8px 0; }

/* ---------- mobile bottom navigation ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; background: #fff; border-top: 1px solid #dbe5f0;
  box-shadow: 0 -2px 10px rgba(15,40,70,.07);
  padding-bottom: env(safe-area-inset-bottom);
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 7px; font-size: .72rem; font-weight: 700; color: var(--muted);
  background: none; border: 0; cursor: pointer; text-decoration: none; font-family: inherit;
}
.bnav-item.active { color: var(--blue); }
.bnav-item.bnav-wa { color: #128c4b; }
@media (max-width: 768px) {
  body { padding-bottom: 64px; }
}
@media (min-width: 769px) {
  .bottom-nav { display: none; }
}

/* ---------- DARK MODE (class-driven: html.rey-dark) ----------
   Light mode above stays exactly as designed. These overrides apply ONLY
   when the <html> element carries the `rey-dark` class. JavaScript owns the
   decision (customer option: Light / Dark / Auto, saved as `rey-theme` in
   localStorage, default Auto = follow the phone via matchMedia; a tiny
   inline script in index.html sets the class before first paint).
   Palette: page #0f172a, surfaces #1e293b, text #f1f5f9, muted #94a3b8,
   bright price blue #60a5fa — all text pairs verified >= 4.5:1. */
  html.rey-dark {
    color-scheme: dark;
    --bg: #0f172a;
    --card: #1e293b;
    --text: #f1f5f9;
    --muted: #94a3b8;
  }

  /* header — same brand blue, deepened for dark surroundings */
  html.rey-dark .topbar {
    background: linear-gradient(180deg, #0a4494, #083a7d 55%, #062c5e);
    box-shadow: 0 2px 12px rgba(0,0,0,.5);
  }

  /* search */
  html.rey-dark .search-row input {
    background: #1e293b; border-color: #334155; color: var(--text);
    box-shadow: 0 2px 8px rgba(0,0,0,.35);
  }
  html.rey-dark .search-row input::placeholder { color: #94a3b8; }

  /* trust strip + badges */
  html.rey-dark .trust-pill { background: #1e3a5f; color: #bfdbfe; }
  html.rey-dark .badge-green { background: rgba(34,197,94,.18); color: #86efac; }
  html.rey-dark .badge-blue { background: #1e3a5f; color: #93c5fd; }

  /* category chips (active stays filled brand blue + white) */
  html.rey-dark .chip { background: #1e293b; border-color: #60a5fa; color: #93c5fd; }

  /* product cards */
  html.rey-dark .card { border: 1px solid #334155; box-shadow: 0 3px 12px rgba(0,0,0,.35); }
  html.rey-dark .card-img { background: #16233a; }
  html.rey-dark .price-offer { color: #60a5fa; }
  html.rey-dark .stock-out { color: #f87171; }
  html.rey-dark .error { color: #f87171; }
  html.rey-dark .remove-link { color: #f87171; }

  /* generic buttons */
  html.rey-dark .btn { background: #334155; color: var(--text); }
  html.rey-dark .btn-outline { background: #1e293b; border-color: #60a5fa; color: #93c5fd; }
  html.rey-dark .icon-btn.dark { background: #334155; color: var(--text); }
  html.rey-dark .back-btn { color: #60a5fa; }

  /* product detail */
  html.rey-dark .detail-gallery-main { background: #1e293b; }
  html.rey-dark .qty-row button { background: #1e293b; border-color: #475569; color: var(--text); }

  /* forms: checkout / order-now / track / admin / payment-ref */
  html.rey-dark .form-card { border: 1px solid #334155; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
  html.rey-dark .form-card input, html.rey-dark .form-card select, html.rey-dark .form-card textarea {
    background: #0f172a; border-color: #475569; color: var(--text);
  }
  html.rey-dark .form-card input::placeholder, html.rey-dark .form-card textarea::placeholder { color: #94a3b8; }
  html.rey-dark .summary-box { background: #16233a; }
  html.rey-dark .payDone { color: #4ade80 !important; }

  /* instant number-check boxes — same red/amber/green meaning, dark tints */
  html.rey-dark .num-check.nc-red { background: rgba(220,38,38,.18); border-color: rgba(248,113,113,.55); color: #fecaca; }
  html.rey-dark .num-check.nc-amber { background: rgba(245,158,11,.16); border-color: rgba(251,191,36,.5); color: #fde68a; }
  html.rey-dark .num-check.nc-green { background: rgba(34,197,94,.16); border-color: rgba(74,222,128,.5); color: #bbf7d0; }
  html.rey-dark .num-check.nc-new { background: #16233a; border-color: #475569; color: #cbd5e1; }
  html.rey-dark .risk-box { background: rgba(245,158,11,.16); border-color: rgba(251,191,36,.5); color: #fde68a; }

  /* order status pills */
  html.rey-dark .status-pill { background: #1e3a5f; color: #93c5fd; }
  html.rey-dark .status-pill.pending_payment, html.rey-dark .status-pill.payment_submitted { background: rgba(245,158,11,.22); color: #fcd34d; }
  html.rey-dark .status-pill.delivered { background: rgba(34,197,94,.20); color: #86efac; }
  html.rey-dark .status-pill.cancelled, html.rey-dark .status-pill.refused { background: rgba(220,38,38,.22); color: #fca5a5; }

  /* cart drawer */
  html.rey-dark .drawer { background: #1e293b; box-shadow: -4px 0 20px rgba(0,0,0,.5); }
  html.rey-dark .cart-line { border-bottom-color: #334155; }

  /* admin */
  html.rey-dark .tab-btn { background: #1e293b; border-color: #475569; color: var(--text); }
  html.rey-dark .order-card { background: #1e293b; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
  html.rey-dark .order-card select { background: #0f172a; border-color: #475569; color: var(--text); }
  html.rey-dark .admin-product-row { background: #1e293b; box-shadow: 0 1px 5px rgba(0,0,0,.35); }
  html.rey-dark .flagged-row { background: #1e293b; }

  /* contact card shadow on dark */
  html.rey-dark .contact-card { box-shadow: 0 2px 8px rgba(0,0,0,.35); }

  /* mobile bottom navigation */
  html.rey-dark .bottom-nav {
    background: #1e293b; border-top-color: #334155;
    box-shadow: 0 -2px 10px rgba(0,0,0,.4);
  }
  html.rey-dark .bnav-item.active { color: #60a5fa; }
  html.rey-dark .bnav-item.bnav-wa { color: #4ade80; }

/* ---------- theme option (Light / Dark / Auto) ---------- */
.theme-wrap { position: relative; flex: 0 0 auto; }
.theme-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 80;
  min-width: 188px; padding: 6px; border-radius: 14px;
  background: var(--card); color: var(--text);
  border: 1px solid rgba(120,140,160,.35);
  box-shadow: 0 12px 32px rgba(4,20,40,.28);
}
.theme-item {
  display: flex; align-items: center; gap: 9px; width: 100%;
  background: none; border: 0; border-radius: 9px; cursor: pointer;
  padding: 9px 10px; font-family: inherit; font-size: .92rem;
  color: var(--text); text-align: left;
}
.theme-item:hover { background: rgba(127,150,175,.16); }
.theme-item .theme-check { margin-left: auto; color: var(--blue); font-weight: 800; visibility: hidden; }
.theme-item.active { font-weight: 700; }
.theme-item.active .theme-check { visibility: visible; }
html.rey-dark .theme-menu { border-color: #334155; box-shadow: 0 12px 32px rgba(0,0,0,.55); }
html.rey-dark .theme-item .theme-check { color: #60a5fa; }
.footer-theme { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 16px 0 2px; }
.theme-choice {
  border: 1px solid #c9d6e4; background: var(--card); color: var(--text);
  border-radius: 999px; padding: 7px 14px; cursor: pointer;
  font-family: inherit; font-size: .85rem;
}
.theme-choice.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
html.rey-dark .theme-choice { border-color: #475569; }
html.rey-dark .theme-choice.active { background: var(--blue); border-color: var(--blue); color: #fff; }
