/* The shop (السستم). Clean and quiet so the owner's photos and colour lead; glass header and tab bar like Sultan's sites.
   The owner's choices arrive as attributes on <html>: data-mode (auto/light/dark), data-font (modern/classic/bold),
   data-radius (soft/round/sharp), and --accent / --cols set by js/shop.js. */

/* ---------- tokens ---------- */
:root {
  --accent: #0a84ff; --on-accent: #fff; --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --bg: #fff; --card: #fff; --ink: #15171b; --sub: #6a707d; --line: rgb(21 23 27 / .08); --fill: rgb(118 118 128 / .12);
  --sale: #e5484d; --ok: #1f9d55; --warn: #b8690a;
  --glass: rgb(255 255 255 / .8); --glass-edge: rgb(21 23 27 / .06); --shadow: 0 0 0 1px rgb(21 23 27 / .06), 0 10px 28px -16px rgb(21 23 27 / .22);
  --r: 16px; --r-sm: 11px; --r-lg: 24px; --r-pill: 999px;
  --font-d: "Readex Pro", "IBM Plex Sans Arabic", system-ui, sans-serif; --font-b: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1); --ease-io: cubic-bezier(.77, 0, .175, 1);
  --pad: 16px; --maxw: 1180px; --cols: 2; --tabs-h: 76px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root[data-mode="auto"] { --bg: #000; --card: #1c1c1e; --ink: #f5f5f7; --sub: #98989f; --line: rgb(255 255 255 / .1); --fill: rgb(118 118 128 / .24);
    --glass: rgb(28 28 30 / .72); --glass-edge: rgb(255 255 255 / .08); --shadow: 0 8px 24px -12px rgb(0 0 0 / .7); --sale: #ff6369; --ok: #3dd68c; color-scheme: dark; }
}
:root[data-mode="dark"] { --bg: #000; --card: #1c1c1e; --ink: #f5f5f7; --sub: #98989f; --line: rgb(255 255 255 / .1); --fill: rgb(118 118 128 / .24);
  --glass: rgb(28 28 30 / .72); --glass-edge: rgb(255 255 255 / .08); --shadow: 0 8px 24px -12px rgb(0 0 0 / .7); --sale: #ff6369; --ok: #3dd68c; color-scheme: dark; }
:root[data-font="classic"] { --font-d: "Noto Naskh Arabic", "Noto Sans Arabic", serif; --font-b: "Noto Sans Arabic", system-ui, sans-serif; }
:root[data-font="bold"] { --font-d: "Alexandria", "IBM Plex Sans Arabic", sans-serif; --font-b: "IBM Plex Sans Arabic", system-ui, sans-serif; }
:root[data-radius="round"] { --r: 24px; --r-sm: 16px; --r-lg: 32px; }
:root[data-radius="sharp"] { --r: 4px; --r-sm: 3px; --r-lg: 6px; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body { margin: 0; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 15.5px/1.6 var(--font-b); -webkit-font-smoothing: antialiased; overflow-x: clip;
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom, 0px)); }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-d); font-weight: 600; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
svg.i { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; z-index: 100; background: var(--card); padding: 8px 14px; border-radius: 10px; }
.skip:focus { top: 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--sub); }
.wrap { width: min(var(--maxw), 100% - 2 * var(--pad)); margin-inline: auto; }
.noscript { padding: 40px 20px; text-align: center; }
[hidden] { display: none !important; }

