/* ================================================================
   HCBNL — Power for Africa  |  custom.css
   ================================================================
   RULES (enforced forever):
   1. One selector block per component. Dark-mode variant just below.
   2. All colours/spacing use CSS variables — never raw hex in rules.
   3. Numbered §1–§22. New sections go at END, never in-between.
   4. NEVER APPEND — edit the existing numbered section.
   ================================================================ */


/* ────────────────────────────────────────────────────────────────
   §1  DESIGN TOKENS
──────────────────────────────────────────────────────────────── */
:root {
  --gold:      #d4a64a;
  --gold-dk:   #b8922f;
  --gold-tint: rgba(212,166,74,.14);

  --bg:        #ffffff;
  --bg-card:   #ffffff;
  --bg-subtle: #f5f5f5;
  --bg-input:  #ffffff;
  --text:      #111111;
  --text-muted:#777777;
  --border:    #e5e5e5;

  --sh-xs: 0 1px 4px  rgba(0,0,0,.06);
  --sh-sm: 0 2px 10px rgba(0,0,0,.07);
  --sh:    0 4px 22px rgba(0,0,0,.10);
  --sh-lg: 0 10px 42px rgba(0,0,0,.14);

  --nav-h: 68px;
  --bot-h: 60px;

  --r-lg: 14px;
  --r:    10px;
  --r-sm:  7px;

  --font: 'DM Sans', sans-serif;
  --t: 0.2s ease;
}
body.dark-mode {
  --bg:        #111111;
  --bg-card:   #1c1c1c;
  --bg-subtle: #242424;
  --bg-input:  #1e1e1e;
  --text:      #e8e8e8;
  --text-muted:#888888;
  --border:    #303030;
  --sh-xs: 0 1px 4px  rgba(0,0,0,.35);
  --sh-sm: 0 2px 10px rgba(0,0,0,.40);
  --sh:    0 4px 22px rgba(0,0,0,.50);
  --sh-lg: 0 10px 42px rgba(0,0,0,.65);
}


/* ────────────────────────────────────────────────────────────────
   §2  RESET & BASE
──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background-color: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bot-h) + env(safe-area-inset-bottom, 0px));
  transition: background-color var(--t), color var(--t);
}
/* Home page: hero sits flush under transparent navbar */
body.page-home { padding-top: 0; }
@media (min-width: 992px) { body { padding-bottom: 0; } }

img   { display: block; max-width: 100%; }
a     { color: inherit; text-decoration: none; }
a:hover { color: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 700; color: var(--text); }
p  { color: var(--text-muted); margin-bottom: 0; }
.text-gold  { color: var(--gold) !important; }
.text-muted { color: var(--text-muted) !important; }


/* ────────────────────────────────────────────────────────────────
   §3  NAVBAR
──────────────────────────────────────────────────────────────── */
.navbar {
  height: var(--nav-h);
  padding-top: 0; padding-bottom: 0;
  background-color: #111 !important;
  border-bottom: 1px solid rgba(255,255,255,.05);
  z-index: 1050;
}
.navbar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 0; text-decoration: none; white-space: nowrap;
}
.navbar-brand-image {
  width: 42px; height: 42px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex-shrink: 0;
}
.navbar-brand-text {
  color: #fff; font-size: 17px; font-weight: 700; line-height: 1.2;
}
.navbar-brand-text small {
  display: block; font-size: 8.5px; font-weight: 400;
  letter-spacing: 1.8px; text-transform: uppercase;
  color: var(--gold); margin-top: 1px;
}
.navbar-nav .nav-link {
  color: rgba(255,255,255,.78); font-size: 14.5px; font-weight: 500;
  padding: 6px 15px; border-radius: var(--r-sm);
  transition: color var(--t);
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { color: var(--gold); }

.nav-icon-btn {
  position: relative;
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08); border: none; border-radius: 50%;
  color: #fff; font-size: 16px;
  cursor: pointer; flex-shrink: 0;
  text-decoration: none;
  transition: background var(--t);
}
.nav-icon-btn:hover,
.nav-icon-btn:focus { background: rgba(255,255,255,.17); color: #fff; outline: none; }

.cart-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 16px; height: 16px; padding: 0 3px;
  background: var(--gold); color: #000;
  font-size: 9px; font-weight: 700;
  border-radius: 8px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}

