/* ==========================================================
   Storefront — mobile app design system
   --brand and --gold are injected from the admin settings.
   ========================================================== */
:root {
  --brand: #bb2455;
  --gold: #c49a45;
  --brand-soft: color-mix(in srgb, var(--brand) 9%, #fff);
  --ink: #17151a;
  --ink2: #5d5862;
  --muted: #9a95a0;
  --line: #efedf1;
  --chip: #f6f5f7;
  --bg: #ffffff;
  --success: #1f8a4c;
  --danger: #d32f2f;
  --r: 16px;
  --tab-h: 70px;
  --frame: 440px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 1px 2px rgba(20, 10, 30, .04), 0 8px 24px rgba(20, 10, 30, .06);
  --shadow-lg: 0 2px 6px rgba(20, 10, 30, .05), 0 18px 44px rgba(20, 10, 30, .1);
  --font: Almarai, system-ui, "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.55; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
svg.i { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
html[dir="rtl"] svg.flip { transform: scaleX(-1); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Frame ---------- */
.app { position: relative; max-width: var(--frame); min-height: 100vh; margin: 0 auto; background: var(--bg); }
@media (min-width: 520px) {
  body { background: #eceaee; }
  .app { box-shadow: 0 0 0 1px rgba(0, 0, 0, .04), 0 20px 60px rgba(0, 0, 0, .08); }
}
main { padding: 4px 0 28px; }
body.has-tabs main { padding-bottom: calc(var(--tab-h) + 30px); }
body.has-bar main { padding-bottom: 116px; }
body.has-tabs.has-bar main { padding-bottom: calc(var(--tab-h) + 116px); }
.pad { padding-inline: 16px; }

/* ---------- Top bars ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: grid; grid-template-columns: 42px 1fr 42px; align-items: center; gap: 8px;
  padding: 10px 16px; background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar h1 { font-size: 16px; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ibtn {
  position: relative; width: 42px; height: 42px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--chip); cursor: pointer; padding: 0;
}
.ibtn svg.i { width: 20px; height: 20px; }
.ibtn .dot {
  position: absolute; top: -2px; inset-inline-end: -2px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--brand); color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center;
}
.ibtn.on { color: var(--brand); }
.ibtn.on svg.i { fill: var(--brand); }
.ibtn.light { background: rgba(255, 255, 255, .92); box-shadow: 0 2px 10px rgba(0, 0, 0, .1); }
.ibtn .txt { font-weight: 800; font-size: 13px; }
.spacer { width: 42px; height: 42px; }

/* Home header */
.home-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 14px; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 18px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who small { display: block; color: var(--muted); font-size: 12px; }
.who b { display: block; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-top .end { display: flex; gap: 8px; }

/* ---------- Search ---------- */
.search { display: flex; gap: 8px; padding: 0 16px; }
.search-box { position: relative; flex: 1; }
.search-box input {
  width: 100%; height: 48px; padding-inline: 44px 14px; border: 0; border-radius: 14px; background: var(--chip); outline: none;
}
.search-box input::placeholder { color: var(--muted); }
.search-box input:focus { box-shadow: 0 0 0 2px var(--brand); background: #fff; }
.search-box svg.i { position: absolute; top: 50%; inset-inline-start: 14px; width: 20px; height: 20px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.filter-btn { flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--ink); color: #fff; display: grid; place-items: center; }

/* Delivery / pickup switch */
.mode { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 14px 16px 0; padding: 4px; border-radius: 14px; background: var(--chip); }
.mode a { height: 40px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; color: var(--ink2); font-weight: 700; font-size: 13px; }
.mode a svg.i { width: 18px; height: 18px; }
.mode a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.mode a.on svg.i { color: var(--brand); }

/* ---------- Banners ---------- */
.banners { display: flex; gap: 10px; margin-top: 16px; padding: 0 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.banners::-webkit-scrollbar, .hrow::-webkit-scrollbar, .chips::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; aspect-ratio: 2.3 / 1; border-radius: 18px; overflow: hidden; background: var(--brand); scroll-snap-align: center; color: #fff; }
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner .cap { position: absolute; inset: auto 0 0 0; padding: 30px 16px 14px; background: linear-gradient(transparent, rgba(0, 0, 0, .62)); }
.banner .cap b { display: block; font-size: 17px; font-weight: 800; line-height: 1.35; }
.banner .cap span { display: inline-block; margin-top: 8px; padding: 5px 12px; border-radius: 999px; background: #fff; color: var(--brand); font-size: 12px; font-weight: 800; }
.dots { display: flex; justify-content: center; gap: 5px; margin-top: 10px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: #dcd8de; transition: width .2s; }
.dots i.on { width: 18px; background: var(--brand); }

/* ---------- Sections ---------- */
.sec { margin-top: 24px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin: 0 16px 12px; gap: 10px; }
.sec-head h2 { font-size: 17px; font-weight: 800; }
.sec-head a { color: var(--brand); font-size: 13px; font-weight: 700; white-space: nowrap; }
.timer { display: flex; align-items: center; gap: 4px; direction: ltr; font-weight: 800; }
.timer b { min-width: 28px; padding: 3px 0; border-radius: 7px; background: var(--ink); color: #fff; text-align: center; font-size: 12px; }

/* Category tiles */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px; }
.cat { position: relative; height: 94px; padding: 14px; padding-inline-end: 70px; border-radius: 18px; overflow: hidden; font-weight: 800; font-size: 15px; line-height: 1.3; }
.cat small { display: block; margin-top: 3px; font-weight: 400; font-size: 12px; color: var(--ink2); }
.cat img, .cat .ph {
  position: absolute; inset-inline-end: -18px; bottom: -22px; width: 92px; height: 92px; border-radius: 50%;
  object-fit: cover; transform: rotate(-12deg); box-shadow: 0 8px 18px rgba(0, 0, 0, .14);
}
.cat .ph { display: grid; place-items: center; background: rgba(255, 255, 255, .55); box-shadow: none; font-size: 30px; color: rgba(0, 0, 0, .25); }

/* Chips (shop filter) */
.chips { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.chip { flex: 0 0 auto; padding: 8px 15px; border-radius: 999px; background: var(--chip); font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ink2); }
.chip.on { background: var(--ink); color: #fff; }

/* ---------- Product cards ---------- */
.hrow { display: flex; gap: 12px; padding: 0 16px 4px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.hrow .pcard { flex: 0 0 152px; scroll-snap-align: start; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 12px; padding: 0 16px; }
.pcard { position: relative; min-width: 0; }
.pcard > a { display: block; }
.ph-box { position: relative; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--chip); }
.ph-box img { display: block; width: 100%; height: 100%; object-fit: cover; }
.noimg { width: 100%; height: 100%; display: grid; place-items: center; background: var(--brand-soft); color: color-mix(in srgb, var(--brand) 40%, #fff); font-size: 34px; font-weight: 800; }
.badge-off { position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 8px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; }
.badge-out { position: absolute; top: 8px; inset-inline-start: 8px; padding: 3px 9px; border-radius: 8px; background: rgba(23, 21, 26, .8); color: #fff; font-size: 11px; font-weight: 700; }
.pcard.out img { filter: grayscale(.8); opacity: .65; }
.add-ic { position: absolute; bottom: 8px; inset-inline-end: 8px; width: 34px; height: 34px; border-radius: 11px; background: var(--ink); color: #fff; display: grid; place-items: center; }
.add-ic svg.i { width: 18px; height: 18px; stroke-width: 2.5; }
.fav-form { margin: 0; }
.pcard .fav-form { position: absolute; top: 8px; inset-inline-end: 8px; }
.fav-btn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: #fff; display: grid; place-items: center; cursor: pointer; color: var(--ink); box-shadow: 0 1px 4px rgba(0, 0, 0, .08); }
.fav-btn svg.i { width: 17px; height: 17px; }
.fav-btn.on { color: var(--brand); }
.fav-btn.on svg.i { fill: var(--brand); }
.pcard h3 { margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .meta { margin-top: 1px; color: var(--muted); font-size: 12px; }
.price { margin-top: 3px; font-weight: 800; font-size: 15px; white-space: nowrap; }
.price s { margin-inline-start: 6px; color: var(--muted); font-weight: 400; font-size: 12px; }
.price small { color: var(--muted); font-weight: 400; font-size: 11.5px; }

/* Ranked best sellers */
.ranks { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.rank { display: grid; grid-template-columns: 22px 62px 1fr auto; align-items: center; gap: 12px; padding: 8px 12px 8px 8px; border-radius: 16px; background: var(--chip); }
html[dir="rtl"] .rank { padding: 8px 8px 8px 12px; }
.rank .n { font-size: 17px; font-weight: 800; color: var(--brand); text-align: center; }
.rank .ph-box { width: 62px; height: 62px; border-radius: 12px; }
.rank b { font-weight: 700; line-height: 1.35; }
.rank .price { margin: 0; font-size: 14px; }

/* Shop toolbar */
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 14px 16px 12px; color: var(--muted); font-size: 13px; }
.toolbar select { padding: 8px 12px; border: 0; border-radius: 12px; background: var(--chip); font-weight: 700; color: var(--ink); }

/* ---------- Product page ---------- */
.p-hero { position: relative; aspect-ratio: 1 / 1; background: var(--chip); }
.p-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }
.p-hero .noimg { font-size: 64px; }
.p-actions { position: absolute; top: 12px; inset-inline: 16px; display: flex; justify-content: space-between; z-index: 5; }
.p-actions .group { display: flex; gap: 8px; }
.p-actions form { margin: 0; }
.p-sheet { position: relative; margin-top: -24px; padding: 22px 16px 0; border-radius: 26px 26px 0 0; background: #fff; }
.p-cat { color: var(--brand); font-size: 13px; font-weight: 700; }
.p-name { margin-top: 3px; font-size: 22px; font-weight: 800; line-height: 1.35; }
.p-price { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.p-price b { font-size: 22px; font-weight: 800; }
.p-price s { color: var(--muted); font-size: 14px; }
.p-price .badge-off { position: static; }
.p-desc { margin-top: 12px; color: var(--ink2); line-height: 1.75; }
.opt-title { margin: 20px 0 10px; font-weight: 800; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opt { position: relative; cursor: pointer; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt span { display: flex; flex-direction: column; min-width: 110px; padding: 10px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); line-height: 1.4; }
.opt b { font-weight: 700; }
.opt small { color: var(--muted); font-weight: 700; }
.opt input:checked + span { box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.opt input:checked + span small { color: var(--brand); }
.opt input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.opt.out span { opacity: .45; }
.facts { margin: 20px 0 0; padding: 2px 14px; border-radius: 16px; background: var(--chip); }
.fact { display: grid; grid-template-columns: 105px 1fr; gap: 10px; padding: 11px 0; font-size: 13.5px; }
.fact + .fact { border-top: 1px solid #e7e4ea; }
.fact dt { color: var(--muted); }
.fact dd { margin: 0; font-weight: 700; }
.fact.warn dd { color: var(--danger); }

/* ---------- Bottom action bar ---------- */
.bar {
  position: fixed; bottom: 0; left: 50%; z-index: 40; width: 100%; max-width: var(--frame);
  display: flex; align-items: center; gap: 12px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  transform: translateX(-50%); background: #fff; box-shadow: 0 -1px 0 var(--line), 0 -8px 24px rgba(0, 0, 0, .05);
}
body.has-tabs .bar { bottom: var(--tab-h); padding-bottom: 24px; }
body.has-tabs.has-bar main { padding-bottom: calc(var(--tab-h) + 130px); }
.bar .sum { display: flex; flex-direction: column; line-height: 1.3; }
.bar .sum small { color: var(--muted); font-size: 12px; }
.bar .sum b { font-size: 17px; font-weight: 800; white-space: nowrap; }
.bar .btn { flex: 1; }
.stepper { display: flex; align-items: center; height: 50px; border-radius: 14px; background: var(--chip); }
.stepper button { width: 42px; height: 100%; border: 0; background: none; font-size: 20px; font-weight: 700; cursor: pointer; }
.stepper input, .stepper output { width: 30px; border: 0; background: none; text-align: center; font-weight: 800; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper.sm { height: 36px; border-radius: 11px; }
.stepper.sm button { width: 34px; font-size: 17px; }
.stepper.sm output { width: 22px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 50px; padding: 0 20px;
  border: 0; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; transition: transform .12s;
}
.btn:active { transform: scale(.97); }
.btn:disabled { background: #cfcbd2; cursor: not-allowed; }
.btn.dark { background: var(--ink); }
.btn.ghost { background: var(--chip); color: var(--ink); }
.btn.block { width: 100%; }
.btn .amt { font-weight: 700; opacity: .9; }

/* ---------- Cart ---------- */
.lines { display: flex; flex-direction: column; gap: 10px; padding: 0 16px; }
.line-item { display: grid; grid-template-columns: 82px 1fr; gap: 12px; padding: 10px; border-radius: 18px; background: var(--chip); }
.line-item .ph-box { width: 82px; height: 82px; border-radius: 13px; }
.li-body { display: flex; flex-direction: column; min-width: 0; }
.li-top { display: flex; justify-content: space-between; gap: 8px; }
.li-top b { font-weight: 700; line-height: 1.35; }
.li-top small { display: block; color: var(--muted); font-size: 12px; }
.li-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 8px; }
.li-bottom .stepper { background: #fff; }
.del { width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; }
.del svg.i { width: 18px; height: 18px; }
.note { margin: 14px 16px 0; padding: 13px 14px; border-radius: 14px; background: var(--brand-soft); font-size: 13px; font-weight: 700; }
.meter { height: 7px; margin-top: 9px; border-radius: 4px; background: color-mix(in srgb, var(--brand) 18%, #fff); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }
.note.ok { background: color-mix(in srgb, var(--success) 10%, #fff); color: var(--success); }

/* ---------- Checkout ---------- */
.blk { margin: 22px 16px 10px; font-size: 16px; font-weight: 800; }
.blk:first-child { margin-top: 8px; }
.choices { display: grid; gap: 10px; padding: 0 16px; }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-in { display: grid; grid-template-columns: 42px 1fr 22px; align-items: center; gap: 12px; padding: 13px; border-radius: 16px; box-shadow: 0 0 0 1.5px var(--line); }
.choice-ic { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--chip); color: var(--ink2); }
.choice-tx { display: flex; flex-direction: column; min-width: 0; line-height: 1.45; }
.choice-tx b { font-weight: 800; }
.choice-tx small { color: var(--muted); }
.tick { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 2px #dcd8de; }
.choice input:checked + .choice-in { box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); }
.choice input:checked + .choice-in .choice-ic { background: #fff; color: var(--brand); }
.choice input:checked + .choice-in .tick { box-shadow: inset 0 0 0 7px var(--brand); }
.choice input:focus-visible + .choice-in { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.fields { margin: 0 16px; padding: 2px 14px; border-radius: 16px; background: var(--chip); }
.field { display: block; padding: 11px 0; }
.field + .field { border-top: 1px solid #e7e4ea; }
.field span { display: block; margin-bottom: 3px; color: var(--muted); font-size: 12px; font-weight: 700; }
.field input, .field textarea { width: 100%; padding: 0; border: 0; background: none; outline: none; font-size: 15px; resize: none; }
.field textarea { min-height: 52px; }
.field:focus-within span { color: var(--brand); }
.summary { margin: 0 16px; padding: 4px 14px; border-radius: 16px; background: var(--chip); }
.srow { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13.5px; }
.srow + .srow { border-top: 1px solid #e7e4ea; }
.srow span:first-child { color: var(--ink2); }
.srow .q { color: var(--muted); }
.srow.save span:last-child { color: var(--success); font-weight: 700; }
.srow.total { font-size: 15.5px; font-weight: 800; }
.srow.total span:first-child { color: var(--ink); }

/* ---------- Messages & empty states ---------- */
.flash { margin: 8px 16px 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--success) 10%, #fff); color: var(--success); font-weight: 700; font-size: 13.5px; }
.flash.err { background: color-mix(in srgb, var(--danger) 9%, #fff); color: var(--danger); }
.toast-wrap { position: fixed; top: 12px; left: 50%; z-index: 60; width: calc(100% - 32px); max-width: 408px; transform: translateX(-50%); pointer-events: none; }
.toast-wrap .flash { margin: 0; box-shadow: 0 8px 24px rgba(0, 0, 0, .12); background: var(--ink); color: #fff; animation: toast 3.2s forwards; }
.toast-wrap .flash.live { display: flex; align-items: center; justify-content: space-between; gap: 12px; pointer-events: auto; animation: toast-in .25s var(--ease) both; }
.toast-wrap .flash.live a { flex: 0 0 auto; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); color: var(--gold); font-weight: 800; }
.toast-wrap .flash.bye { animation: toast-out .3s forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(10px); } }
@keyframes toast { 0% { opacity: 0; transform: translateY(-8px); } 8%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.empty { padding: 60px 24px; text-align: center; }
.empty-ic { width: 78px; height: 78px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.empty-ic svg.i { width: 34px; height: 34px; }
.empty h2 { font-size: 18px; font-weight: 800; }
.empty p { margin: 6px 0 20px; color: var(--ink2); }
.done { margin: 8px 16px 0; padding: 34px 18px 22px; border-radius: 24px; background: var(--chip); text-align: center; }
.done .empty-ic { background: color-mix(in srgb, var(--success) 13%, #fff); color: var(--success); }
.done h2 { font-size: 20px; font-weight: 800; }
.done p { margin-top: 6px; color: var(--ink2); }
.order-no { display: inline-block; margin: 14px 0 18px; padding: 7px 16px; border-radius: 999px; background: #fff; font-weight: 800; }
.done .summary { margin: 0 0 18px; background: #fff; text-align: start; }
.done .btn + .btn { margin-top: 10px; }

/* ---------- Account menu ---------- */
.menu { margin: 0 16px; border-radius: 18px; background: var(--chip); overflow: hidden; }
.menu a, .menu .row { display: flex; align-items: center; gap: 12px; padding: 14px; }
.menu a + a, .menu a + .row, .menu .row + a { border-top: 1px solid #e7e4ea; }
.menu .ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #fff; color: var(--brand); }
.menu .ic svg.i { width: 19px; height: 19px; }
.menu .tx { flex: 1; min-width: 0; }
.menu .tx b { display: block; font-weight: 700; }
.menu .tx small { color: var(--muted); }
.menu .go { color: var(--muted); }
.menu .go svg.i { width: 18px; height: 18px; }
.status-pill { padding: 3px 10px; border-radius: 999px; background: #fff; font-size: 12px; font-weight: 700; color: var(--brand); }

/* ---------- Footer ---------- */
.foot { padding: 4px 16px 0; text-align: center; color: var(--muted); font-size: 12px; }
body.has-bar .foot { display: none; }

/* ---------- Tab bar with raised cart ---------- */
.tabs {
  position: fixed; bottom: 0; left: 50%; z-index: 50; width: 100%; max-width: var(--frame);
  height: calc(var(--tab-h) + env(safe-area-inset-bottom)); padding: 0 8px env(safe-area-inset-bottom);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  transform: translateX(-50%); background: #fff; box-shadow: 0 -1px 0 var(--line);
}
.tab { display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 11px; font-weight: 700; }
.tab svg.i { width: 24px; height: 24px; }
.tab.on { color: var(--brand); }
.tab.on svg.i { stroke-width: 2.2; }
.tab-cart { position: relative; justify-self: center; width: 60px; height: 60px; margin-top: -34px; display: grid; place-items: center; border-radius: 50%; border: 5px solid #fff; background: var(--brand); color: #fff; box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 40%, transparent); }
.tab-cart svg.i { width: 25px; height: 25px; }
.tab-cart b { position: absolute; top: -5px; inset-inline-end: -5px; min-width: 22px; height: 22px; padding: 0 5px; border: 2px solid #fff; border-radius: 11px; background: var(--ink); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }

/* ==========================================================
   v4: Kuwait checkout, gifts, tracking, occasions, pages
   ========================================================== */
.js [data-hidden] { display: none !important; }
.field select { width: 100%; padding: 0; border: 0; background: none; outline: none; font-size: 15px; font-weight: 700; color: var(--ink); appearance: none; -webkit-appearance: none; }
.field em { font-style: normal; font-weight: 400; color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; border-top: 1px solid #e7e4ea; }
.field-row .field + .field { border-top: 0; }
.field + .field-row { margin-top: 0; }
.phone-in { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; color: var(--ink) !important; font-size: 15px !important; }
.phone-in b { padding: 2px 8px; border-radius: 8px; background: #fff; font-weight: 700; font-size: 13px; color: var(--ink2); }

.days { display: flex; gap: 8px; padding: 0 16px; overflow-x: auto; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: 0 0 auto; padding: 9px 15px; border: 0; border-radius: 12px; background: var(--chip); font-weight: 700; font-size: 13px; color: var(--ink2); cursor: pointer; }
.day.on { background: var(--ink); color: #fff; }
.slots { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; padding: 0 16px; }
.slot { position: relative; cursor: pointer; }
.slot input { position: absolute; opacity: 0; pointer-events: none; }
.slot span { display: block; padding: 11px 8px; border-radius: 12px; box-shadow: 0 0 0 1.5px var(--line); text-align: center; font-weight: 700; font-size: 13px; }
.slot input:checked + span { box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); color: var(--brand); }
.slot input:focus-visible + span { outline: 2.5px solid var(--brand); outline-offset: 2px; }

.gift-toggle { position: relative; display: grid; grid-template-columns: 42px 1fr 46px; align-items: center; gap: 12px; margin: 22px 16px 10px; padding: 13px; border-radius: 16px; background: var(--brand-soft); cursor: pointer; }
.gift-toggle input { position: absolute; opacity: 0; }
.gift-toggle .choice-ic { background: #fff; color: var(--brand); }
.switch { position: relative; width: 46px; height: 28px; border-radius: 14px; background: #d9d4dc; transition: background .15s; }
.switch::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: inset-inline-start .15s; }
.gift-toggle input:checked ~ .switch { background: var(--brand); }
.gift-toggle input:checked ~ .switch::after { inset-inline-start: 21px; }
.gift-toggle input:focus-visible ~ .switch { outline: 2.5px solid var(--brand); outline-offset: 2px; }
.gift-fields { margin-top: 0; }

.coupon { display: flex; gap: 8px; padding: 0 16px; }
.coupon input { flex: 1; height: 50px; padding: 0 14px; border: 0; border-radius: 14px; background: var(--chip); font-weight: 700; letter-spacing: .5px; outline: none; text-transform: uppercase; }
.coupon input:focus { box-shadow: 0 0 0 2px var(--brand); background: #fff; }
.coupon-on { display: flex; justify-content: space-between; align-items: center; margin: 0 16px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--success) 10%, #fff); color: var(--success); font-weight: 700; }
.coupon-on span { display: flex; align-items: center; gap: 6px; }
.coupon-on svg.i { width: 18px; height: 18px; }
.coupon-msg { margin: 8px 16px 0; font-size: 13px; font-weight: 700; }
.coupon-msg.err { color: var(--danger); }
.coupon-msg.ok { color: var(--success); }
.link-btn { padding: 0; border: 0; background: none; color: var(--danger); font-weight: 700; cursor: pointer; }
.terms-note { margin: 14px 16px 0; color: var(--muted); font-size: 12px; text-align: center; }
.terms-note a { color: var(--brand); font-weight: 700; }

.deal-tag { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 7px; background: var(--brand-soft); color: var(--brand); font-size: 11px; font-weight: 800; }
.deal-note { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 11px 13px; border-radius: 14px; background: var(--brand-soft); color: var(--brand); font-weight: 700; font-size: 13px; }
.deal-note svg.i { width: 19px; height: 19px; }
.p-price .badge-off + .badge-off { margin-inline-start: 0; }

.occasions .occasion { flex: 0 0 78%; }
.occasion { position: relative; display: block; height: 130px; border-radius: 18px; overflow: hidden; background: var(--brand); color: #fff; scroll-snap-align: start; }
.occasion img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.occasion span { position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.occasion b { display: block; font-size: 16px; font-weight: 800; }
.occasion small { display: block; font-size: 12px; opacity: .9; }

.track-head { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.track-head > div { padding: 12px 14px; border-radius: 16px; background: var(--chip); }
.track-head small { display: block; color: var(--muted); font-size: 12px; }
.track-head b { display: block; font-size: 16px; font-weight: 800; }
.track-head span { font-size: 12px; color: var(--ink2); }
.timeline { list-style: none; margin: 20px 0 6px; padding: 0; }
.timeline li { position: relative; display: flex; align-items: center; gap: 12px; padding-bottom: 22px; color: var(--muted); font-weight: 700; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; top: 30px; bottom: 2px; inset-inline-start: 14px; width: 2px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: relative; z-index: 1; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: var(--chip); box-shadow: inset 0 0 0 2px var(--line); color: #fff; }
.timeline .dot svg.i { width: 16px; height: 16px; stroke-width: 2.6; }
.timeline li.done, .timeline li.now { color: var(--ink); }
.timeline li.done .dot, .timeline li.now .dot { background: var(--brand); box-shadow: none; }
.timeline li.done::before { background: var(--brand); }
.timeline li.now .dot { box-shadow: 0 0 0 5px var(--brand-soft); }

.prose { padding: 4px 16px 0; color: var(--ink2); line-height: 1.85; font-size: 14.5px; }
.prose p { margin: 0 0 14px; }
.prose ul { margin: 0 0 14px; padding-inline-start: 20px; }
.intro { margin: 4px 0 14px; color: var(--ink2); line-height: 1.75; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; margin-bottom: 6px; }
.foot-links a { color: var(--ink2); }
.optin { display: flex; align-items: center; gap: 10px; margin: 12px 16px 0; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, #25d366 10%, #fff); color: #0f6d3a; font-weight: 700; font-size: 13px; cursor: pointer; }
.optin input { width: 18px; height: 18px; accent-color: #128c4b; }
.optin svg.i { width: 20px; height: 20px; }

/* ---------- Header styles (chosen in admin settings) ---------- */
.announce {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 16px; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; text-align: center;
}
.announce svg.i { width: 15px; height: 15px; color: var(--gold); }
.home-top .end { align-items: center; }

/* Centered logo */
.home-top.center { display: grid; grid-template-columns: 42px 1fr 42px; gap: 8px; padding: 14px 16px 16px; }
.home-top.center .mid { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; text-align: center; }
.home-top.center .logo { width: 52px; height: 52px; margin-bottom: 4px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 3px var(--brand-soft); }
.home-top.center b { font-size: 19px; font-weight: 800; color: var(--brand); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-top.center small { color: var(--muted); font-size: 12px; }

/* Colored block with the search inside */
.home-top.color {
  display: block; padding: 16px 16px 20px; margin-bottom: 4px; color: #fff;
  background: linear-gradient(150deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #000));
  border-radius: 0 0 28px 28px;
}
.home-top.color .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.home-top.color .who small { color: rgba(255, 255, 255, .78); }
.home-top.color .avatar { background: rgba(255, 255, 255, .2); color: #fff; box-shadow: 0 0 0 2px rgba(255, 255, 255, .35); }
.home-top.color .ibtn { background: rgba(255, 255, 255, .16); color: #fff; }
.home-top.color .search { padding: 0; }
.home-top.color .search-box input { background: #fff; color: var(--ink); box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.home-top.color .search-box input:focus { box-shadow: 0 0 0 2px var(--gold); }
.home-top.color .filter-btn { background: var(--gold); color: var(--ink); }

/* ==========================================================
   v7: desktop layout, quick add, motion
   ========================================================== */
[hidden] { display: none !important; }
html.locked { overflow: hidden; }

/* Product cards: image block holds the quick-add and favorite buttons */
.ph-wrap { position: relative; }
.ph-wrap > .ph-box { display: block; }
.pcard .ph-wrap .fav-form { top: 8px; }
.pc-info { display: block; }
.qa-form { position: absolute; bottom: 8px; inset-inline-end: 8px; margin: 0; }
.ph-wrap > .add-ic { position: absolute; bottom: 8px; inset-inline-end: 8px; }
.add-ic { position: static; border: 0; padding: 0; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .18); transition: transform .18s var(--ease), background .2s; }
.add-ic:hover { background: var(--brand); }
.add-ic:active { transform: scale(.9); }
.add-ic.busy { opacity: .6; pointer-events: none; }
.add-ic.done { background: var(--success); animation: pop .4s var(--ease); }
.ph-box img { transition: transform .5s var(--ease); }
.pcard .pc-info h3 { transition: color .15s; }
@media (hover: hover) {
  .pcard:hover .ph-box img { transform: scale(1.06); }
  .pcard:hover .pc-info h3 { color: var(--brand); }
}
@keyframes pop { 40% { transform: scale(1.2); } }

/* Cart count bump after adding */
.bump { animation: bump .5s var(--ease); }
@keyframes bump { 30% { transform: scale(1.16); } 60% { transform: scale(.95); } }

/* Toasts sit above the tab bar on phones, where the thumb is */
.toast-wrap { top: auto; bottom: calc(var(--tab-h) + 18px + env(safe-area-inset-bottom)); }
body:not(.has-tabs) .toast-wrap { bottom: 24px; }
body.has-bar .toast-wrap { bottom: 104px; }
body.has-tabs.has-bar .toast-wrap { bottom: calc(var(--tab-h) + 104px); }

/* Tab bar: frosted glass with an active dot */
.tabs { background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.tab { position: relative; transition: color .15s; }
.tab.on::after { content: ""; width: 5px; height: 5px; margin-top: 1px; border-radius: 50%; background: var(--brand); }
.tab-cart { transition: transform .15s; }
.tab-cart:active { transform: scale(.92); }

/* Home search stays reachable while scrolling */
.sticky-search { position: sticky; top: 0; z-index: 25; padding: 8px 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
body.scrolled .sticky-search { box-shadow: 0 6px 16px rgba(20, 10, 30, .05); }

/* Back to top */
.to-top {
  position: fixed; inset-inline-end: 16px; bottom: calc(var(--tab-h) + 18px); z-index: 44;
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%;
  background: #fff; color: var(--ink); box-shadow: var(--shadow-lg); cursor: pointer;
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s, transform .2s var(--ease);
}
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
body:not(.has-tabs) .to-top { bottom: 24px; }
body.has-bar .to-top { bottom: 104px; }
.to-top svg.i { width: 20px; height: 20px; }

/* Quick-add sheet: bottom sheet on phones, dialog on desktop */
.sheet { position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-end; justify-content: center; }
.sheet-back { position: absolute; inset: 0; background: rgba(15, 12, 18, .45); opacity: 0; transition: opacity .22s; }
.sheet-card {
  position: relative; width: 100%; max-width: var(--frame); max-height: 88vh; overflow: auto;
  padding: 10px 16px calc(18px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: #fff;
  transform: translateY(100%); transition: transform .28s var(--ease);
}
.sheet.open .sheet-back { opacity: 1; }
.sheet.open .sheet-card { transform: none; }
.sheet-grip { display: block; width: 40px; height: 5px; margin: 0 auto 12px; border-radius: 3px; background: #ddd9e0; }
.sheet-x { position: absolute; top: 14px; inset-inline-end: 14px; }
.qs-head { display: grid; grid-template-columns: 88px 1fr; gap: 14px; align-items: center; padding-inline-end: 50px; }
.qs-img { display: block; width: 88px; height: 88px; border-radius: 16px; }
.qs-head b { display: block; font-size: 17px; font-weight: 800; line-height: 1.35; }
.qs-price { display: flex; align-items: baseline; gap: 8px; margin-top: 3px; }
.qs-price b { font-size: 18px; }
.qs-price s { color: var(--muted); font-size: 13px; }
.qs-more { display: inline-block; margin-top: 4px; color: var(--brand); font-size: 12.5px; font-weight: 700; }
.qs-foot { display: flex; gap: 12px; margin-top: 22px; }
.qs-foot .btn { flex: 1; }
.btn.busy { opacity: .7; }

/* Breadcrumbs and desktop-only pieces are hidden on phones */
.site-head, .crumbs, .cart-side-title, .cart-side .summary, .keep-shopping { display: none; }

/* Footer */
.foot { padding: 18px 16px 0; }
.foot-cols { display: grid; gap: 10px; justify-items: center; }
.foot-brand b { font-size: 14px; color: var(--ink); }
.foot-logo { display: block; width: 92px; height: auto; margin: 0 auto 4px; }
.avatar img { object-fit: contain; }
.avatar:has(img) { background: #fff; box-shadow: 0 0 0 1.5px var(--brand-soft); }
.sh-brand b, .who b { color: var(--brand); }
.foot-brand p { display: none; }
.foot-contact { display: flex; gap: 16px; }
.foot-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); font-weight: 700; }
.foot-contact svg.i { width: 17px; height: 17px; color: var(--brand); }
.foot-copy { margin-top: 10px; }
.foot-contact { flex-wrap: wrap; justify-content: center; gap: 8px 16px; }
.foot-contact .fc-row { display: inline-flex; align-items: center; gap: 6px; color: var(--ink2); font-weight: 700; }
.foot-contact .fc-row svg.i { width: 17px; height: 17px; color: var(--brand); }

/* Pickup location with hours and a map button */
.pickup-card { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 12px; margin: 0 16px; padding: 13px; border-radius: 16px; background: var(--brand-soft); text-align: start; }
.pickup-card .choice-ic { background: #fff; color: var(--brand); }
.pickup-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.45; }
.pickup-tx b { font-weight: 800; }
.pickup-tx small { display: flex; align-items: center; gap: 5px; color: var(--ink2); font-weight: 700; }
.pickup-tx small svg.i { width: 15px; height: 15px; color: var(--brand); }
.map-btn { height: 40px; padding: 0 14px; border-radius: 12px; background: #fff; color: var(--brand); font-size: 13px; white-space: nowrap; }
@media (max-width: 420px) {
  .pickup-card { grid-template-columns: 42px 1fr; }
  .map-btn { grid-column: 1 / -1; }
}
.done .pickup-card { margin: 0 0 12px; }
.shop-cats { margin-top: 14px; }

/* Option groups (e.g. color × size) */
.js .combo-list { display: none; }
.og + .og { margin-top: 4px; }
.og .opt-title { margin: 16px 0 8px; }
.og-sel { color: var(--brand); }
.og-vals { display: flex; flex-wrap: wrap; gap: 8px; }
.og-val { min-width: 52px; padding: 9px 15px; border: 0; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1.5px var(--line); font-weight: 700; cursor: pointer; transition: box-shadow .15s, background .15s; }
.og-val:hover:not(:disabled) { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, #fff); }
.og-val.on { box-shadow: 0 0 0 2px var(--brand); background: var(--brand-soft); color: var(--brand); }
.og-val.na:not(.on) { color: var(--muted); text-decoration: line-through; }
.og-val:disabled { opacity: .4; cursor: not-allowed; }
.p-sku { margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.p-sku b { color: var(--ink2); }

/* Product photo gallery */
.gallery { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; }
.gallery::-webkit-scrollbar { display: none; }
.gallery img { flex: 0 0 100%; scroll-snap-align: start; }
.g-dots { position: absolute; bottom: 36px; inset-inline: 0; z-index: 4; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.g-dots i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .65); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); transition: width .2s; }
.g-dots i.on { width: 20px; background: #fff; }
.g-thumbs { display: none; }

/* Second photo on hover (desktop) */
.ph-box img.alt { position: absolute; inset: 0; opacity: 0; transition: opacity .35s, transform .5s var(--ease); }
@media (hover: hover) { .pcard:hover .ph-box img.alt { opacity: 1; } }
.cat img.ph-logo { padding: 14px; background: #fff; object-fit: contain; }
.noimg.has-logo { background: linear-gradient(160deg, var(--brand-soft), color-mix(in srgb, var(--gold) 16%, #fff)); }
.ph-box .noimg.has-logo img { width: 58%; height: 58%; object-fit: contain; opacity: .55; mix-blend-mode: multiply; }
@media (min-width: 900px) { .pickup-card { margin-inline: 0; } }

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  body { background: #f7f6f8; }
  .app { max-width: none; box-shadow: none; background: transparent; }
  .tabs, .home-top, .sticky-search { display: none; }

  .site-head {
    display: block; position: sticky; top: 0; z-index: 45;
    background: rgba(255, 255, 255, .9); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line); transition: box-shadow .2s;
  }
  body.scrolled .site-head { box-shadow: 0 6px 24px rgba(20, 10, 30, .06); }
  .sh-in { display: flex; align-items: center; gap: 26px; max-width: 1240px; height: 72px; margin: 0 auto; padding: 0 28px; }
  .sh-brand { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 800; white-space: nowrap; }
  .sh-brand .avatar { flex-basis: 40px; width: 40px; height: 40px; font-size: 16px; }
  .sh-nav { display: flex; gap: 4px; }
  .sh-nav a { padding: 8px 15px; border-radius: 999px; color: var(--ink2); font-weight: 700; transition: background .15s, color .15s; }
  .sh-nav a:hover { background: var(--chip); color: var(--ink); }
  .sh-nav a.on { background: var(--brand-soft); color: var(--brand); }
  .sh-search { position: relative; flex: 1; max-width: 400px; margin-inline-start: auto; }
  .sh-search input { width: 100%; height: 44px; padding-inline: 42px 16px; border: 0; border-radius: 999px; background: var(--chip); outline: none; transition: background .15s, box-shadow .15s; }
  .sh-search input:focus { background: #fff; box-shadow: 0 0 0 2px var(--brand); }
  .sh-search svg.i { position: absolute; top: 50%; inset-inline-start: 15px; width: 19px; height: 19px; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
  .sh-end { display: flex; align-items: center; gap: 8px; }
  .sh-cart {
    display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 999px;
    background: var(--brand); color: #fff; font-weight: 800; white-space: nowrap;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 30%, transparent); transition: transform .15s;
  }
  .sh-cart:hover { transform: translateY(-1px); }
  .sh-cart svg.i { width: 20px; height: 20px; }
  .sh-count { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--brand); font-size: 12px; line-height: 22px; text-align: center; }

  main, body.has-tabs main, body.has-bar main, body.has-tabs.has-bar main { max-width: 1240px; margin: 0 auto; padding: 24px 28px 64px; }
  body.narrow main { max-width: 780px; }
  .topbar { position: static; display: flex; max-width: 1240px; margin: 0 auto; padding: 28px 28px 0; background: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  body.narrow .topbar { max-width: 780px; }
  .topbar h1 { font-size: 26px; text-align: start; }
  .topbar .spacer { display: none; }
  .announce { font-size: 13px; padding: 9px 16px; }

  .search, .chips, .cats, .grid, .hrow, .ranks, .banners, .lines { padding-inline: 0; }
  .sec-head, .toolbar { margin-inline: 0; }
  .mode { max-width: 380px; margin: 0 0 4px; }
  .search { max-width: 560px; }

  .banners { gap: 16px; margin-top: 8px; }
  .banner { aspect-ratio: 3.2 / 1; border-radius: 26px; }
  .banner .cap { padding: 80px 44px 36px; }
  .banner .cap b { max-width: 60%; font-size: 32px; }
  .banner .cap span { margin-top: 14px; padding: 9px 20px; font-size: 14px; }

  .sec { margin-top: 44px; }
  .sec-head { margin-bottom: 18px; }
  .sec-head h2 { font-size: 24px; }
  .cats { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
  .cat { height: 124px; padding: 18px; padding-inline-end: 96px; font-size: 17px; transition: transform .2s var(--ease), box-shadow .2s; }
  .cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .cat img, .cat .ph { width: 118px; height: 118px; }

  .hrow, .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 30px 22px; overflow: visible; }
  .hrow .pcard { flex: none; }
  .hrow.occasions { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
  .occasion { height: 190px; border-radius: 22px; }
  .ranks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .rank { background: #fff; box-shadow: var(--shadow); }
  .ph-box { border-radius: 20px; }
  .pcard h3 { margin-top: 12px; font-size: 15px; }
  .add-ic { width: 40px; height: 40px; border-radius: 13px; }
  .chips { flex-wrap: wrap; }
  .chip { transition: background .15s; }
  .chip:hover:not(.on) { background: #ebe8ee; }

  /* Product: photo on one side, details and buy box on the other */
  .crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 18px; color: var(--muted); font-size: 13px; }
  .crumbs a:hover { color: var(--brand); }
  .crumbs svg.i { width: 14px; height: 14px; }
  .crumbs [aria-current] { color: var(--ink); font-weight: 700; }
  .p-layout { display: grid; grid-template-columns: 1.05fr 1fr; gap: 52px; align-items: start; }
  .p-media { position: sticky; top: 96px; }
  .p-hero { border-radius: 28px; overflow: hidden; }
  .g-dots { bottom: 14px; }
  .g-thumbs { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
  .g-thumbs button { flex: 0 0 78px; height: 78px; padding: 0; border: 0; border-radius: 14px; overflow: hidden; background: var(--chip); cursor: pointer; opacity: .6; box-shadow: 0 0 0 2px transparent; transition: opacity .15s, box-shadow .15s; }
  .g-thumbs button:hover { opacity: .9; }
  .g-thumbs button.on { opacity: 1; box-shadow: 0 0 0 2px var(--brand); }
  .g-thumbs img { width: 100%; height: 100%; object-fit: cover; }
  .p-actions > a, .p-actions .group > a { display: none; }
  .p-actions { justify-content: flex-end; }
  .p-sheet { margin: 0; padding: 4px 0 0; border-radius: 0; background: none; }
  .p-name { font-size: 32px; }
  .p-price b { font-size: 28px; }
  .facts { background: #fff; box-shadow: var(--shadow); }
  .p-buy { position: static; width: auto; max-width: none; margin-top: 26px; padding: 18px; transform: none; border-radius: 20px; background: #fff; box-shadow: var(--shadow); }
  .opt span { transition: box-shadow .15s, background .15s; }
  .opt:hover span { box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--brand) 45%, #fff); }

  /* Cart: items beside a sticky summary */
  .cart-layout { display: grid; grid-template-columns: 1fr 370px; gap: 32px; align-items: start; }
  .line-item { grid-template-columns: 112px 1fr; padding: 14px; background: #fff; box-shadow: var(--shadow); }
  .line-item .ph-box { width: 112px; height: 112px; }
  .li-bottom .stepper { background: var(--chip); }
  .note { margin: 14px 0 0; }
  .cart-side { position: sticky; top: 96px; padding: 22px; border-radius: 24px; background: #fff; box-shadow: var(--shadow); }
  .cart-side-title { display: block; margin-bottom: 12px; font-size: 18px; font-weight: 800; }
  .cart-side .summary { display: block; margin: 0; }
  .cart-buy { position: static; flex-direction: column; align-items: stretch; width: auto; max-width: none; margin-top: 16px; padding: 0; transform: none; box-shadow: none; }
  .cart-buy .sum { display: none; }
  .cart-buy .btn { flex: none; }
  .cart-side .summary { background: var(--chip); box-shadow: none; }
  .keep-shopping { display: block; margin-top: 14px; color: var(--brand); font-weight: 700; text-align: center; }

  /* Checkout and other narrow pages keep their bottom bar inside the column */
  body.narrow .bar { max-width: 780px; border-radius: 22px 22px 0 0; }
  .fields, .summary, .choices, .menu { background: #fff; box-shadow: var(--shadow); }
  .choices { padding: 0; background: none; box-shadow: none; }
  .fields, .summary, .menu, .slots, .days, .coupon, .coupon-on, .optin, .gift-toggle, .blk, .terms-note, .note, .flash, .coupon-msg { margin-inline: 0; }
  .slots, .days, .coupon { padding-inline: 0; }

  .to-top, body.has-bar .to-top, body:not(.has-tabs) .to-top { bottom: 28px; inset-inline-end: 28px; }
  .toast-wrap, body.has-bar .toast-wrap, body:not(.has-tabs) .toast-wrap { top: 88px; bottom: auto; left: auto; inset-inline-end: 28px; width: 380px; transform: none; }

  .foot, body.has-bar .foot { display: block; margin-top: 40px; padding: 44px 28px 26px; background: #fff; border-top: 1px solid var(--line); text-align: start; }
  .foot-cols { grid-template-columns: 2fr 1.6fr 1fr; justify-items: stretch; gap: 40px; max-width: 1240px; margin: 0 auto; }
  .foot-brand b { font-size: 18px; font-weight: 800; }
  .foot-logo { width: 128px; margin: 0 0 6px; }
  .foot-brand p { display: block; margin-top: 6px; color: var(--ink2); }
  .foot-links { flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 8px; margin: 0; }
  .foot-links a:hover, .foot-contact a:hover { color: var(--brand); }
  .foot-contact { flex-direction: column; gap: 10px; }
  .foot-copy { max-width: 1240px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--line); }

  .sheet { align-items: center; }
  .sheet-card { max-width: 480px; padding: 22px; border-radius: 26px; opacity: 0; transform: translateY(16px) scale(.97); transition: opacity .2s, transform .25s var(--ease); }
  .sheet.open .sheet-card { opacity: 1; transform: none; }
  .sheet-grip { display: none; }
}