/* ---------- buttons, fields ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding-inline: 22px; border-radius: var(--r-sm); font-weight: 600; font-size: 15.5px;
  transition: transform 140ms var(--ease), background-color 200ms, opacity 200ms; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-soft { background: var(--fill); }
.btn-line { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding-inline: 14px; font-size: 14px; border-radius: calc(var(--r-sm) - 2px); }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; position: relative; transition: transform 140ms var(--ease), background-color 200ms; }
.icon-btn:active { transform: scale(.92); }
.field { display: grid; gap: 6px; }
.field > span { font-size: 13.5px; font-weight: 600; color: var(--sub); }
.input { width: 100%; height: 50px; padding-inline: 14px; border: 0; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); outline: none;
  transition: box-shadow 160ms; }
.input:focus { box-shadow: inset 0 0 0 2px var(--accent); }
textarea.input { height: auto; padding-block: 12px; resize: vertical; }
select.input { appearance: none; padding-inline-end: 38px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat 14px 50% / 16px; }
.err { color: var(--sale); font-size: 13.5px; }
.err:empty { display: none; }
.input.bad { box-shadow: inset 0 0 0 2px var(--sale); }

/* ---------- loading ---------- */
.boot { width: min(var(--maxw), 100% - 32px); margin: 18px auto; display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 12px; }
.boot i { aspect-ratio: 3 / 4; border-radius: var(--r); background: linear-gradient(100deg, var(--fill) 30%, color-mix(in srgb, var(--fill) 40%, transparent) 50%, var(--fill) 70%) 0 0 / 300% 100%;
  animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -300% 0; } }

/* ---------- the opening ---------- */
.intro { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--bg); pointer-events: none; }
.intro.gone { display: none; }
.intro-mark { width: 104px; height: 104px; border-radius: 28%; overflow: hidden; display: grid; place-items: center; background: var(--accent); color: var(--on-accent);
  font: 600 46px/1 var(--font-d); opacity: 0; }
.intro-mark.has-logo { background: transparent; border-radius: 0; }
.intro-mark img { width: 100%; height: 100%; object-fit: contain; }
.intro-name { font: 600 22px/1.2 var(--font-d); opacity: 0; }