.nav-account-link {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.08); border-radius: 50%;
  color: #fff; font-size: 17px; flex-shrink: 0;
  text-decoration: none; transition: background var(--t);
}
.nav-account-link:hover { background: rgba(255,255,255,.17); color: #fff; }

.nav-user-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold); color: #000;
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255,255,255,.2);
  cursor: pointer; flex-shrink: 0;
}
.nav-user-btn {
  background: none; border: none;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; padding: 0;
}
.nav-user-btn::after { display: none; }
.nav-user-name { color: #fff; font-size: 13px; font-weight: 600; }

.dropdown-menu {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--r); box-shadow: var(--sh-lg);
  padding: 8px 0; min-width: 210px;
}
.dropdown-user-info {
  display: block; padding: 6px 16px 10px;
  font-size: 11px; color: var(--text-muted);
  border-bottom: 1px solid var(--border); margin-bottom: 4px;
}
.dropdown-item {
  padding: 9px 16px; font-size: 13px; color: var(--text);
  display: flex; align-items: center; gap: 10px;
  transition: background var(--t);
}
.dropdown-item:hover { background: var(--bg-subtle); color: var(--text); }
.dropdown-item.text-danger { color: #dc3545; }
.dropdown-item.text-danger:hover { background: #fff5f5; }
body.dark-mode .dropdown-item.text-danger:hover { background: #2a1212; }


/* ────────────────────────────────────────────────────────────────
   §4  MOBILE BOTTOM NAV
──────────────────────────────────────────────────────────────── */
.mobile-bottom-nav {
  display: flex; position: fixed;
  bottom: 0; left: 0; right: 0;
  height: calc(var(--bot-h) + env(safe-area-inset-bottom, 0px));
  background: #111; border-top: 1px solid #222; z-index: 1040;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  /* Chrome on iOS needs explicit -webkit- prefix for safe-area */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
@supports (padding-bottom: constant(safe-area-inset-bottom)) {
  .mobile-bottom-nav {
    height: calc(var(--bot-h) + constant(safe-area-inset-bottom));
    padding-bottom: constant(safe-area-inset-bottom);
  }
}
@media (min-width: 992px) { .mobile-bottom-nav { display: none !important; } }

.bottom-item {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; padding: 6px 0; position: relative;
  text-decoration: none; color: rgba(255,255,255,.45);
  font-size: 9px; font-weight: 500; transition: color var(--t);
}
.bottom-item i { font-size: 20px; }
.bottom-item.active, .bottom-item:hover { color: var(--gold); }
.cart-count-mobile {
  position: absolute; top: 4px; right: calc(50% - 20px);
  width: 15px; height: 15px;
  background: var(--gold); color: #000;
  font-size: 8px; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}


/* ────────────────────────────────────────────────────────────────
   §5  MOBILE ACCOUNT SLIDE-UP SHEET
   BUG FIX: JS adds/removes "open" class on .mob-acct-sheet (the
   outer wrapper). CSS transitions MUST be scoped to that selector.
──────────────────────────────────────────────────────────────── */
.mob-acct-backdrop {
  position: fixed; inset: 0; z-index: 2999;
  background: rgba(0,0,0,.55);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.mob-acct-sheet {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 3000; pointer-events: none;
}
/* Trigger states via the parent .mob-acct-sheet.open */
.mob-acct-sheet.open                    { pointer-events: all; }
.mob-acct-sheet.open .mob-acct-backdrop { opacity: 1; pointer-events: all; }
.mob-acct-sheet.open .mob-acct-panel    { transform: translateY(0); }

.mob-acct-panel {
  position: relative; z-index: 3000;
  background: var(--bg-card);
  border-radius: 18px 18px 0 0;
  padding: 14px 20px max(28px, env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(.32,1,.23,1);
}
.mob-acct-handle {
  width: 36px; height: 4px; background: var(--border);
  border-radius: 2px; margin: 0 auto 16px;
}
.mob-acct-user    { text-align: center; margin-bottom: 12px; }
.mob-acct-avatar, .mob-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--gold); color: #000;
  font-size: 20px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 8px;
}
.mob-acct-name  { font-weight: 700; font-size: 15px; color: var(--text); }
.mob-acct-email { font-size: 12px; color: var(--text-muted); }
.mob-acct-actions { border-top: 1px solid var(--border); margin-top: 10px; }
.mob-acct-btn {
  display: flex; align-items: center; gap: 12px;
  width: 100%; padding: 14px 0;
  border: none; border-bottom: 1px solid var(--border);
  background: none; color: var(--text);
  font-size: 15px; font-weight: 500;
  text-decoration: none; cursor: pointer; font-family: var(--font);
  transition: color var(--t);
}
.mob-acct-btn:last-child  { border-bottom: none; }
.mob-acct-btn:hover       { color: var(--gold); }
.mob-acct-signout         { color: #dc3545 !important; }
.mob-acct-signout:hover   { color: #a82020 !important; }


/* ────────────────────────────────────────────────────────────────
   §6  SEARCH OVERLAY — fully theme-responsive
   INPUT background is set explicitly to var(--bg-card), NOT
   "transparent", because browsers can inject white on transparent
   inputs in dark mode (iOS Safari, some Chromium versions).
──────────────────────────────────────────────────────────────── */
.search-overlay {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,.60);
  align-items: flex-start; justify-content: center;
  padding-top: 78px;
}
.search-overlay.open,
.search-overlay.active { display: flex; }

.search-container {
  width: min(580px, calc(100vw - 20px));
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-lg);
}
.search-input-row {
  display: flex; align-items: center;
  padding: 0 14px; border-bottom: 1px solid var(--border);
}
.search-input-icon { color: var(--text-muted); font-size: 15px; flex-shrink: 0; }

#searchInput,
.search-container input[type="text"] {
  flex: 1; border: none; outline: none;
  background: var(--bg-card);
  color: var(--text);
  font-family: var(--font); font-size: 15px; padding: 15px 12px;
  -webkit-appearance: none;
}
#searchInput::placeholder,
.search-container input[type="text"]::placeholder { color: var(--text-muted); }

.search-close-btn {
  background: none; border: none; color: var(--text-muted);
  font-size: 17px; padding: 8px; cursor: pointer; flex-shrink: 0;
  transition: color var(--t);
}
.search-close-btn:hover { color: var(--text); }

.search-results {
  padding: 6px 0; max-height: 380px; overflow-y: auto;
  background: var(--bg-card);
}
.search-spinner { padding: 18px; text-align: center; }
.search-empty   { padding: 16px; font-size: 13px; color: var(--text-muted); }

.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; color: var(--text);
  text-decoration: none; transition: background var(--t);
}
.search-result-item:hover { background: var(--bg-subtle); }
.search-result-img-wrap {
  width: 46px; height: 46px; border-radius: var(--r-sm);
  background: var(--bg-subtle); overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.search-result-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.search-result-info  { flex: 1; min-width: 0; }
.search-result-name  { font-weight: 600; font-size: 13px; color: var(--text); line-height: 1.3; }
.search-result-cat   { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.search-result-price { font-size: 12px; color: var(--gold); font-weight: 700; margin-top: 2px; }
.search-see-all {
  display: block; padding: 12px 16px; font-size: 13px;
  color: var(--gold); border-top: 1px solid var(--border);
  background: var(--bg-card); text-decoration: none;
  transition: background var(--t);
}
.search-see-all:hover { background: var(--bg-subtle); }
mark { background: rgba(212,166,74,.22); border-radius: 2px; padding: 0 2px; color: inherit; }


/* ────────────────────────────────────────────────────────────────
   §7  HERO CAROUSEL
   body.page-home removes top padding so carousel occupies y=0.
   No negative-margin tricks — clean, predictable on all browsers.

   Backward-compatible aliases (.hero-slide, .hcbnl-carousel-wrap)
   map to the new names so existing HTML works without touching it.
──────────────────────────────────────────────────────────────── */
.hcbnl-hero-wrap,
.hcbnl-carousel-wrap { width: 100%; overflow: hidden; position: relative; }

/* Each slide */
.hcbnl-slide,
.hero-slide {
  position: relative;
  display: block; width: 100%; height: 540px;
  overflow: hidden; background: #1a1a2e;
}
@media (max-width: 767px) {
  .hcbnl-slide, .hero-slide { height: 430px; }
}
@media (min-width: 1400px) {
  .hcbnl-slide, .hero-slide { height: 620px; }
}

/* Hero photo — fills the slide absolutely, no layout impact */
.hcbnl-slide__img,
.hero-slide-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.hcbnl-slide__img--desk, .hero-slide-desktop { display: block; }
.hcbnl-slide__img--mob,  .hero-slide-mobile  { display: none;  }
@media (max-width: 767px) {
  .hcbnl-slide__img--desk, .hero-slide-desktop { display: none;  }
  .hcbnl-slide__img--mob,  .hero-slide-mobile  { display: block; }
}

/* Gradient scrim */
.hcbnl-slide__scrim,
.hero-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(105deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.22) 60%, transparent 100%);
}

/* Caption — above the bottom, clear of the mobile bottom nav */
.hcbnl-slide__body,
.hero-caption {
  position: absolute; bottom: 72px; left: 0; right: 0; z-index: 2;
  padding: 0 max(16px, calc((100% - 1200px) / 2 + 24px));
}
@media (max-width: 767px) {
  .hcbnl-slide__body,
  .hero-caption { bottom: 40px; padding: 0 20px; }
}
.hcbnl-slide__body h1, .hero-caption h1 {
  color: #fff; font-size: clamp(26px, 5vw, 56px); font-weight: 700;
  line-height: 1.1; margin-bottom: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
.hcbnl-slide__body p, .hero-caption p {
  color: rgba(255,255,255,.88); font-size: clamp(13px, 2vw, 18px);
  margin-bottom: 22px;
}

.btn-hero {
  display: inline-block; background: var(--gold); color: #000;
  font-weight: 700; font-size: 15px; padding: 13px 32px;
  border-radius: var(--r); text-decoration: none;
  transition: background var(--t), transform var(--t);
}
.btn-hero:hover { background: var(--gold-dk); color: #000; transform: translateY(-2px); }

.carousel-indicators {
  bottom: 16px;
  gap: 6px;
  margin: 0;
  align-items: center;
  padding: 0;
}
/* Use !important on every property Bootstrap hardcodes on indicators */
.carousel-indicators [data-bs-target] {
  box-sizing: border-box !important;
  width: 8px !important;
  height: 8px !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.45) !important;
  border: none !important;
  border-top: none !important;
  border-bottom: none !important;
  opacity: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  flex-shrink: 0;
  transition: background 0.2s ease, width 0.25s ease, border-radius 0.25s ease !important;
}
/* Active pill — overrides the dot */
.carousel-indicators .active {
  background: var(--gold) !important;
  width: 28px !important;
  border-radius: 4px !important;
}
.carousel-control-prev, .carousel-control-next { display: none !important; }


/* ────────────────────────────────────────────────────────────────
   §8  CATEGORY CARDS
   Prefixed .hcbnl-cat-* (new); old names kept as aliases.
   Add a real <img> as first child when you have photos — the CSS
   handles both gradient-only and photo modes automatically.
──────────────────────────────────────────────────────────────── */
.hcbnl-cat-large, .hcbnl-cat-card,
.category-large,  .category-card {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--r-lg); background: #1a1a2e;
  text-decoration: none; cursor: pointer;
}
.hcbnl-cat-large, .category-large { height: 230px; margin-bottom: 14px; }
.hcbnl-cat-card,  .category-card  { height: 148px; }
@media (max-width: 767px) {
  .hcbnl-cat-large, .category-large { height: 190px; }
  .hcbnl-cat-card,  .category-card  { height: 120px; }
}
.hcbnl-cat-grid, .category-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Real photo child — absolutely fills its card */
.hcbnl-cat-large > img, .hcbnl-cat-card > img,
.category-large > img,  .category-card > img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform 0.45s ease;
}
.hcbnl-cat-large:hover > img, .hcbnl-cat-card:hover > img,
.category-large:hover  > img, .category-card:hover  > img { transform: scale(1.06); }

/* Gradient / icon fallback */
.hcbnl-cat-bg, .cat-bg {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.hcbnl-cat-scrim, .category-overlay {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(0,0,0,.04) 0%, rgba(0,0,0,.60) 100%);
}
.hcbnl-cat-label, .category-label {
  position: absolute; bottom: 14px; left: 16px; z-index: 2;
  color: #fff; font-weight: 700; font-size: 15px;
  text-shadow: 0 1px 5px rgba(0,0,0,.5);
}
@media (max-width: 767px) {
  .hcbnl-cat-label, .category-label { font-size: 12px; bottom: 10px; left: 12px; }
}


/* ────────────────────────────────────────────────────────────────
   §9  PRODUCT CARDS (shop grid)
──────────────────────────────────────────────────────────────── */
.product-card {
  border-radius: var(--r-lg); overflow: hidden;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: box-shadow var(--t), transform var(--t);
}
.product-card:hover { box-shadow: var(--sh-lg); transform: translateY(-3px); }

.product-img-wrap {
  display: block; width: 100%; height: 170px;
  overflow: hidden; background: var(--bg-subtle);
  flex-shrink: 0; position: relative;
}
@media (min-width: 768px) { .product-img-wrap { height: 210px; } }

.product-img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
  transition: transform 0.3s ease;
}
.product-img-wrap:hover .product-img { transform: scale(1.05); }

.product-info { padding: 10px 12px 14px; flex: 1; }
.product-name {
  font-weight: 600; font-size: 13px; line-height: 1.35; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.product-price { color: var(--gold); font-weight: 700; font-size: 15px; }


/* ────────────────────────────────────────────────────────────────
   §10  PRODUCT DETAIL — IMAGE GALLERY
   NEW namespace: .hcbnl-gallery-* avoids any collision.
   Old names (.product-img-outer, .product-main-img, etc.) are
   kept as aliases so product.html needs no HTML changes.

   DESIGN:
   • Outer box uses aspect-ratio:1/1 — height derives from width.
   • Image uses position:absolute with explicit inset, NOT inset
     shorthand (iOS Safari < 14 doesn't support inset shorthand).
   • Mobile caps max-height so the image doesn't eat the viewport.
──────────────────────────────────────────────────────────────── */
.hcbnl-gallery-outer,
.product-img-outer {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--bg-subtle);
  border-radius: var(--r-lg);
}
@media (max-width: 767px) {
  .hcbnl-gallery-outer,
  .product-img-outer { max-height: 75vw; }
}
/* Fallback for aspect-ratio-unaware browsers */
@supports not (aspect-ratio: 1 / 1) {
  .hcbnl-gallery-outer::before,
  .product-img-outer::before {
    content: ''; display: block; padding-top: 100%;
  }
}

/* Main image — fills outer absolutely */
.hcbnl-gallery-main,
.product-main-img {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;  /* NOT inset — iOS compat */
  width: 100%; height: 100%;
  object-fit: contain; display: block;
}

/* Thumbnail strip */
.hcbnl-thumb-track,
.product-thumb-track {
  display: flex; flex-direction: row;
  gap: 10px; overflow-x: auto; overflow-y: hidden;
  padding: 10px 2px 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.hcbnl-thumb-track::-webkit-scrollbar,
.product-thumb-track::-webkit-scrollbar { display: none; }

.hcbnl-thumb,
.product-thumb {
  flex: 0 0 68px; width: 68px; height: 68px;
  border-radius: var(--r-sm); object-fit: cover;
  cursor: pointer; border: 2px solid transparent;
  background: var(--bg-subtle); scroll-snap-align: start;
  display: block;
  transition: border-color 0.15s;
}
.hcbnl-thumb:hover, .hcbnl-thumb.active,
.product-thumb:hover, .product-thumb.active { border-color: var(--gold); }


/* ────────────────────────────────────────────────────────────────
   §11  FORMS & INPUTS
──────────────────────────────────────────────────────────────── */
.form-control, .form-select {
  background-color: var(--bg-input); border: 1.5px solid var(--border);
  border-radius: var(--r-sm); color: var(--text);
  font-family: var(--font); font-size: 14px; padding: 10px 14px;
  transition: border-color var(--t), box-shadow var(--t);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:focus, .form-select:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-tint);
  background-color: var(--bg-input); color: var(--text); outline: none;
}
.form-label       { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 5px; }
.input-group-text { background: var(--bg-subtle); border-color: var(--border); color: var(--text-muted); }


/* ────────────────────────────────────────────────────────────────
   §12  BUTTONS
──────────────────────────────────────────────────────────────── */
.btn {
  font-family: var(--font); font-weight: 600; font-size: 14px;
  border-radius: var(--r-sm); padding: 10px 20px;
  transition: all var(--t); cursor: pointer;
}
.btn-warning { background-color: var(--gold); border-color: var(--gold); color: #000 !important; }
.btn-warning:hover { background-color: var(--gold-dk); border-color: var(--gold-dk); }
.btn-dark    { background-color: #1a1a1a; border-color: #1a1a1a; color: #fff; }
.btn-dark:hover { background-color: #333; border-color: #333; }
.btn-outline-dark { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline-dark:hover { background: var(--text); color: var(--bg); border-color: var(--text); }

.btn-outline-dark[data-category], .btn-dark[data-category] { border-radius: 20px; font-size: 13px; padding: 6px 16px; }
.btn-dark[data-category], button[data-category].active {
  background: var(--gold) !important; border-color: var(--gold) !important; color: #000 !important;
}
[data-payment]        { transition: all var(--t); }
[data-payment].active { background: var(--gold) !important; border-color: var(--gold) !important; color: #000 !important; }


/* ────────────────────────────────────────────────────────────────
   §13  BOOTSTRAP CARD OVERRIDE
──────────────────────────────────────────────────────────────── */
.card        { background: var(--bg-card); border-color: var(--border); border-radius: var(--r-lg); color: var(--text); }
.card-header { background: var(--bg-subtle); border-color: var(--border); }
.card-body   { color: var(--text); }


/* ────────────────────────────────────────────────────────────────
   §14  CART
──────────────────────────────────────────────────────────────── */
.cart-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 0; border-bottom: 1px solid var(--border); }
.cart-item-img { width: 72px; height: 72px; border-radius: var(--r); object-fit: cover; flex-shrink: 0; background: var(--bg-subtle); }
.cart-item-name  { font-weight: 600; font-size: 14px; color: var(--text); }
.cart-item-price { color: var(--gold); font-weight: 700; }
.qty-btn {
  width: 32px; height: 32px; border-radius: 7px;
  border: 1.5px solid var(--border); background: var(--bg-card); color: var(--text);
  font-size: 16px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: border-color var(--t);
}
.qty-btn:hover { border-color: var(--gold); }
.btn-cart-remove {
  background: none; border: none; color: #dc3545;
  font-size: 16px; cursor: pointer; padding: 4px; transition: color var(--t);
}
.btn-cart-remove:hover { color: #a82020; }
.cart-summary-card { background: var(--bg-subtle); border-radius: var(--r-lg); padding: 20px; border: 1px solid var(--border); }


/* ────────────────────────────────────────────────────────────────
   §15  CHECKOUT
──────────────────────────────────────────────────────────────── */
.checkout-card { background: var(--bg-card); border-radius: var(--r-lg); padding: 24px; border: 1px solid var(--border); box-shadow: var(--sh-xs); }
.checkout-section-title { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 16px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); display: inline-block; }


/* ────────────────────────────────────────────────────────────────
   §16  MY ORDERS
──────────────────────────────────────────────────────────────── */
.order-card { background: var(--bg-card); border-radius: var(--r-lg); border: 1px solid var(--border); padding: 16px; margin-bottom: 12px; transition: box-shadow var(--t); }
.order-card:hover { box-shadow: var(--sh); }
.status-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; text-transform: capitalize; }
.status-pending   { background: #fff3cd; color: #856404; }
.status-confirmed { background: #d1ecf1; color: #0c5460; }
.status-shipped   { background: #d4edda; color: #155724; }
.status-delivered { background: #c3e6cb; color: #155724; }
.status-cancelled { background: #f8d7da; color: #721c24; }


/* ────────────────────────────────────────────────────────────────
   §17  ACCOUNT PAGE
──────────────────────────────────────────────────────────────── */
.account-page-section { min-height: calc(100vh - var(--nav-h)); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px 60px; }
.account-page-card { background: var(--bg-card); border-radius: var(--r-lg); box-shadow: var(--sh); border: 1px solid var(--border); padding: 30px 26px; width: 100%; max-width: 440px; }
.auth-tabs { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.auth-tab { flex: 1; background: none; border: none; padding: 10px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all var(--t); font-family: var(--font); }
.auth-tab.active { color: var(--text); border-color: var(--gold); }
.social-clean.google-sign-in { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; background: var(--bg-input); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 10px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; font-family: var(--font); transition: border-color var(--t); }
.social-clean.google-sign-in:hover { border-color: var(--gold); }
.divider-clean { display: flex; align-items: center; gap: 12px; color: var(--text-muted); font-size: 12px; margin: 14px 0; }
.divider-clean::before, .divider-clean::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.forgot-link { font-size: 12px; color: var(--gold); }
.login-btn { width: 100%; background: var(--gold); color: #000; border: none; border-radius: var(--r-sm); font-weight: 700; font-size: 15px; padding: 12px; cursor: pointer; font-family: var(--font); transition: background var(--t); }
.login-btn:hover { background: var(--gold-dk); }
.profile-avatar { width: 70px; height: 70px; border-radius: 50%; background: var(--gold); color: #000; font-size: 26px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto; }
.profile-action-btn { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); color: var(--text); font-size: 14px; font-weight: 500; text-decoration: none; transition: color var(--t); }
.profile-action-btn:hover { color: var(--gold); }
.profile-action-btn i:first-child { font-size: 18px; width: 22px; }
.logout-page-btn { background: none; border: 1.5px solid #dc3545; color: #dc3545; border-radius: var(--r-sm); padding: 10px 20px; font-weight: 600; font-size: 14px; cursor: pointer; width: 100%; font-family: var(--font); transition: all var(--t); }
.logout-page-btn:hover { background: #dc3545; color: #fff; }
.profile-tabs { display: flex; background: var(--bg-subtle); border-radius: var(--r); padding: 3px; margin-bottom: 20px; }
.profile-tab { flex: 1; background: none; border: none; padding: 8px 4px; font-size: 12px; font-weight: 600; color: var(--text-muted); border-radius: var(--r-sm); cursor: pointer; font-family: var(--font); transition: all var(--t); }
.profile-tab.active { background: var(--bg-card); color: var(--text); box-shadow: var(--sh-xs); }
.referral-card { background: var(--bg-subtle); border-radius: var(--r); padding: 18px; border: 1px solid var(--border); }
.referral-code-box { display: flex; align-items: center; justify-content: space-between; background: var(--bg-card); border: 1.5px dashed var(--gold); border-radius: var(--r-sm); padding: 10px 14px; font-size: 18px; font-weight: 700; letter-spacing: 1px; color: var(--text); }


/* ────────────────────────────────────────────────────────────────
   §18  REVIEWS
──────────────────────────────────────────────────────────────── */
.star-picker { display: flex; gap: 6px; font-size: 24px; cursor: pointer; }
.star-pick   { color: var(--border); cursor: pointer; transition: color 0.1s; }
.star-pick.bi-star-fill { color: var(--gold); }
.review-card { padding: 16px; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 12px; }
.review-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--gold); color: #000; font-size: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }


/* ────────────────────────────────────────────────────────────────
   §19  FOOTER
──────────────────────────────────────────────────────────────── */
.haiqing-footer { background: #0e0e0e; color: rgba(255,255,255,.60); padding: 52px 0 36px; font-size: 14px; line-height: 1.7; }
body.dark-mode .haiqing-footer { background: #080808; }
.haiqing-footer a { color: rgba(255,255,255,.60); text-decoration: none; transition: color var(--t); }
.haiqing-footer a:hover { color: var(--gold); }
.haiqing-footer p { margin-bottom: 8px; color: rgba(255,255,255,.60); }
.haiqing-footer h6 { color: rgba(255,255,255,.90); font-size: 13px; margin-bottom: 12px; }
.footer-social { display: flex; justify-content: center; gap: 10px; margin-bottom: 36px; }
.footer-social a { width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; font-size: 17px; transition: background var(--t), color var(--t); }
.footer-social a:hover { background: var(--gold); color: #000; }
.footer-toggle { background: none; border: none; color: rgba(255,255,255,.85); font-size: 13px; font-weight: 700; padding: 0 0 12px; display: block; width: 100%; text-align: left; cursor: pointer; text-transform: uppercase; letter-spacing: .5px; font-family: var(--font); }
.footer-toggle::after { content: '\F282'; font-family: bootstrap-icons; float: right; transition: transform var(--t); }
@media (min-width: 768px) { .footer-toggle::after { display: none; } .footer-toggle { pointer-events: none; } }
.footer-line { border-color: rgba(255,255,255,.10); margin: 28px 0 18px; }
.footer-copy { color: rgba(255,255,255,.28); font-size: 12px; }
@media (max-width: 991px) { .haiqing-footer { padding-bottom: 80px; } }


/* ────────────────────────────────────────────────────────────────
   §20  INFO PAGES
──────────────────────────────────────────────────────────────── */
.info-page-content          { line-height: 1.8; }
.info-page-content h5       { margin-top: 28px; margin-bottom: 8px; color: var(--text); }
.info-page-content p        { color: var(--text-muted); }


/* ────────────────────────────────────────────────────────────────
   §21  UTILITY
──────────────────────────────────────────────────────────────── */
.top-padding    { padding-top: 24px; }
.eshop-section  { padding: 20px 0 32px; }
.spinner-border { color: var(--gold); }
.alert-light    { background: var(--bg-subtle); border-color: var(--border); color: var(--text); }
.qty-control    { display: flex; align-items: center; gap: 10px; }
.qty-value      { font-weight: 700; font-size: 18px; min-width: 28px; text-align: center; color: var(--text); }
.category-section { max-width: 1100px; }


/* ────────────────────────────────────────────────────────────────
   §22  DARK-MODE — Bootstrap component overrides
──────────────────────────────────────────────────────────────── */
body.dark-mode .modal-content    { background: var(--bg-card); border-color: var(--border); }
body.dark-mode .modal-header     { border-color: var(--border); }
body.dark-mode .modal-footer     { border-color: var(--border); }
body.dark-mode .input-group-text { background: var(--bg-subtle); border-color: var(--border); color: var(--text-muted); }
body.dark-mode .alert-light      { background: var(--bg-subtle); border-color: var(--border); color: var(--text); }
body.dark-mode hr                { border-color: var(--border); opacity: 1; }
body.dark-mode .dropdown-divider { border-color: var(--border); }
body.dark-mode .border           { border-color: var(--border) !important; }
body.dark-mode .border-bottom    { border-color: var(--border) !important; }
body.dark-mode .bg-light, body.dark-mode .bg-white { background-color: var(--bg-card) !important; }
body.dark-mode .btn-outline-secondary { border-color: var(--border); color: var(--text-muted); background: transparent; }
body.dark-mode .btn-outline-secondary:hover { background: var(--bg-subtle); color: var(--text); }
body.dark-mode .table { color: var(--text); border-color: var(--border); }
body.dark-mode .table > :not(caption) > * > * { background-color: transparent; color: var(--text); border-color: var(--border); }



/* ────────────────────────────────────────────────────────────────
   §24  PROMO HERO BANNER
──────────────────────────────────────────────────────────────── */
.promo-banner {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #111;
  margin-bottom: 0;
}

/* Aspect ratio: 3:1 desktop, 4:3 mobile */
.promo-banner-inner {
  position: relative;
  width: 100%;
  padding-top: 33.33%;   /* 3:1 */
}
@media (max-width: 767px) {
  .promo-banner-inner { padding-top: 75%; } /* 4:3 */
}

.promo-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform .6s ease;
}
.promo-banner:hover .promo-banner-img { transform: scale(1.02); }

/* Gradient overlay — darker on left for text legibility */
.promo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(0,0,0,.72) 0%,
    rgba(0,0,0,.45) 45%,
    rgba(0,0,0,.08) 100%
  );
}

/* Content */
.promo-banner-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 7%;
  max-width: 560px;
}
.promo-banner-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(212,166,74,.15);
  border: 1px solid rgba(212,166,74,.3);
  border-radius: 20px;
  padding: 4px 12px;
  margin-bottom: 12px;
  width: fit-content;
}
.promo-banner-title {
  font-size: clamp(20px, 3.5vw, 42px);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 10px;
}
.promo-banner-sub {
  font-size: clamp(12px, 1.5vw, 16px);
  color: rgba(255,255,255,.75);
  margin-bottom: 20px;
  line-height: 1.5;
}
.promo-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--gold);
  color: #111;
  font-weight: 700;
  font-size: clamp(12px, 1.2vw, 14px);
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  width: fit-content;
  transition: background .2s, transform .15s;
}
.promo-banner-btn:hover {
  background: var(--gold-dk);
  color: #111;
  transform: translateY(-1px);
}

/* Fallback gradient when no image is set */
.promo-banner-fallback {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* Section wrapper for spacing */
.promo-section {
  padding: 40px 0 0;
}
@media (max-width: 767px) { .promo-section { padding: 24px 0 0; } }
