/* ==========================================================
   Storefront — mobile app design system
   --brand and --gold are injected from the admin settings.
   ========================================================== */
:root {
  --brand: #c8205a;
  --gold: #f2b631;
  --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;
  --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; }
@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); }