/* ---------- announcement bar + header ---------- */
.announce { display: block; background: var(--fill); color: var(--ink); text-align: center; font-size: 13px; font-weight: 500; padding: 9px 16px; line-height: 1.5; }
.announce a { text-decoration: underline; text-underline-offset: 3px; }
.top { position: sticky; top: 0; z-index: 30; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 .5px 0 var(--line); transition: transform 420ms var(--ease), box-shadow 300ms; will-change: transform; }
.top.tucked { transform: translateY(calc(-100% - 1px)); box-shadow: none; }
.top-in { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; grid-template-areas: "menu brand cart" "search search search" "chips chips chips"; align-items: center; column-gap: 6px; }
.top-in .menu-btn { grid-area: menu; } .top-in .cart-btn { grid-area: cart; } .top-in .orders-btn { grid-area: orders; display: none; }
.top-in .search { grid-area: search; } .top-in .chips { grid-area: chips; }
.brand { grid-area: brand; min-height: 58px; display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.brand-mark { width: 34px; height: 34px; border-radius: 28%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); font: 600 17px/1 var(--font-d); flex: none; overflow: hidden; }
.brand-mark.has-logo { background: transparent; border-radius: 0; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font: 600 17px/1.2 var(--font-d); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge-n { position: absolute; top: 3px; inset-inline-end: 1px; min-width: 19px; height: 19px; padding-inline: 5px; border-radius: 99px; background: var(--accent); color: var(--on-accent);
  font-size: 11.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.badge-n.pop { animation: pop 380ms var(--ease); }
@keyframes pop { 40% { transform: scale(1.35); } }
.search { position: relative; padding-bottom: 10px; }
.search svg { position: absolute; inset-inline-start: 14px; top: 13px; width: 20px; height: 20px; color: var(--sub); pointer-events: none; }
.search input { width: 100%; height: 46px; border: 0; border-radius: var(--r-pill); padding-inline: 44px 16px; background: var(--fill); outline: none; transition: box-shadow 160ms, background-color 160ms; }
.search input:focus { background: var(--card); box-shadow: 0 0 0 2px var(--accent); }
.search input::-webkit-search-cancel-button { display: none; }
/* the category strip: scrolls sideways, its edges fade (The Kitchen «scroll fade list», written for the kit) */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px var(--pad) 12px; margin-inline: calc(-1 * var(--pad));
  -webkit-mask: linear-gradient(to left, transparent, #000 var(--pad), #000 calc(100% - 28px), transparent); mask: linear-gradient(to left, transparent, #000 var(--pad), #000 calc(100% - 28px), transparent); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 36px; padding-inline: 15px; border-radius: var(--r-pill); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 6px; transition: background-color 180ms, color 180ms; }
.chip[aria-current="true"], .chip[aria-pressed="true"] { background: var(--ink); color: var(--bg); box-shadow: none; }

/* ---------- tab bar (glass, bottom; a lens slides under the open tab) ---------- */
.tabs { position: fixed; z-index: 40; inset-inline: 14px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); height: 62px; padding: 6px; border-radius: 26px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(22px); backdrop-filter: saturate(1.8) blur(22px);
  box-shadow: inset 0 0 0 .5px var(--glass-edge), 0 10px 30px -10px rgb(0 0 0 / .28); max-width: 520px; margin-inline: auto; }
.tab { position: relative; z-index: 1; display: grid; place-items: center; align-content: center; gap: 1px; font-size: 11px; font-weight: 600; color: var(--sub); border-radius: 20px; }
.tab svg { width: 24px; height: 24px; }
.tab[aria-current="page"] { color: var(--accent); }
.tab .badge-n { top: 2px; inset-inline-end: calc(50% - 22px); }
.tab-lens { position: absolute; z-index: 0; top: 6px; bottom: 6px; left: 0;   /* physical left: js/shop.js measures from the bar's left edge */ border-radius: 20px; background: var(--accent-soft);
  transition: transform 420ms var(--ease), width 420ms var(--ease), opacity 200ms; pointer-events: none; }

/* ---------- sections ---------- */
main { min-height: 60vh; outline: none; }
.view { padding-block: 16px 36px; display: grid; gap: 34px; }
.sec { display: grid; gap: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sec-head h2 { font-size: 21px; }
.sec-head a { color: var(--accent); font-size: 14px; font-weight: 600; }
.crumbs { display: flex; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--sub); }
.crumbs a:hover { color: var(--ink); }
.empty { padding: 40px 16px; text-align: center; color: var(--sub); display: grid; gap: 14px; justify-items: center; }

/* banners: swipe sideways, one moves on by itself */
.banners { position: relative; }
.banner-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); }
.banner-track::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 16 / 9; overflow: hidden; background: var(--fill); }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-text { position: absolute; inset: auto 0 0 0; padding: 40px 18px 16px; color: #fff; background: linear-gradient(to top, rgb(0 0 0 / .62), transparent); display: grid; gap: 2px; }
.banner-text b { font: 600 clamp(20px, 5.4vw, 34px)/1.15 var(--font-d); }
.banner-text span { font-size: 14px; opacity: .92; }
.dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.dots button { width: 7px; height: 7px; border-radius: 99px; background: var(--fill); transition: width 300ms var(--ease), background-color 300ms; }
.dots button[aria-current="true"] { width: 20px; background: var(--ink); }

/* categories with their pictures */
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 10px; }
.cat { display: grid; justify-items: center; gap: 7px; text-align: center; font-size: 13px; font-weight: 500; line-height: 1.3; }
.cat-pic { width: 100%; max-width: 76px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--fill); display: grid; place-items: center; color: var(--sub);
  box-shadow: inset 0 0 0 1px var(--line); transition: transform 200ms var(--ease); }
.cat-pic img { width: 100%; height: 100%; object-fit: cover; }
.cat:active .cat-pic { transform: scale(.94); }

