/* =========================================================================
   Orbzzo Store — marketplace layer (banlili layout, brand-coloured)
   Theme-aware via the shared tokens in site.css. Hero slider, side banners
   and the category-sidebar header stay dark (banner/header elements) in both
   themes, banlili-style.
   ========================================================================= */

:root {
  --media-bg: radial-gradient(ellipse at center, #1c1810 0%, #0c0b08 80%);
  --sidebar-head-bg: linear-gradient(90deg, #181206, #221903);
  --sidebar-head-ink: #ffba00;
}
html[data-theme="light"] {
  --media-bg: linear-gradient(160deg, #f4efe4, #efe7d6);
  --sidebar-head-bg: linear-gradient(90deg, #181206, #221903);
  --sidebar-head-ink: #ffba00;
}
html[data-theme="orange"] {
  --media-bg: linear-gradient(160deg, #f3f4f7, #e9ebf0);
  --sidebar-head-bg: #1a1a2e;
  --sidebar-head-ink: #ffffff;
}

.store-topbar { background: var(--announce-bg); border-bottom: 1px solid var(--gold-faint); font-size: 0.68rem; }
.store-topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 36px; gap: 1rem; }
.store-topbar a, .store-topbar span { color: var(--announce-ink); letter-spacing: 0.06em; }
.store-topbar a { transition: color 0.3s; } .store-topbar a:hover { color: var(--heading); }
.store-topbar .left, .store-topbar .right { display: flex; align-items: center; gap: 1.4rem; }
.store-topbar i { margin-right: 0.4rem; }

/* ---------- Store header ---------- */
.store-header { background: var(--nav-bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 200; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.store-header .wrap { display: flex; align-items: center; gap: 1.6rem; height: 84px; }
.store-header .brand img { height: 52px; filter: var(--logo-filter); }
.store-search { flex: 1; display: flex; height: 48px; border: 1px solid var(--line-gold); border-radius: 6px; overflow: hidden; background: var(--bg-soft); max-width: 620px; }
.store-search select { background: var(--bg-panel); border: 0; border-right: 1px solid var(--line); color: var(--ink-soft); padding: 0 0.9rem; font-family: var(--sans); font-size: 0.78rem; cursor: pointer; min-width: 150px; appearance: none; }
.store-search select option { background: var(--select-bg); }
.store-search input { flex: 1; background: transparent; border: 0; outline: none; color: var(--ink); padding: 0 1rem; font-size: 0.9rem; }
.store-search input::placeholder { color: var(--ink-mute); }
.store-search button { background: var(--gold); color: var(--on-gold); border: 0; padding: 0 1.4rem; cursor: pointer; font-size: 1rem; transition: background 0.3s; }
.store-search button:hover { background: var(--gold-light); }
.store-actions { display: flex; align-items: center; gap: 1.4rem; flex-shrink: 0; }
.store-action { display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--ink-soft); position: relative; transition: color 0.3s; }
.store-action:hover { color: var(--gold-ink); }
.store-action i { font-size: 1.2rem; }
.store-action span.lbl { font-size: 0.6rem; letter-spacing: 0.08em; text-transform: uppercase; }
.store-action .badge { position: absolute; top: -6px; right: 4px; background: var(--gold); color: var(--on-gold); font-size: 0.6rem; font-weight: 700; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }

/* ---------- Store nav strip ---------- */
.store-nav { background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.store-nav .wrap { display: flex; align-items: stretch; height: 50px; gap: 0; }
.store-nav a { display: flex; align-items: center; gap: 0.5rem; padding: 0 1.2rem; font-size: 0.74rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); border-right: 1px solid var(--line); transition: all 0.3s; }
.store-nav a:first-child { border-left: 1px solid var(--line); }
.store-nav a:hover, .store-nav a.active { background: var(--gold); color: var(--on-gold); }
.store-nav .nav-right { margin-left: auto; display: flex; align-items: center; border: 0; color: var(--gold-ink); font-size: 0.7rem; letter-spacing: 0.16em; }

/* ---------- Layout ---------- */
.store-layout { max-width: var(--maxw); margin: 0 auto; padding: 1.8rem clamp(20px,5vw,64px) 3rem; display: grid; grid-template-columns: 248px 1fr; gap: 1.6rem; align-items: start; }
.store-layout.single { grid-template-columns: 1fr; }

/* Category sidebar — dark header on themed body (banlili-style) */
.cat-sidebar { background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: sticky; top: 96px; }
.cat-sidebar-head { background: var(--sidebar-head-bg); color: var(--sidebar-head-ink); padding: 0.95rem 1.2rem; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; display: flex; align-items: center; gap: 0.6rem; border-bottom: 1px solid var(--line-gold); }
.cat-list .cat-row { position: relative; }
.cat-list .cat-row > a { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem 1.2rem; font-size: 0.86rem; color: var(--ink-soft); border-bottom: 1px solid var(--line); transition: all 0.3s; }
.cat-list .cat-row:last-child > a { border-bottom: 0; }
.cat-list .cat-row > a i.lead-ic { width: 18px; text-align: center; color: var(--gold); font-size: 0.9rem; }
.cat-list .cat-row > a .arr { margin-left: auto; font-size: 0.6rem; color: var(--ink-mute); }
.cat-list .cat-row > a:hover { background: var(--gold-faint); color: var(--heading); padding-left: 1.5rem; }
.cat-list .cat-row:hover .subcat { opacity: 1; visibility: visible; transform: translateX(0); }
.subcat { position: absolute; left: 100%; top: 0; min-width: 230px; background: var(--bg-panel); border: 1px solid var(--line-gold); border-radius: 6px; box-shadow: var(--card-shadow); opacity: 0; visibility: hidden; transform: translateX(-8px); transition: all 0.3s var(--ease); z-index: 50; padding: 0.4rem; }
.subcat a { display: block; padding: 0.55rem 0.8rem; font-size: 0.8rem; color: var(--ink-soft); border-radius: 4px; transition: all 0.25s; }
.subcat a:hover { background: var(--gold-faint); color: var(--heading); }
.subcat .sub-head { font-size: 0.58rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-ink); padding: 0.5rem 0.8rem 0.2rem; }

/* ---------- Hero slider (dark banner element in both themes) ---------- */
.store-hero { display: grid; grid-template-columns: 1fr 250px; gap: 1rem; margin-bottom: 1.6rem; }
.slider { position: relative; height: 360px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line-gold); }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s var(--ease); display: flex; align-items: center; }
.slide.active { opacity: 1; }
.slide::after { content: ""; position: absolute; inset: 0; background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>"); opacity: 0.04; pointer-events: none; }
.slide-inner { position: relative; z-index: 2; padding: 0 clamp(1.5rem, 5vw, 3.5rem); max-width: 560px; }
.slide .s-eyebrow { font-size: 0.68rem; letter-spacing: 0.36em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.9rem; }
.slide h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); color: #fff; margin-bottom: 0.8rem; }
.slide p { color: rgba(255, 255, 255, 0.82); max-width: 42ch; margin-bottom: 1.5rem; font-size: 0.98rem; }
.slider-dots { position: absolute; bottom: 16px; left: clamp(1.5rem,5vw,3.5rem); display: flex; gap: 0.5rem; z-index: 5; }
.slider-dots button { width: 30px; height: 3px; border: 0; background: rgba(252,185,0,0.3); cursor: pointer; transition: all 0.3s; border-radius: 2px; }
.slider-dots button.active { background: var(--gold); width: 44px; }
.slider-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(10,10,10,0.6); border: 1px solid var(--line-gold); color: var(--gold); cursor: pointer; z-index: 5; transition: all 0.3s; display: flex; align-items: center; justify-content: center; }
.slider-arrow:hover { background: var(--gold); color: var(--on-gold); }
.slider-arrow.prev { left: 14px; } .slider-arrow.next { right: 14px; }

.side-stack { display: flex; flex-direction: column; gap: 1rem; }
.side-card { flex: 1; border-radius: 10px; border: 1px solid var(--line-gold); overflow: hidden; position: relative; display: flex; align-items: flex-end; min-height: 170px; transition: all 0.4s var(--ease); }
.side-card:hover { transform: translateY(-3px); box-shadow: var(--card-shadow); }
.side-card .sc-inner { position: relative; z-index: 2; padding: 1.2rem; width: 100%; background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent); }
.side-card .sc-eyebrow { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.side-card strong { display: block; color: #fff; font-family: var(--serif); font-size: 1.2rem; margin-top: 0.2rem; }
.side-card .sc-ic { position: absolute; top: 1rem; right: 1.1rem; font-size: 1.6rem; color: var(--gold-dim); }

/* ---------- Promo strip ---------- */
.promo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem; }
.promo { background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; padding: 1.1rem 1.2rem; display: flex; align-items: center; gap: 1rem; transition: border-color 0.3s, box-shadow 0.3s; }
.promo:hover { border-color: var(--line-gold); box-shadow: var(--card-shadow); }
.promo .p-ic { width: 46px; height: 46px; flex-shrink: 0; border-radius: 50%; background: var(--gold-faint); color: var(--gold); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.promo h4 { font-family: var(--sans); font-size: 0.86rem; font-weight: 600; color: var(--heading); }
.promo p { font-size: 0.74rem; color: var(--ink-mute); margin: 0; }

/* ---------- Section header ---------- */
.store-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.3rem; padding-bottom: 0.8rem; border-bottom: 1px solid var(--line-gold); }
.store-section-head h2 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); color: var(--heading); display: flex; align-items: center; gap: 0.7rem; }
.store-section-head h2 .bar { width: 4px; height: 22px; background: var(--gold); border-radius: 2px; box-shadow: 0 0 8px rgba(252,185,0,0.5); }
.store-section-head h2 .g-sub { font-size: 0.64rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-ink); font-family: var(--sans); }
.view-all { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-ink); border: 1px solid var(--line-gold); padding: 0.5rem 1rem; border-radius: 4px; transition: all 0.3s; display: inline-flex; align-items: center; gap: 0.5rem; }
.view-all:hover { background: var(--gold); color: var(--on-gold); }

