/* ==========================================================
   MeruSoko — storefront + admin styles
   ========================================================== */
:root {
  --brand: #14532d;
  --brand-2: #166534;
  --brand-3: #dcfce7;
  --accent: #f59e0b;
  --accent-dark: #b45309;
  --bg: #f5f6f2;
  --card: #ffffff;
  --text: #1c2a21;
  --muted: #5d6c62;
  --line: #e2e7e0;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --warn: #92400e;
  --warn-bg: #fffbeb;
  --bad: #b91c1c;
  --bad-bg: #fef2f2;
  --info: #1d4ed8;
  --info-bg: #eff6ff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 40, 24, .06), 0 4px 16px rgba(16, 40, 24, .05);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.5; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
code, .mono { font-family: var(--mono); }
.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 820px; }
.section { padding-block: 28px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.row-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.row-gap.end { justify-content: flex-end; margin-top: 16px; }
.warn-text { color: var(--accent-dark); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--brand-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-sm { padding: 7px 12px; font-size: .875rem; border-radius: 8px; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn-accent { background: var(--accent); color: #1f1300; }
.btn-accent:hover { background: #fbbf24; }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-3); }
.btn-ghost-light { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost-light:hover { background: rgba(255,255,255,.2); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #991b1b; }
.btn-wa { background: #25d366; color: #05391b; margin-top: 12px; }
.btn-wa:hover { background: #1ebe5b; }
.icon-btn { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: 1rem; padding: 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--bad-bg); color: var(--bad); }

/* ---------- Alerts & badges ---------- */
.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 14px; border: 1px solid; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #bbf7d0; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #fde68a; }
.alert-bad { background: var(--bad-bg); color: var(--bad); border-color: #fecaca; }
.alert-info { background: var(--info-bg); color: var(--info); border-color: #bfdbfe; }
.flash-wrap:not(:empty) { padding-top: 16px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-muted { background: #eef1ec; color: var(--muted); }

/* ---------- Header ---------- */
.announce { background: var(--brand); color: #e7f7ec; text-align: center; font-size: .85rem; padding: 7px 12px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.header-row { display: flex; align-items: center; gap: 18px; padding-block: 12px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.35rem; color: var(--brand); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-svg { width: 36px; height: 36px; }
.search { flex: 1; display: flex; max-width: 560px; margin-left: auto; }
.search input { flex: 1; padding: 10px 14px; border: 1px solid var(--line); border-right: 0; border-radius: 10px 0 0 10px; font: inherit; background: var(--bg); min-width: 0; }
.search input:focus { outline: 2px solid var(--brand-3); background: #fff; }
.search button { border: 0; background: var(--brand); color: #fff; padding: 0 16px; border-radius: 0 10px 10px 0; cursor: pointer; }
.header-actions { display: flex; align-items: center; gap: 16px; }
.hdr-link { color: var(--text); font-weight: 500; font-size: .95rem; }
.cart-link { position: relative; display: flex; align-items: center; gap: 6px; color: var(--text); font-weight: 600; }
.cart-count { position: absolute; top: -8px; left: 14px; background: var(--accent); color: #1f1300; font-size: .72rem; min-width: 19px; height: 19px; border-radius: 999px; display: grid; place-items: center; padding: 0 5px; }
.cat-nav { border-top: 1px solid var(--line); background: #fff; }
.cat-nav-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-block: 6px; }
.cat-nav-row::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 7px 12px; border-radius: 999px; color: var(--text); font-size: .9rem; white-space: nowrap; }
.cat-nav a:hover { background: var(--bg); text-decoration: none; }
.cat-nav a.active { background: var(--brand-3); color: var(--brand); font-weight: 700; }

/* ---------- Hero ---------- */
.hero { background: radial-gradient(1200px 400px at 85% -10%, rgba(245,158,11,.25), transparent 60%), linear-gradient(135deg, #0f3d22, #14532d 55%, #166534); color: #fff; }
.hero-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: center; padding-block: 56px; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3rem); margin-bottom: 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: #fcd34d; font-weight: 700; margin-bottom: 10px; }
.lead { font-size: 1.12rem; color: #d7eadd; max-width: 56ch; margin-bottom: 24px; }
.lead-dark { font-size: 1.05rem; color: var(--muted); }
.hero-panel { display: grid; gap: 10px; }
.hp-item { display: flex; gap: 14px; align-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 12px; padding: 14px 16px; backdrop-filter: blur(4px); }
.hp-item span { font-size: 1.6rem; }
.hp-item b { display: block; }
.hp-item small { color: #bcd9c6; }

/* ---------- Cards & grids ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin: 8px 0 14px; gap: 12px; }
.section-head h2 { margin: 0; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cat-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; color: var(--text); transition: transform .12s, border-color .12s; }
.cat-card:hover { transform: translateY(-2px); border-color: #a7d7b5; text-decoration: none; }
.cat-icon { font-size: 1.9rem; margin-bottom: 6px; }
.cat-card small { color: var(--muted); }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.pc-media { display: block; aspect-ratio: 4 / 3; background: #f0f3ee; overflow: hidden; }
.pc-media img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.pc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pc-cat { font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.pc-title { font-size: 1rem; margin: 0; }
.pc-title a { color: var(--text); }
.pc-sum { color: var(--muted); font-size: .88rem; margin: 0; }
.pc-foot { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.price strong { font-size: 1.1rem; color: var(--brand); }
.price s { color: var(--muted); font-size: .85rem; margin-left: 6px; }
.price-lg { margin: 6px 0 18px; }
.price-lg strong { font-size: 1.8rem; }

/* Placeholder product art when no photo */
.ph { position: relative; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px; text-align: center; overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(233,185,73,.28), transparent 55%),
    linear-gradient(145deg, hsl(var(--h) 48% 20%), hsl(calc(var(--h) + 18) 45% 32%));
  color: #fff; }
.ph::after { content: ""; position: absolute; inset: auto -20% -45% -20%; height: 70%; background: hsl(var(--h) 40% 14% / .45); transform: rotate(-6deg); }
.ph-icon { position: relative; z-index: 1; font-size: 2.4rem; width: 64px; height: 64px; display: grid; place-items: center; border-radius: 18px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); }
.ph-title { position: relative; z-index: 1; font-weight: 700; font-size: .92rem; max-width: 24ch; letter-spacing: -.01em; }
.ph-lg { aspect-ratio: 4 / 3; border-radius: var(--radius); }
.ph-lg .ph-icon { font-size: 4rem; width: 110px; height: 110px; border-radius: 28px; }
.ph-lg .ph-title { font-size: 1.2rem; }

/* ---------- Steps / CTA ---------- */
.steps h2 { margin-bottom: 16px; }
.steps-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps-list li { counter-increment: s; display: flex; flex-direction: column; gap: 4px; padding-left: 48px; position: relative; }
.steps-list li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-3); color: var(--brand); font-weight: 800; display: grid; place-items: center; }
.steps-list span { color: var(--muted); font-size: .92rem; }
.cta-band { display: flex; gap: 24px; justify-content: space-between; align-items: center; background: linear-gradient(120deg, #1c1917, #3f2d0f); color: #fff; border-radius: var(--radius); padding: 28px; }
.cta-band p { color: #e7dcc6; margin: 0; }

/* ---------- Shop ---------- */
.shop-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.shop-head p { margin: 0; }
.sort-form label { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.sort-form select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); font: inherit; background: #fff; }
.empty { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 3rem; margin: 0; }
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 24px; }
.pager a { min-width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text); }
.pager a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

/* ---------- Product page ---------- */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.product-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: start; }
.gallery-main { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery-main img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; }
.gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; }
.thumb { width: 72px; height: 72px; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; padding: 0; background: #fff; cursor: pointer; flex: none; }
.thumb.active { border-color: var(--brand); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-title { font-size: clamp(1.5rem, 2.6vw, 2rem); margin-top: 6px; }
.buy-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.qty { display: flex; flex-direction: column; font-size: .8rem; color: var(--muted); gap: 4px; }
.qty input { width: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; }
.assure { list-style: none; padding: 14px 0 0; margin: 14px 0 0; border-top: 1px dashed var(--line); display: grid; gap: 6px; color: var(--muted); font-size: .92rem; }
.enquiry { margin-top: 16px; }
.product-details { display: grid; grid-template-columns: 1fr 1.4fr; gap: 20px; margin: 28px 0; align-items: start; }
.spec { width: 100%; border-collapse: collapse; }
.spec th, .spec td { text-align: left; padding: 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.spec th { color: var(--muted); font-weight: 500; width: 45%; padding-right: 12px; }
.prose p, .prose li { color: #2f3d34; }
.prose h3 { margin-top: 1.4em; }
.hp-field { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form label { display: grid; gap: 6px; font-weight: 600; font-size: .92rem; }
.form input:not([type=checkbox]):not([type=radio]), .form select, .form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #cfd8cd; border-radius: 10px; font: inherit; font-weight: 400; background: #fff; color: var(--text); }
.form input:focus, .form select:focus, .form textarea:focus { outline: 3px solid var(--brand-3); border-color: var(--brand-2); }
.form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.form .check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); }
.form .hint { font-weight: 400; color: var(--muted); font-size: .82rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-card { max-width: 480px; margin-inline: auto; }

/* ---------- Cart / checkout / order ---------- */
.cart { padding: 8px 20px; }
.cart-line { display: grid; grid-template-columns: 64px 1fr 76px 120px 32px; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 64px; height: 64px; border-radius: 10px; overflow: hidden; display: block; background: #f0f3ee; }
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-thumb .ph-icon { font-size: 1.4rem; width: 40px; height: 40px; border-radius: 10px; }
.cart-thumb .ph, .table .thumb-sm .ph { padding: 4px; }
.cart-thumb .ph::after, .table .thumb-sm .ph::after { display: none; }
.cart-thumb .ph-title { display: none; }
.cart-info { display: grid; }
.cart-qty { padding: 8px; border: 1px solid var(--line); border-radius: 8px; font: inherit; width: 100%; }
.cart-total { text-align: right; font-weight: 700; }
.cart-summary { display: flex; justify-content: space-between; align-items: center; padding: 16px 0 10px; }
.cart-grand { font-size: 1.1rem; }
.cart-grand strong { color: var(--brand); font-size: 1.4rem; margin-left: 8px; }
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.summary { position: sticky; top: 140px; }
.sum-line { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.sum-total { border-bottom: 0; font-size: 1.15rem; padding-top: 14px; }
.sum-total b { color: var(--brand); }
.order-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.order-head h1 { margin: 0; }
.order-head p { margin: 0; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 20px; }
.timeline li { position: relative; text-align: center; font-size: .82rem; color: var(--muted); padding-top: 28px; }
.timeline li span { position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--line); z-index: 1; }
.timeline li::before { content: ""; position: absolute; top: 9px; left: -50%; width: 100%; height: 3px; background: var(--line); }
.timeline li:first-child::before { display: none; }
.timeline li.done { color: var(--brand); font-weight: 600; }
.timeline li.done span { background: var(--brand); border-color: var(--brand); }
.timeline li.done::before { background: var(--brand); }
.timeline li.current span { box-shadow: 0 0 0 5px var(--brand-3); }
.pay-card { margin-bottom: 18px; border-color: #fcd34d; }
.pay-amount { font-size: 1.1rem; }
.pay-amount strong { font-size: 1.8rem; color: var(--brand); }
.pay-accounts { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 14px 0 22px; }
.pay-acc { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 2px; background: #fcfdfb; }
.pay-acc b { font-size: 1.15rem; }
.pay-acc small { color: var(--muted); }
.pay-acc .btn { justify-self: start; margin-top: 6px; }
.pay-ref { background: var(--warn-bg); border-color: #fde68a; }
.delivery-box { background: var(--ok-bg); border: 1px dashed #4ade80; border-radius: 10px; padding: 12px; margin: 6px 0 12px; }
.delivery-box pre { font-family: var(--mono); white-space: pre-wrap; word-break: break-word; margin: 6px 0; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer { background: #0f2a19; color: #c7dccd; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 28px; padding-block: 40px 24px; }
.footer-logo { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: 8px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.site-footer a { color: #c7dccd; }
.muted-light { color: #8fae99; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.1); padding-block: 16px; font-size: .85rem; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 56px; height: 56px; border-radius: 50%; background: #25d366; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); z-index: 40; }

/* ---------- Auth (install/login) ---------- */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: linear-gradient(135deg, #0f3d22, #166534); }
.auth-card { background: #fff; width: min(440px, 100%); border-radius: 18px; padding: 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; color: var(--brand); margin-bottom: 18px; }
.logo-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--brand); color: var(--accent); display: grid; place-items: center; }

/* ---------- Admin ---------- */
.admin-body { background: #f1f3ef; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: #0f2a19; color: #c7dccd; padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { color: #fff; font-size: 1.15rem; padding: 4px 10px 18px; }
.admin-side nav { display: grid; gap: 2px; }
.admin-side nav > a { color: #c7dccd; padding: 9px 12px; border-radius: 8px; display: flex; justify-content: space-between; align-items: center; }
.admin-side nav > a:hover { background: rgba(255,255,255,.07); text-decoration: none; }
.admin-side nav > a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 600; }
.admin-side .count { background: var(--accent); color: #1f1300; font-size: .72rem; padding: 1px 7px; border-radius: 999px; font-weight: 700; }
.admin-side .side-foot { margin-top: 24px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); font-size: .85rem; }
.admin-side .side-foot a { color: #fcd34d; }
.admin-main { padding: 24px clamp(16px, 3vw, 36px); min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-top h1 { margin: 0; font-size: 1.6rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 16px; }
.stat small { color: var(--muted); display: block; }
.stat b { font-size: 1.6rem; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font-size: .76rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:hover td { background: #fafbf8; }
.table .thumb-sm { width: 48px; height: 48px; border-radius: 8px; overflow: hidden; background: #f0f3ee; }
.table .thumb-sm img { width: 100%; height: 100%; object-fit: cover; }
.table .thumb-sm .ph-title { display: none; }
.table .thumb-sm .ph-icon { font-size: 1.2rem; width: 34px; height: 34px; border-radius: 9px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters a { padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--text); font-size: .88rem; }
.filters a.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.filters form { margin-left: auto; display: flex; gap: 6px; }
.filters input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.admin-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 18px; align-items: start; }
.admin-grid > div { display: grid; gap: 18px; }
.img-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.img-manage figure { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.img-manage img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.img-manage figcaption { display: flex; justify-content: space-between; padding: 4px 6px; font-size: .78rem; }
.dyn-fields:empty::before { content: "This category has no extra fields."; color: var(--muted); font-size: .9rem; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 14px; font-size: .94rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.inline-form { display: inline; }
.delivery-input textarea { font-family: var(--mono); }
.menu-toggle { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .product-layout, .product-details, .checkout-grid, .admin-grid { grid-template-columns: 1fr; }
  .hero-grid { padding-block: 36px; }
  .steps-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .summary { position: static; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { display: none; }
  .admin-side.open nav { display: grid; }
  .menu-toggle { display: inline-flex; float: right; }
}
@media (max-width: 640px) {
  .header-row { flex-wrap: wrap; gap: 10px; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .header-actions { margin-left: auto; }
  .hdr-link { display: none; }
  .hero-panel { display: none; }
  .hero-grid { padding-block: 30px 34px; }
  .two, .three { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pc-body { padding: 10px 12px 12px; }
  .pc-sum { display: none; }
  .pc-foot { flex-direction: column; align-items: stretch; }
  .pc-foot .btn { width: 100%; }
  .cart-line { grid-template-columns: 56px 1fr 64px; grid-template-areas: "t i x" "t q s"; }
  .cart-thumb { grid-area: t; width: 56px; height: 56px; }
  .cart-info { grid-area: i; }
  .cart-qty { grid-area: q; }
  .cart-total { grid-area: s; }
  .cart-line .icon-btn { grid-area: x; justify-self: end; }
  .timeline li { font-size: .7rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 6px; }
  .kv { grid-template-columns: 1fr; }
  .filters form { margin-left: 0; width: 100%; }
}

/* ---------- Hero v2: compact hero + horizontal trust strip ---------- */
.hero-inner { padding-block: 40px 26px; }
.hero-inner h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); max-width: 22ch; margin-bottom: 10px; }
.hero-inner .lead { margin-bottom: 20px; }
.trust-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; padding-bottom: 30px; }
.trust-strip .hp-item { padding: 12px 14px; gap: 10px; }
.trust-strip .hp-item span { font-size: 1.35rem; }
.trust-strip .hp-item b { font-size: .9rem; }
.trust-strip .hp-item small { font-size: .78rem; }
@media (max-width: 1000px) {
  .trust-strip { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(210px, 1fr); overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .trust-strip::-webkit-scrollbar { display: none; }
  .trust-strip .hp-item { scroll-snap-align: start; }
}
@media (max-width: 640px) {
  .hero-inner { padding-block: 28px 18px; }
  .trust-strip { padding-bottom: 22px; grid-auto-columns: 75%; }
  .trust-strip .hp-item b { font-size: .88rem; }
}

/* ---------- Trust strip: sliding right-to-left ---------- */
.trust-marquee { overflow: hidden; padding-bottom: 30px; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.trust-track { display: flex; gap: 12px; width: max-content; animation: trust-slide 38s linear infinite; }
.trust-track .hp-item { flex: 0 0 auto; width: 250px; padding: 12px 14px; gap: 10px; }
.trust-track .hp-item span { font-size: 1.35rem; }
.trust-track .hp-item b { font-size: .9rem; }
.trust-track .hp-item small { font-size: .78rem; }
.trust-marquee:hover .trust-track { animation-play-state: paused; }
@keyframes trust-slide { from { transform: translateX(0); } to { transform: translateX(calc(-50% - 6px)); } }
@media (max-width: 640px) {
  .trust-marquee { padding-bottom: 22px; }
  .trust-track { animation-duration: 28s; }
  .trust-track .hp-item { width: 220px; }
}
@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; flex-wrap: wrap; width: auto; }
  .trust-track .hp-item[aria-hidden="true"] { display: none; }
}


/* ---------- Hero spotlight card (rotating top picks) ---------- */
.hero-split { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.hero-spot { position: relative; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: 20px; padding: 16px; backdrop-filter: blur(6px); box-shadow: 0 20px 50px rgba(0,0,0,.25); max-width: 440px; justify-self: end; width: 100%; }
.spot-label { font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fcd34d; margin: 2px 4px 12px; }
.spot-card { display: none; grid-template-columns: 150px 1fr; gap: 16px; align-items: center; color: #fff; text-decoration: none; animation: spot-in .5s ease; }
.spot-card.active { display: grid; }
.spot-card:hover { text-decoration: none; }
.spot-media { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #fff; }
.spot-media img { width: 100%; height: 100%; object-fit: contain; }
.spot-media .ph-icon { font-size: 2.2rem; width: 62px; height: 62px; }
.spot-media .ph-title { font-size: .78rem; }
.spot-save { position: absolute; top: 8px; left: 8px; background: #dc2626; color: #fff; font-size: .72rem; font-weight: 800; padding: 3px 8px; border-radius: 999px; z-index: 2; }
.spot-body { display: grid; gap: 6px; align-content: center; }
.spot-body small { color: #bcd9c6; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.spot-body b { font-size: 1.12rem; line-height: 1.25; }
.spot-price { font-size: 1.3rem; font-weight: 800; color: #fcd34d; }
.spot-price s { font-size: .85rem; color: #a7c4b1; font-weight: 500; margin-left: 4px; }
.spot-body .btn { justify-self: start; margin-top: 4px; }
.spot-dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.spot-dots button { width: 8px; height: 8px; border-radius: 999px; border: 0; padding: 0; background: rgba(255,255,255,.35); cursor: pointer; transition: width .25s, background .25s; }
.spot-dots button.active { width: 22px; background: #fcd34d; }
@keyframes spot-in { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@media (max-width: 900px) {
  .hero-split { grid-template-columns: 1fr; gap: 22px; }
  .hero-spot { justify-self: stretch; max-width: none; }
}
@media (max-width: 640px) {
  .spot-card { grid-template-columns: 110px 1fr; gap: 12px; }
  .spot-body b { font-size: 1rem; }
  .spot-price { font-size: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) { .spot-card { animation: none; } }