/* ---------- product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
.row-scroll { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(150px, 44%); gap: 12px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity;
  padding-inline: var(--pad); margin-inline: calc(-1 * var(--pad)); }
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; }
.card { position: relative; display: grid; grid-template-rows: auto 1fr; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); min-width: 0; }
.card-pic { position: relative; aspect-ratio: 1; background: var(--fill); overflow: hidden; }
.card-pic img { width: 100%; height: 100%; object-fit: cover; transition: transform 500ms var(--ease); }
@media (hover: hover) { .card:hover .card-pic img { transform: scale(1.04); } }
.card-pic .ph { width: 100%; height: 100%; display: grid; place-items: center; color: var(--sub); }
.tags { position: absolute; top: 8px; inset-inline-start: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.tag { height: 22px; padding-inline: 8px; border-radius: 7px; font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; background: var(--card); color: var(--ink); }
.tag.sale { background: var(--sale); color: #fff; }
.tag.new { background: var(--ink); color: var(--bg); }
.tag.deal { background: var(--accent); color: var(--on-accent); }
.tag.left { background: var(--warn); color: #fff; }
.card.out .card-pic img { opacity: .45; filter: grayscale(.6); }
.out-mark { position: absolute; inset: auto 8px 8px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgb(0 0 0 / .62); color: #fff; font-size: 12.5px; font-weight: 600; }
.card-body { display: grid; align-content: space-between; gap: 8px; padding: 11px 13px 13px; min-width: 0; }
.card-name { font-size: 14.5px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.card-brand { font-size: 12px; color: var(--sub); margin-top: -2px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-variant-numeric: tabular-nums; }
.price b { font-size: 15.5px; font-weight: 700; }
.price b small { font-size: 11.5px; font-weight: 600; }
.price s { font-size: 12.5px; color: var(--sub); }
.price.on-sale b { color: var(--sale); }
.left { font-size: 12px; color: var(--warn); font-weight: 600; }
.stars-mini { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--sub); }
.stars-mini svg { width: 13px; height: 13px; color: #f5a623; }
/* the add button on a card: becomes a ✓ for a moment after adding (The Kitchen «dynamic button» idea) */
.add { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: transform 140ms var(--ease), background-color 220ms; }
.add svg { width: 19px; height: 19px; }
.add:active { transform: scale(.88); }
.add.done { background: var(--ok); }
:root[data-cols="3"] .card-body { padding: 8px 9px 10px; }
:root[data-cols="3"] .card-name { font-size: 13px; }
:root[data-cols="3"] .add { width: 30px; height: 30px; }
.more { justify-self: center; }