/* ---------- Product grid + card ---------- */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 1.1rem; margin-bottom: 2.6rem; }
.product-card { background: var(--bg-card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative; transition: all 0.4s var(--ease); display: flex; flex-direction: column; }
.product-card:hover { border-color: var(--line-gold); transform: translateY(-4px); box-shadow: var(--card-shadow); }
.product-media { height: 180px; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--media-bg); }
.product-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.06); }
.product-media .ph-icon { font-size: 3rem; color: var(--gold-dim); transition: all 0.5s var(--ease); }
.product-card:hover .product-media .ph-icon { color: var(--gold); transform: scale(1.08); }
.p-badge { position: absolute; top: 10px; left: 10px; padding: 0.2rem 0.6rem; border-radius: 3px; font-size: 0.6rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; z-index: 3; }
.p-badge.hot { background: #c0392b; color: #fff; }
.p-badge.new { background: #2d6a4f; color: #fff; }
.p-badge.premium { background: var(--gold); color: var(--on-gold); }
.p-badge.featured { background: var(--gold-light); color: var(--on-gold); }
.p-actions { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; gap: 0.4rem; opacity: 0; transform: translateX(12px); transition: all 0.35s var(--ease); z-index: 3; }
.product-card:hover .p-actions { opacity: 1; transform: translateX(0); }
.p-act { width: 32px; height: 32px; border-radius: 50%; background: var(--bg-panel); border: 1px solid var(--line-gold); color: var(--gold-dim); display: flex; align-items: center; justify-content: center; font-size: 0.8rem; transition: all 0.3s; }
.p-act:hover { background: var(--gold); color: var(--on-gold); }
.product-info { padding: 0.9rem 1rem 0.4rem; flex: 1; }
.product-info .p-cat { font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 0.4rem; }
.product-info .p-name { font-family: var(--serif); font-size: 1.12rem; line-height: 1.25; color: var(--heading); margin-bottom: 0.5rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.product-info .p-name a:hover { color: var(--gold-ink); }
.product-info .p-meta { font-size: 0.72rem; color: var(--ink-mute); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.4rem; }
.product-info .p-meta i { color: var(--gold-dim); }
.product-info .p-price { display: flex; align-items: baseline; gap: 0.5rem; }
.product-info .p-price .now { font-family: var(--serif); font-size: 1rem; color: var(--gold-ink); }
.product-foot { padding: 0 1rem 1rem; }
.add-basket { width: 100%; border: 1px solid var(--line-gold); background: var(--gold-faint); color: var(--gold-ink); border-radius: 4px; padding: 0.6rem; font-size: 0.7rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; gap: 0.5rem; }
.add-basket:hover { background: var(--gold); color: var(--on-gold); }

/* ---------- Category page header ---------- */
.cat-hero { background: var(--hero-grad), var(--bg); border-bottom: 1px solid var(--line); padding: 2.6rem 0; text-align: center; }
.cat-hero .eyebrow { margin-bottom: 0.6rem; }
.cat-hero h1 { font-size: clamp(2rem, 4vw, 3rem); }
.cat-hero p { color: var(--gold-ink); font-family: var(--serif); font-style: italic; font-size: 1.15rem; margin-top: 0.6rem; }
.cat-intro { color: var(--ink-soft); max-width: 70ch; margin: 1.4rem auto 0; }
.cat-meta-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-top: 1.6rem; }
.meta-chip { border: 1px solid var(--line-gold); border-radius: 30px; padding: 0.4rem 1rem; font-size: 0.7rem; color: var(--ink-soft); }
.meta-chip b { color: var(--gold-ink); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.62rem; }

/* ---------- Product detail ---------- */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2.6rem; padding: 2.4rem 0; }
.pd-media { height: 420px; border-radius: 12px; border: 1px solid var(--line-gold); display: flex; align-items: center; justify-content: center; background: var(--media-bg); position: relative; overflow: hidden; }
.pd-media img { width: 100%; height: 100%; object-fit: cover; }
.pd-media .ph-icon { font-size: 7rem; color: var(--gold-dim); }
.pd-info h1 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: 0.6rem; }
.pd-cat { font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-ink); margin-bottom: 0.8rem; }
.pd-info .pd-lead { color: var(--ink-soft); font-size: 1.05rem; margin: 1rem 0 1.5rem; }
.pd-price-box { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.4rem; border: 1px solid var(--line-gold); border-radius: 8px; background: var(--gold-faint); margin-bottom: 1.5rem; }
.pd-price-box .pd-price { font-family: var(--serif); font-size: 1.4rem; color: var(--gold-ink); }
.pd-price-box .pd-unit { color: var(--ink-mute); font-size: 0.82rem; }
.pd-form { display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; margin-bottom: 1.6rem; }
.qty-field { display: flex; align-items: center; border: 1px solid var(--line-gold); border-radius: 4px; overflow: hidden; }
.qty-field button { background: var(--bg-panel); border: 0; color: var(--gold); width: 38px; height: 44px; cursor: pointer; font-size: 1rem; }
.qty-field input { width: 54px; height: 44px; background: var(--bg-soft); border: 0; color: var(--ink); text-align: center; font-size: 0.95rem; }
.pd-specs { width: 100%; border-collapse: collapse; margin-top: 0.5rem; }
.pd-specs th, .pd-specs td { text-align: left; padding: 0.75rem 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.pd-specs th { color: var(--gold-ink); width: 40%; font-weight: 500; }
.pd-specs td { color: var(--ink-soft); }

/* ---------- Basket ---------- */
.basket-table { width: 100%; border-collapse: collapse; }
.basket-table th { text-align: left; font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-ink); padding: 0.9rem 1rem; border-bottom: 1px solid var(--line-gold); }
.basket-table td { padding: 1rem; border-bottom: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.basket-prod { display: flex; align-items: center; gap: 1rem; }
.basket-thumb { width: 60px; height: 60px; border-radius: 6px; border: 1px solid var(--line-gold); display: flex; align-items: center; justify-content: center; background: var(--media-bg); color: var(--gold-dim); font-size: 1.3rem; flex-shrink: 0; }
.basket-prod strong { color: var(--heading); font-family: var(--serif); font-size: 1.05rem; font-weight: 500; }
.basket-empty { text-align: center; padding: 4rem 1rem; color: var(--ink-soft); }
.basket-empty i { font-size: 3rem; color: var(--gold-dim); margin-bottom: 1rem; }

/* ---------- Back-to-top ---------- */
.back-top { position: fixed; bottom: 24px; right: 24px; width: 44px; height: 44px; border-radius: 8px; background: var(--gold); color: var(--on-gold); display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 150; box-shadow: 0 8px 24px rgba(252,185,0,0.35); opacity: 0; transform: translateY(10px); pointer-events: none; transition: all 0.4s var(--ease); border: 0; }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { background: var(--gold-light); }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .store-layout { grid-template-columns: 1fr; }
  .cat-sidebar { display: none; }
  .store-hero { grid-template-columns: 1fr; }
  .side-stack { flex-direction: row; }
  .promo-strip { grid-template-columns: repeat(2, 1fr); }
  .pd-layout { grid-template-columns: 1fr; }
  .store-search { display: none; }
}
@media (max-width: 600px) {
  .store-topbar .left span { display: none; }
  .store-header .wrap { height: auto; flex-wrap: wrap; padding-top: 0.8rem; padding-bottom: 0.8rem; gap: 1rem; }
  .promo-strip { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .side-stack { flex-direction: column; }
}