/* ---------- search + lists ---------- */
.list-head { display: grid; gap: 10px; }
.list-head h1 { font-size: 24px; }
.filters { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters .chip svg { width: 17px; height: 17px; }
.count { font-size: 13.5px; color: var(--sub); }
.subcats { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }

/* ---------- product page ---------- */
.pd { display: grid; gap: 18px; }
.gallery { position: relative; margin-inline: calc(-1 * var(--pad)); }
.gal-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal-track::-webkit-scrollbar { display: none; }
.gal-track > * { flex: 0 0 100%; scroll-snap-align: center; aspect-ratio: 1; background: var(--fill); }
.gal-track img, .gal-track video { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 10px var(--pad) 0; }
.thumbs button { flex: none; width: 56px; height: 56px; border-radius: 10px; overflow: hidden; opacity: .5; transition: opacity 200ms; box-shadow: inset 0 0 0 1px var(--line); }
.thumbs button[aria-current="true"] { opacity: 1; box-shadow: 0 0 0 2px var(--accent); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-info { display: grid; gap: 12px; }
.pd-info h1 { font-size: 23px; }
.pd-brand { font-size: 13.5px; color: var(--accent); font-weight: 600; }
.pd .price b { font-size: 24px; }
.pd .price s { font-size: 15px; }
.deal-line { padding: 10px 12px; border-radius: var(--r-sm); background: var(--accent-soft); font-size: 14px; font-weight: 500; }
.countdown { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 10px; border-radius: 9px; background: color-mix(in srgb, var(--sale) 12%, transparent);
  color: var(--sale); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.opt { display: grid; gap: 8px; }
.opt-name { font-size: 14px; font-weight: 600; }
.opt-name span { color: var(--sub); font-weight: 400; }
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-values button { min-width: 48px; height: 42px; padding-inline: 14px; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-weight: 500;
  transition: box-shadow 160ms, background-color 160ms; }
.opt-values button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); font-weight: 700; }
.opt-values button.na { color: var(--sub); text-decoration: line-through; opacity: .55; }
.opt.need .opt-name { color: var(--sale); }
.qty { display: inline-flex; align-items: center; height: 50px; border-radius: var(--r-sm); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.qty button { width: 46px; height: 100%; display: grid; place-items: center; }
.qty button svg { width: 18px; height: 18px; }
.qty output { min-width: 28px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.buy { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.buy-now { grid-column: 1 / -1; }
.pd-sec { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.pd-sec h2 { font-size: 18px; }
.pd-desc { white-space: pre-line; color: color-mix(in srgb, var(--ink) 86%, var(--sub)); }
.specs { display: grid; border-radius: var(--r-sm); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.specs div { display: grid; grid-template-columns: 38% 1fr; gap: 10px; padding: 10px 14px; font-size: 14px; }
.specs div:nth-child(odd) { background: var(--fill); }
.specs dt { color: var(--sub); margin: 0; } .specs dd { margin: 0; font-weight: 500; }
.ask { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; font-size: 14px; }
/* the bar that follows on a phone once the main button scrolls away */
.sticky-buy { position: fixed; z-index: 35; inset-inline: 14px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px;
  border-radius: 20px; background: var(--glass); -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px); box-shadow: inset 0 0 0 .5px var(--glass-edge), 0 10px 30px -12px rgb(0 0 0 / .3);
  max-width: 520px; margin-inline: auto; transform: translateY(calc(100% + 100px)); transition: transform 380ms var(--ease); }
.sticky-buy.on { transform: none; }
.sticky-buy .grow { flex: 1; min-width: 0; padding-inline-start: 8px; }
.sticky-buy .grow b { display: block; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* reviews */
.rv-sum { display: flex; align-items: center; gap: 12px; }
.rv-avg { font: 700 34px/1 var(--font-d); }
.stars { display: inline-flex; gap: 1px; color: #f5a623; }
.stars svg { width: 16px; height: 16px; }
.stars .off { color: var(--fill); }
.review { display: grid; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.review:last-child { border-bottom: 0; }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.verified { font-size: 12px; color: var(--ok); font-weight: 600; }
.reply { padding: 10px 12px; border-radius: var(--r-sm); background: var(--fill); font-size: 14px; }
.reply b { display: block; font-size: 12.5px; color: var(--sub); }
.star-pick { display: flex; gap: 6px; direction: ltr; justify-content: flex-end; }
.star-pick button { color: var(--fill); }
.star-pick button svg { width: 34px; height: 34px; }
.star-pick button.on { color: #f5a623; }

/* ---------- sheets (cart, filters, menu) ---------- */
.sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; justify-content: center; background: rgb(0 0 0 / .4); animation: fade 220ms ease-out; }
.sheet-card { width: min(560px, 100%); max-height: 88dvh; overflow: auto; overscroll-behavior: contain; background: var(--bg); border-radius: 26px 26px 0 0; padding: 8px 18px calc(22px + env(safe-area-inset-bottom, 0px));
  animation: rise 360ms var(--ease); }
.sheet.side { align-items: stretch; justify-content: flex-start; }
.sheet.side .sheet-card { width: min(360px, 88%); max-height: none; height: 100%; border-radius: 0 0 0 0; animation: slide 360ms var(--ease); padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
.sheet.out { animation: fade 200ms ease-in reverse both; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(100%); } }
@keyframes slide { from { transform: translateX(100%); } }
.grab { width: 38px; height: 5px; border-radius: 3px; background: var(--fill); margin: 2px auto 12px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; }
.lines { display: grid; gap: 2px; border-radius: var(--r); overflow: hidden; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; background: var(--card); }
.line img, .line .ph { width: 64px; height: 64px; border-radius: 12px; object-fit: cover; background: var(--fill); }
.line b { font-size: 14.5px; font-weight: 500; display: block; }
.line small { color: var(--sub); font-size: 12.5px; }
.line .qty { height: 36px; } .line .qty button { width: 34px; }
.sum { display: grid; gap: 6px; padding: 14px; border-radius: var(--r); background: var(--card); font-variant-numeric: tabular-nums; }
.sum div { display: flex; justify-content: space-between; gap: 10px; font-size: 14.5px; color: var(--sub); }
.sum .total { color: var(--ink); font-weight: 700; font-size: 17px; padding-top: 6px; border-top: 1px dashed var(--line); }
.sum .off { color: var(--ok); }
.menu-list { display: grid; gap: 2px; }
.menu-item { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 12px; font-weight: 500; width: 100%; text-align: start; }
.menu-item:hover, .menu-item:focus-visible { background: var(--fill); }
.menu-item .cat-pic { width: 40px; max-width: 40px; }
.menu-item .grow { flex: 1; }
.menu-sub { padding-inline-start: 52px; display: grid; }
.menu-sub a { padding: 8px 10px; border-radius: 10px; color: var(--sub); }
.menu-title { font-size: 13px; color: var(--sub); font-weight: 600; margin: 16px 10px 6px; }
.sheet .form { display: grid; gap: 14px; }
.check-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: var(--r-sm); background: var(--card); font-weight: 500; }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); }
.vals { display: flex; flex-wrap: wrap; gap: 8px; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sort-opt { display: flex; align-items: center; justify-content: space-between; min-height: 50px; padding-inline: 14px; border-radius: var(--r-sm); background: var(--card); margin-bottom: 6px; width: 100%; text-align: start; font-weight: 500; }
.sort-opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--accent); }

/* ---------- checkout + orders ---------- */
.co { display: grid; gap: 18px; max-width: 640px; }
.co h1 { font-size: 24px; }
.co-group { display: grid; gap: 12px; padding: 16px; border-radius: var(--r); background: var(--card); }
.co-group h2 { font-size: 16px; }
.co-group .input { background: var(--bg); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.coupon-row { display: flex; gap: 8px; }
.coupon-row .input { text-transform: uppercase; direction: ltr; text-align: right; }
.delivery-note { font-size: 13px; color: var(--sub); }
.order { display: grid; gap: 10px; padding: 16px; border-radius: var(--r); background: var(--card); }
.order-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.order-head small { color: var(--sub); }
.st { display: inline-flex; align-items: center; gap: 7px; width: fit-content; height: 30px; padding-inline: 12px; border-radius: 99px; font-size: 13.5px; font-weight: 600; background: var(--fill); }
.st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.st-new { color: var(--warn); } .st-new::before { animation: blink 1.4s ease-in-out infinite; }
.st-confirmed, .st-done { color: var(--ok); } .st-shipping { color: var(--accent); } .st-cancelled { color: var(--sale); }
@keyframes blink { 50% { opacity: .3; } }
.order-lines { display: grid; gap: 4px; font-size: 14px; }
.order-lines div { display: flex; justify-content: space-between; gap: 10px; }
.order-acts { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-cancel { color: var(--sale); background: color-mix(in srgb, var(--sale) 10%, transparent); --hold-colour: var(--sale); }
.page-body { display: grid; gap: 10px; max-width: 70ch; }
.page-body h2 { font-size: 18px; margin-top: 8px; }
.page-body ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 4px; }

/* ---------- footer ---------- */
.foot { margin-top: 30px; padding: 26px var(--pad) 20px; background: var(--card); border-top: 1px solid var(--line); }
.foot-shop { width: min(var(--maxw), 100%); margin-inline: auto; display: grid; gap: 18px; }
.foot-brand { display: grid; gap: 6px; }
.foot-brand b { font: 600 19px/1.2 var(--font-d); }
.foot-info { display: grid; gap: 8px; font-size: 14px; color: var(--sub); }
.foot-info span, .foot-info a { display: inline-flex; align-items: center; gap: 8px; }
.foot-info svg { width: 18px; height: 18px; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--fill); transition: transform 160ms var(--ease); }
.socials a:active { transform: scale(.92); }
.foot-pages { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; }
.foot-pages a { color: var(--sub); text-decoration: underline; text-underline-offset: 3px; }
/* Made by Sultan: quiet so the shop's brand stays first */
.credit-row { width: min(var(--maxw), 100%); margin: 22px auto 0; padding-top: 16px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 10px;
  flex-wrap: wrap; font-size: 12.5px; color: var(--sub); }
.credit { letter-spacing: .06em; font-family: system-ui, sans-serif; }
.credit b { color: var(--ink); font-weight: 600; }
.credit-sep { width: 1px; height: 12px; background: var(--line); }
.credit-phone { font-family: system-ui, sans-serif; letter-spacing: .05em; user-select: all; }
.dev-menu { position: relative; }
.dev-menu summary { list-style: none; cursor: pointer; color: var(--accent); border-bottom: 1px solid var(--accent-soft); }
.dev-menu summary::-webkit-details-marker { display: none; }
.dev-pop { position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%); width: 236px; display: grid; gap: 4px; padding: 12px; z-index: 20;
  background: var(--card); border-radius: 14px; box-shadow: 0 20px 40px -14px rgb(0 0 0 / .4), inset 0 0 0 1px var(--line); }
.dev-pop p { margin: 0 0 4px; font-size: 12.5px; text-align: center; color: var(--sub); }
.dev-link { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--ink); font-size: 14px; }
.dev-link:hover, .dev-link:focus-visible { background: var(--fill); }
.dev-link svg { width: 20px; height: 20px; flex: none; }
.dev-link span { color: var(--sub); margin-inline-start: auto; }

/* WhatsApp: a round button above the tab bar; it steps aside near the footer so the credit stays visible */
.wa-float { position: fixed; z-index: 34; inset-inline-start: 16px; bottom: calc(88px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  background: #25d366; color: #fff; box-shadow: 0 10px 24px -8px rgb(37 211 102 / .7); transition: transform 300ms var(--ease), opacity 300ms; }
.wa-float svg { width: 28px; height: 28px; }
.wa-float.away { transform: scale(.6); opacity: 0; pointer-events: none; }

.toast { position: fixed; z-index: 95; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 20px); opacity: 0; pointer-events: none; max-width: calc(100% - 32px);
  padding: 11px 18px; border-radius: 14px; background: var(--ink); color: var(--bg); font-size: 14px; font-weight: 500; transition: opacity 220ms, transform 320ms var(--ease); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- wider screens ---------- */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cats { grid-template-columns: repeat(6, 1fr); }
  .row-scroll { grid-auto-columns: minmax(180px, 30%); }
  .gallery { margin-inline: 0; }
  .gal-track { border-radius: var(--r-lg); }
  .thumbs { padding-inline: 0; }
}
@media (min-width: 900px) {
  :root { --pad: 24px; --tabs-h: 0px; }
  .tabs, .sticky-buy { display: none; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .top-in { grid-template-columns: auto minmax(0, 1fr) 44px 44px; grid-template-areas: "brand search orders cart" "chips chips chips chips"; column-gap: 18px; }
  .top-in .menu-btn { display: none; } .top-in .orders-btn { display: grid; }
  .brand { justify-content: flex-start; min-height: 72px; }
  .top-in .search { padding: 0; max-width: 620px; width: 100%; justify-self: center; }
  .row-scroll { grid-auto-columns: minmax(200px, 22%); padding-inline: 0; margin-inline: 0; }
  .cats { grid-template-columns: repeat(8, 1fr); }
  .pd { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: start; gap: 36px; }
  .pd > .pd-info { position: sticky; top: 90px; }
  .pd > .pd-sec, .pd > .related { grid-column: 1 / -1; }
  .foot-shop { grid-template-columns: 1.3fr 1fr 1fr; }
  .wa-float { bottom: 24px; }
  .toast { bottom: 28px; }
  .sheet:not(.side) { align-items: center; }
  .sheet:not(.side) .sheet-card { border-radius: 26px; }
}
@media (min-width: 1180px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
}
/* ---------- entrance: a page arrives softly; its parts and its cards rise into place as they come into view (js/shop.js · reveal) ---------- */
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }
.view { animation: view-in 520ms var(--ease) both; }
.rv { opacity: 0; transform: translateY(22px); transition: opacity 700ms var(--ease), transform 800ms var(--ease); transition-delay: var(--d, 0ms); }
.rv.in { opacity: 1; transform: none; }
.banner-text > * { animation: banner-in 800ms var(--ease) both; }
.banner-text > :nth-child(2) { animation-delay: 120ms; }
@keyframes banner-in { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) { .view, .banner-text > * { animation: none; } .rv { opacity: 1; transform: none; transition: none; } .top { transition: none; } }

@media print { .top, .tabs, .wa-float, .announce, .foot { display: none; } }
.card-pic { display: block; }
.card-name::after { content: ""; position: absolute; inset: 0; }   /* the whole card opens the product */
.card .add { position: relative; z-index: 1; }
/* in a card the price stacks (number, then the old price) so narrow cards never break it */
.card .price { flex-direction: column; align-items: flex-start; gap: 0; }
.card .price b { white-space: nowrap; }

/* the receipt and the coupon ticket in the shop's colour */
body .rc { --rc-btn: var(--accent); --rc-btn-ink: var(--on-accent); --rc-font: var(--font-b); }
.co-group .ticket { --tk-paper: var(--accent); --tk-ink: var(--on-accent); }
@media (min-width: 900px) { .banner { aspect-ratio: 21 / 8; } }
/* the product photo on a phone: a framed picture, not the whole screen (Sultan: «الصورة جبيرة») */
@media (max-width: 639px) {
  .gallery { margin-inline: 0; }
  .gal-track { border-radius: var(--r-lg); background: var(--card); }
  .gal-track > * { aspect-ratio: auto; height: min(76vw, 38vh); background: var(--card); }
  .gal-track img, .gal-track video { object-fit: contain; }
  .thumbs { padding-inline: 0; }
}
/* a perfume's notes */
.notes { display: grid; gap: 12px; }
.note-row { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: start; }
.note-row b { display: block; font-size: 14.5px; }
.note-row small { color: var(--sub); font-size: 12px; }
/* the welcome card */
.welcome { position: fixed; z-index: 45; inset-inline: 14px; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); max-width: 420px; margin-inline: auto; display: flex; gap: 12px; align-items: flex-start;
  padding: 14px; border-radius: 20px; background: var(--card); box-shadow: 0 20px 50px -16px rgb(0 0 0 / .35), inset 0 0 0 1px var(--line); animation: rise 420ms var(--ease); }
.welcome .grow { flex: 1; display: grid; gap: 6px; }
.welcome p { font-size: 14px; color: var(--sub); }
.welcome-acts { display: flex; gap: 8px; }
.welcome.out { opacity: 0; transform: translateY(20px); transition: opacity 260ms, transform 300ms var(--ease); }
@media (min-width: 900px) { .welcome { inset-inline: auto 24px; bottom: 24px; } }

/* ---------- brands (a mall: many brands under one roof) ---------- */
.bcard-row { grid-auto-columns: minmax(220px, 72%); }
.bcard-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.bcard { position: relative; display: block; aspect-ratio: 16 / 10; border-radius: var(--r); overflow: hidden; background: var(--fill); isolation: isolate; }
.bcard > img:not(.blogo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease); z-index: -1; }
.bcard::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .62), rgb(0 0 0 / .08) 58%, transparent); }
.bcard.plain { background: var(--accent); }
.bcard.plain::after { display: none; }
.bcard .blogo { position: absolute; inset: 22% 30%; width: 40%; height: 56%; object-fit: contain; }
.bwords { position: absolute; inset-inline: 0; bottom: 0; display: grid; gap: 2px; padding: 14px 16px; color: #fff; }
.bwords b { font: 600 22px/1.15 var(--font-d); letter-spacing: 0; }
.bwords small { font-size: 13px; opacity: .85; }
@media (hover: hover) { .bcard:hover > img:not(.blogo) { transform: scale(1.05); } }
a:active > .bcard { transform: scale(.985); }
.bhead { position: relative; display: grid; align-items: end; min-height: 220px; aspect-ratio: 16 / 9; max-height: 420px; width: 100%; margin-bottom: -16px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate; background: var(--fill); }
.bhead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; z-index: -1; }
.bhead::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgb(0 0 0 / .66), rgb(0 0 0 / .1) 60%, transparent); }
.bhead .bwords { position: static; padding: 20px; gap: 4px; }
.bhead h1 { font: 700 32px/1.1 var(--font-d); }
.bhead p { font-size: 15px; opacity: .92; max-width: 46ch; }
.bhead .blogo { width: 56px; height: 56px; object-fit: contain; margin-bottom: 4px; }
.bhead.plain { aspect-ratio: auto; min-height: 0; background: none; }
.bhead.plain::after { display: none; }
.bhead.plain .bwords { color: var(--ink); padding: 0; }
.bhead.plain small { color: var(--sub); }
@media (min-width: 640px) {
  .bcard-row { grid-auto-columns: minmax(240px, 40%); }
  .bcard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (min-width: 900px) {
  .bcard-row { grid-auto-columns: minmax(260px, 31%); }
  .bcard-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bhead { aspect-ratio: 21 / 8; }
  .bhead .bwords { padding: 32px; }
  .bhead h1 { font-size: 44px; }
}
