/* =========================================================
   Nijeeb — design system
   Tech Innovation: dark, electric blue + neon cyan. Search-first (Shop-style).
   Works RTL (Arabic) and LTR (English) using logical props.
   ========================================================= */

:root {
  /* Tech Innovation theme: electric blue + neon cyan on near-black */
  --bg: #0B0D12;
  --surface: #151922;
  --surface-2: #1E2430;
  --panel: #12161E;          /* raised boxes: cards, sheets, drawer */
  --glass: rgba(11,13,18,.88);
  --text: #F4F7FB;
  --on-text: #0B0D12;
  --muted: #8C96A8;
  --line: rgba(255,255,255,.08);
  --brand: #0066FF;          /* electric blue */
  --accent: #00FFFF;         /* neon cyan */
  --ok: #34D399;
  --ok-bg: rgba(52,211,153,.12);
  --warn: #FBBF24;
  --warn-bg: rgba(251,191,36,.12);
  --danger: #F87171;
  --danger-bg: rgba(248,113,113,.12);

  --r-sm: 12px;
  --r: 18px;
  --r-lg: 24px;
  --pill: 999px;

  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.55);

  --ease: cubic-bezier(.22, 1, .36, 1);   /* ease-out-expo: fast start, soft landing */
  --fast: .18s;
  --med: .35s;

  --header-h: 64px;
  --tabbar-h: 68px;
  --max: 1180px;

  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: auto; }
body { margin: 0; min-height: 100dvh; background: var(--bg); line-height: 1.6; overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid rgba(18,18,18,.35); outline-offset: 2px; border-radius: 8px; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.page { padding-block: 20px 40px; min-height: calc(100dvh - var(--header-h)); }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; align-items: center; gap: var(--gap, 10px); }
.row.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.center { text-align: center; }
.ltr { direction: ltr; unicode-bidi: isolate; }

.h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 700; line-height: 1.2; letter-spacing: -.5px; }
.h2 { font-size: 20px; font-weight: 700; line-height: 1.3; }
.h3 { font-size: 16px; font-weight: 700; }
.section { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.link-muted { color: var(--muted); font-size: 14px; font-weight: 600; }
.link-muted:hover { color: var(--text); }

/* ---------- Header (all sizes) ---------- */
.header {
  position: sticky; top: var(--demo-h); z-index: 30;
  background: var(--glass);
  border-bottom: 1px solid transparent;
  transition: border-color var(--med) var(--ease);
}
.header.scrolled { border-bottom-color: var(--line); }
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; font-size: 21px; letter-spacing: -.3px; flex: none; }
.logo svg { width: 32px; height: 32px; }
.header-search { flex: 1; max-width: 520px; display: none; }
.header-links { display: none; gap: 4px; }
.header-actions { display: flex; gap: 8px; margin-inline-start: auto; align-items: center; }

/* ---------- Buttons ---------- */
.btn {
  --h: 48px;
  height: var(--h); padding-inline: 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--pill);
  font-size: 15px; font-weight: 600; white-space: nowrap;
  background: var(--surface); color: var(--text);
  transition: transform var(--fast) var(--ease), background-color var(--fast), color var(--fast), box-shadow var(--fast), opacity var(--fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-disabled { opacity: .45; pointer-events: none; }
.btn-primary { background: var(--text); color: var(--on-text); }
.btn-primary:hover { background: #2A2A2A; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--surface); }
.btn-outline { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.btn-outline:hover { background: var(--surface); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-ok:hover { background: #0B5F58; }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-lg { --h: 56px; font-size: 16px; }
.btn-sm { --h: 38px; padding-inline: 14px; font-size: 13px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: var(--pill); background: var(--surface); color: var(--text);
  position: relative;
  transition: transform var(--fast) var(--ease), background-color var(--fast);
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn:active { transform: scale(.92); }
.icon-btn.on-image { background: rgba(255,255,255,.94); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.icon { width: 22px; height: 22px; flex: none; }
.icon-sm { width: 18px; height: 18px; }
.badge-count {
  position: absolute; top: -2px; inset-inline-end: -2px;
  min-width: 20px; height: 20px; padding-inline: 5px; border-radius: var(--pill);
  background: var(--brand); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid var(--bg);
}
.badge-count.bump { animation: bump .5s var(--ease); }

/* ---------- Search ---------- */
.search {
  display: flex; align-items: center; gap: 10px;
  height: 52px; padding-inline: 18px;
  background: var(--surface); border-radius: var(--pill);
  transition: box-shadow var(--fast), background-color var(--fast);
}
.search:focus-within { background: var(--panel); box-shadow: 0 0 0 2px var(--text); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; }
.search input::-webkit-search-cancel-button { display: none; }
.header-search .search { height: 44px; }

/* ---------- Chips ---------- */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips.scroll::-webkit-scrollbar { display: none; }
.chip {
  height: 38px; padding-inline: 14px; flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: var(--pill); border: 1px solid var(--line); background: var(--panel);
  font-size: 14px; font-weight: 500;
  transition: background-color var(--fast), border-color var(--fast), color var(--fast), transform var(--fast) var(--ease);
}
.chip:hover { border-color: rgba(255,255,255,.22); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"], .chip.is-on { background: var(--text); border-color: var(--text); color: #fff; }
.chip.is-out { color: rgba(255,255,255,.3); text-decoration: line-through; border-style: dashed; cursor: not-allowed; }
.swatch {
  width: 44px; height: 44px; border-radius: var(--pill); padding: 4px;
  border: 2px solid var(--line); background: var(--panel); display: inline-flex;
  transition: border-color var(--fast), transform var(--fast) var(--ease);
}
.swatch span { flex: 1; border-radius: var(--pill); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.swatch[aria-pressed="true"] { border-color: var(--text); }
.swatch:active { transform: scale(.92); }
.dot { width: 14px; height: 14px; border-radius: var(--pill); flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }

/* ---------- Media (product images / placeholders) ---------- */
.media {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: var(--surface); aspect-ratio: 4 / 5;
}
.media img, .media svg.ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media img { opacity: 0; transition: opacity .5s var(--ease), transform .6s var(--ease); }
.media img.loaded { opacity: 1; }
.media.square { aspect-ratio: 1; }
.media .fav { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; }

/* ---------- Product grid & cards ---------- */
.grid { display: grid; gap: 22px 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.p-card { display: flex; flex-direction: column; gap: 10px; }
.p-card .media img, .p-card .media svg.ph { transition: transform .6s var(--ease), opacity .5s var(--ease); }
.p-card:hover .media img, .p-card:hover .media svg.ph { transform: scale(1.04); }
.p-card .meta { display: flex; flex-direction: column; gap: 1px; padding-inline: 2px; }
.p-card .store { font-size: 12px; color: var(--muted); }
.p-card .name { font-size: 14px; font-weight: 600; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.p-card .price { font-size: 15px; font-weight: 700; }
.p-card .rating { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }

.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; text-align: center; }
.cat .media { aspect-ratio: 1; width: 100%; border-radius: 22px; }
.cat:hover .media svg.ph { transform: scale(1.06); }
.cat .media svg.ph { transition: transform .6s var(--ease); }

.store-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding-bottom: 6px; scroll-snap-type: x mandatory; }
.store-row::-webkit-scrollbar { display: none; }
.s-card { flex: none; width: 240px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; }
.s-card .collage { display: grid; grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; gap: 4px; height: 150px; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.s-card .collage > * { position: relative; overflow: hidden; background: var(--surface-2); }
.s-card .collage > *:first-child { grid-row: span 2; }
.s-card .collage img, .s-card .collage svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.avatar {
  width: 40px; height: 40px; border-radius: var(--pill); flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 16px; background: var(--text);
}
.avatar.lg { width: 84px; height: 84px; font-size: 32px; border: 4px solid var(--bg); }
.avatar.sm { width: 32px; height: 32px; font-size: 13px; }

/* ---------- Cards & lists ---------- */
.card { background: var(--surface); border-radius: var(--r-lg); padding: 18px; }
.card.white { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); }
.list { display: flex; flex-direction: column; gap: 12px; }
.divider { height: 1px; background: var(--line); border: 0; margin: 4px 0; }
.kv { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.kv.total { font-size: 17px; font-weight: 700; padding-top: 10px; border-top: 1px solid var(--line); }

.pill-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 12px; border-radius: var(--pill); background: var(--surface); font-size: 12px; font-weight: 600; }
.pill-tag.ok { background: var(--ok-bg); color: var(--ok); }
.pill-tag.warn { background: var(--warn-bg); color: var(--warn); }
.pill-tag.danger { background: var(--danger-bg); color: var(--danger); }
.pill-tag.dark { background: var(--text); color: var(--on-text); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .label { font-size: 14px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 52px; padding: 12px 16px;
  border: 2px solid transparent; border-radius: var(--r);
  background: var(--surface); font-size: 16px; outline: 0;
  transition: border-color var(--fast), background-color var(--fast);
}
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--text); background: var(--panel); }
.input.invalid { border-color: var(--danger); background: var(--danger-bg); }
.hint { font-size: 12px; color: var(--muted); }
.error-text { font-size: 13px; color: var(--danger); font-weight: 600; }
.input-prefix { display: flex; align-items: stretch; border-radius: var(--r); background: var(--surface); overflow: hidden; border: 2px solid transparent; transition: border-color var(--fast); }
.input-prefix:focus-within { border-color: var(--text); background: var(--panel); }
.input-prefix span { display: flex; align-items: center; padding-inline: 14px; color: var(--muted); font-size: 15px; background: var(--surface-2); }
.input-prefix input { border: 0; background: transparent; outline: 0; flex: 1; min-width: 0; padding: 0 12px; height: 52px; font-size: 16px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }

.switch { width: 52px; height: 32px; border-radius: var(--pill); border: 0; padding: 3px; background: rgba(255,255,255,.22); display: inline-flex; flex: none; transition: background-color var(--med) var(--ease); }
.switch span { width: 26px; height: 26px; border-radius: var(--pill); background: var(--panel); box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform var(--med) var(--ease); }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"] span { transform: translateX(-20px); }
[dir="ltr"] .switch[aria-checked="true"] span { transform: translateX(20px); }

.qty { display: inline-flex; align-items: center; background: var(--surface); border-radius: var(--pill); padding: 3px; direction: ltr; }
.qty button { width: 40px; height: 40px; border: 0; border-radius: var(--pill); background: transparent; font-size: 20px; display: flex; align-items: center; justify-content: center; transition: background-color var(--fast); }
.qty button:hover { background: var(--panel); }
.qty span { min-width: 28px; text-align: center; font-weight: 700; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border-radius: var(--pill); position: relative; }
.tabs button { flex: 1; height: 42px; border: 0; border-radius: var(--pill); background: transparent; font-size: 14px; font-weight: 600; color: var(--muted); transition: background-color var(--med) var(--ease), color var(--med), box-shadow var(--med); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tabs button[aria-selected="true"] { background: var(--panel); color: var(--text); box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.tabs .n { min-width: 20px; height: 20px; border-radius: var(--pill); background: var(--text); color: var(--on-text); font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding-inline: 5px; }

/* ---------- Product page ---------- */
.pdp { display: grid; gap: 24px; grid-template-columns: 1fr; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery-main { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); aspect-ratio: 4/5; touch-action: pan-y; }
.gallery-track { display: flex; height: 100%; transition: transform .5s var(--ease); }
.gallery-track > * { flex: 0 0 100%; position: relative; }
.gallery-track img, .gallery-track svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery-dots { position: absolute; bottom: 14px; inset-inline: 0; display: flex; justify-content: center; gap: 6px; }
.gallery-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: var(--pill); background: rgba(255,255,255,.3); transition: width var(--med) var(--ease), background-color var(--med); }
.gallery-dots button[aria-current="true"] { width: 24px; background: var(--text); }
.gallery-top { position: absolute; top: 14px; inset-inline: 14px; display: flex; justify-content: space-between; z-index: 2; }
.thumbs { display: none; gap: 10px; }
.thumbs button { width: 72px; aspect-ratio: 4/5; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden; position: relative; background: var(--surface); transition: border-color var(--fast); }
.thumbs button[aria-current="true"] { border-color: var(--text); }
.thumbs img, .thumbs svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.buybar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 25;
  background: var(--glass);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  display: flex; gap: 10px; align-items: center;
}
.stars { color: #E39A2D; letter-spacing: 1px; }
.rating-bars { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.rating-bars .bar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.rating-bars .track { flex: 1; height: 6px; border-radius: var(--pill); background: var(--surface-2); overflow: hidden; }
.rating-bars .fill { height: 100%; background: #E39A2D; border-radius: var(--pill); transform-origin: right; animation: grow 1s var(--ease) both; }
[dir="ltr"] .rating-bars .fill { transform-origin: left; }
.star-input { display: flex; gap: 4px; } /* follows the page direction: Arabic fills right→left, English left→right */
.star-input button { width: 44px; height: 44px; border: 0; background: transparent; font-size: 30px; line-height: 1; color: rgba(255,255,255,.18); transition: transform var(--fast) var(--ease), color var(--fast); padding: 0; }
.star-input button.on, .star-input button.preview { color: #E39A2D; }
.star-input button.on { animation: starPop .4s cubic-bezier(.34,1.56,.64,1) both; animation-delay: calc(var(--i) * 55ms); }
@keyframes starPop { 0% { transform: scale(.6) rotate(-15deg); } 60% { transform: scale(1.3) rotate(8deg); } 100% { transform: none; } }
.star-input button:active { transform: scale(1.25); }
.review { display: flex; flex-direction: column; gap: 8px; padding-block: 16px; border-bottom: 1px solid var(--line); }

/* ---------- Cart ---------- */
.cart-item { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: start; }
.cart-item .media { aspect-ratio: 4/5; border-radius: 16px; }
.store-group { display: flex; flex-direction: column; gap: 16px; }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 30;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--glass);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-around; align-items: center;
}
.tabbar a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 64px; min-height: 52px; font-size: 11px; color: var(--muted); font-weight: 500; transition: color var(--fast); }
.tabbar a[aria-current="page"] { color: var(--text); font-weight: 700; }
.tabbar a:active { transform: scale(.94); }
.tabbar .badge-count { top: 2px; inset-inline-end: 12px; }
.has-tabbar { padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 12px); }
.has-buybar { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }

/* ---------- Merchant layout ---------- */
.m-shell { display: grid; grid-template-columns: 1fr; min-height: 100dvh; }
.m-side { display: none; }
.m-main { min-width: 0; }
.m-top { position: sticky; top: var(--demo-h); z-index: 20; background: var(--glass); border-bottom: 1px solid var(--line); }
.m-top .container { height: var(--header-h); display: flex; align-items: center; gap: 12px; }
.stat { background: var(--surface); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-size: 22px; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.order { background: var(--panel); box-shadow: inset 0 0 0 1px var(--line); border-radius: var(--r-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.order.is-new { box-shadow: inset 0 0 0 2px var(--text); }
.steps { display: flex; gap: 6px; }
.steps span { flex: 1; height: 5px; border-radius: var(--pill); background: var(--surface-2); transition: background-color var(--med) var(--ease); }
.steps span.on { background: var(--ok); }
.m-prod { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 10px; border-radius: var(--r); transition: background-color var(--fast); }
.m-prod:hover { background: var(--surface); }
.m-prod .media { aspect-ratio: 1; border-radius: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.photo-slot { position: relative; aspect-ratio: 4/5; border-radius: 16px; overflow: hidden; background: var(--surface); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-slot .rm { position: absolute; top: 6px; inset-inline-end: 6px; width: 32px; height: 32px; }
.photo-add { aspect-ratio: 4/5; border-radius: 16px; border: 2px dashed rgba(255,255,255,.22); background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 600; transition: border-color var(--fast), color var(--fast); cursor: pointer; }
.photo-add:hover { border-color: var(--text); color: var(--text); }
.variant-row { display: grid; grid-template-columns: 1fr 96px; gap: 10px; align-items: center; padding: 8px 12px; background: var(--surface); border-radius: var(--r-sm); }
.variant-row input { height: 40px; min-height: 40px; padding: 0 10px; text-align: center; background: var(--panel); border-radius: 10px; }
.share-card { width: 270px; aspect-ratio: 9/16; border-radius: 28px; padding: 22px; color: #fff; display: flex; flex-direction: column; gap: 12px; margin-inline: auto; box-shadow: var(--shadow-lg); transition: background-color .5s var(--ease); }
.share-card .tiles { flex: 1; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 6px; }
.share-card .tiles > * { position: relative; border-radius: 14px; overflow: hidden; background: rgba(255,255,255,.15); }
.share-card .tiles > *:first-child { grid-row: span 2; }
.share-card .tiles img, .share-card .tiles svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Empty states ---------- */
.empty { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 48px 16px; }
.empty .art { width: 96px; height: 96px; border-radius: var(--pill); background: var(--surface); display: flex; align-items: center; justify-content: center; }
.empty .art svg { width: 40px; height: 40px; color: var(--muted); }

/* ---------- Toasts & sheets ---------- */
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); inset-inline: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding-inline: 12px; }
.toast {
  pointer-events: auto; max-width: 440px; width: 100%;
  display: flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--on-text); border-radius: var(--r);
  padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toastIn .5s var(--ease) both;
}
.toast.light { background: var(--panel); color: var(--text); box-shadow: var(--shadow-lg), inset 0 0 0 1px var(--line); }
.toast.out { animation: toastOut .35s var(--ease) both; }
.toast .ti { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: none; background: rgba(255,255,255,.14); }
.toast.light .ti { background: var(--ok); color: #fff; }
.toast .ti svg.ring { animation: ring .9s ease .3s 2; transform-origin: 50% 10%; }
.toast a { text-decoration: underline; font-weight: 600; }

.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.6); animation: fadeIn .3s var(--ease) both; }
.scrim.out { animation: fadeOut .25s ease both; }
.sheet {
  position: fixed; z-index: 61; inset-inline: 0; bottom: 0;
  max-height: 88dvh; overflow-y: auto;
  background: var(--panel); border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(24px + env(safe-area-inset-bottom));
  animation: sheetIn .45s var(--ease) both;
}
.sheet.out { animation: sheetOut .3s var(--ease) both; }
.sheet .grab { width: 40px; height: 5px; border-radius: var(--pill); background: #DADADA; margin: 0 auto 14px; }

/* ---------- Skeleton ---------- */
.skeleton { background: linear-gradient(90deg, var(--surface) 25%, #FAFAFA 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r); }

/* ---------- Motion ---------- */
.enter > * { animation: up .55s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .04s; }
.enter > *:nth-child(3) { animation-delay: .08s; }
.enter > *:nth-child(4) { animation-delay: .12s; }
.enter > *:nth-child(5) { animation-delay: .16s; }
.enter > *:nth-child(6) { animation-delay: .2s; }
.enter > *:nth-child(n+7) { animation-delay: .24s; }
.stagger > * { animation: up .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .05s; }
.stagger > *:nth-child(3) { animation-delay: .1s; }
.stagger > *:nth-child(4) { animation-delay: .15s; }
.stagger > *:nth-child(5) { animation-delay: .2s; }
.stagger > *:nth-child(6) { animation-delay: .25s; }
.stagger > *:nth-child(n+7) { animation-delay: .3s; }
.pop { animation: pop .45s var(--ease) both; }
.draw path { stroke-dasharray: 40; animation: draw .6s var(--ease) .25s both; }
.page-in { animation: pageIn .4s var(--ease) backwards; }
/* pages with a fixed bottom bar: fade only (a moving parent would drag the fixed bar with it) */
.page-in.has-buybar { animation: pageFade .3s var(--ease) backwards; }
@keyframes pageFade { from { opacity: 0; } }

@keyframes up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.1); } 100% { transform: scale(1); } }
@keyframes bump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.35); } }
@keyframes draw { from { stroke-dashoffset: 40; } to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-120%) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-60%) scale(.96); } }
@keyframes sheetIn { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetOut { to { transform: translateY(100%); } }
@keyframes ring { 0%,100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-4deg); } }
@keyframes heart { 0% { transform: scale(1); } 30% { transform: scale(1.35); } 60% { transform: scale(.9); } 100% { transform: scale(1); } }
.heart-anim { animation: heart .5s var(--ease); }

/* Page transitions (View Transitions API, Chrome/Edge/Safari 18+) */
::view-transition-old(root) { animation: .14s var(--ease) both fadeOut; }
::view-transition-new(root) { animation: .26s var(--ease) both pageIn; }
/* The product picture morphs from the card into the product page */
::view-transition-group(p-hero) { animation-duration: .36s; animation-timing-function: cubic-bezier(.2, .9, .2, 1); z-index: 50; }
::view-transition-old(p-hero), ::view-transition-new(p-hero) { animation: none; mix-blend-mode: normal; height: 100%; object-fit: cover; overflow: clip; }

/* Reveal on scroll */
[data-reveal] { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity .5s var(--ease), transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 40ms); }
[data-reveal].in { opacity: 1; transform: none; }

/* Springy press (release overshoots a little, like iOS) */
.btn, .icon-btn, .chip, .swatch, .tabbar a { transition-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.p-card .media { transition: transform .5s cubic-bezier(.34, 1.4, .64, 1); }
.p-card:active .media { transform: scale(.97); }


/* Tab bar sliding pill */
.tab-ind { position: absolute; top: 8px; left: 0; width: 56px; height: 32px; border-radius: 999px; background: var(--surface-2); transition: transform .55s cubic-bezier(.34, 1.45, .64, 1), opacity .3s; pointer-events: none; z-index: -1; }
.tabbar { isolation: isolate; }

/* Home: moving product shelf */
.marquee-wrap { position: relative; margin-inline: calc(50% - 50vw); }
.marquee-wrap::before, .marquee-wrap::after { content: ''; position: absolute; top: 0; bottom: 0; width: 5%; z-index: 1; pointer-events: none; }
.marquee-wrap::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.marquee-wrap::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
/* A real horizontal scroller: moves by itself, and you can swipe it with your finger (or drag with the mouse) */
.marquee { direction: ltr; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; padding: 6px 0 2px; cursor: grab; -webkit-overflow-scrolling: touch; }
.marquee::-webkit-scrollbar { display: none; }
.marquee.grabbing { cursor: grabbing; }
.marquee.grabbing a { pointer-events: none; }
.marquee-track { display: flex; gap: 14px; width: max-content; padding-inline: 20px; }
.marquee .m-item { width: clamp(132px, 34vw, 190px); flex: none; display: flex; flex-direction: column; gap: 8px; direction: rtl; -webkit-user-drag: none; user-select: none; }
[dir="ltr"] .marquee .m-item { direction: ltr; }
.marquee .m-item .media { border-radius: 22px; }
.marquee .m-item .p { font-size: 13px; font-weight: 700; padding-inline: 4px; }

/* Fly-to-cart ghost */
.fly { position: fixed; z-index: 200; pointer-events: none; border-radius: 20px; overflow: hidden; box-shadow: 0 20px 40px rgba(0,0,0,.25); }
.fly svg, .fly img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero */
.hero { position: relative; padding: 18px 0 8px; }
.hero .h1 { font-size: clamp(34px, 7vw, 64px); letter-spacing: -1px; line-height: 1.1; }
.hero .h1 span { color: var(--muted); }
.sheet.dragging { transition: none !important; }
/* once the sheet has finished opening, drop its entry animation so a tap / drag never replays it */
.sheet.settled:not(.out) { animation: none; }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Tablet & desktop ---------- */
@media (min-width: 720px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px 18px; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .photo-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .sheet { inset-inline: auto; left: 50%; bottom: auto; top: 50%; width: min(520px, 92vw); border-radius: 28px; transform: translate(-50%, -50%); animation: dialogIn .4s var(--ease) both; }
  .sheet.out { animation: dialogOut .25s var(--ease) both; }
  .sheet .grab { display: none; }
}
@keyframes dialogIn { from { opacity: 0; transform: translate(-50%, -46%) scale(.97); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes dialogOut { to { opacity: 0; transform: translate(-50%, -48%) scale(.98); } }

@media (min-width: 1024px) {
  :root { --header-h: 72px; }
  .container { padding-inline: 32px; }
  .header-search { display: block; }
  .header-links { display: flex; }
  .hide-desktop { display: none !important; }
  .tabbar { display: none; }
  .has-tabbar { padding-bottom: 40px; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid.wide { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .cat-grid { grid-template-columns: repeat(4, 180px); gap: 18px; justify-content: start; }
  .no-hsearch .header-search { visibility: hidden; }
  .pdp { grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: start; }
  .pdp .info { position: sticky; top: calc(var(--demo-h) + var(--header-h) + 20px); }
  .thumbs { display: flex; }
  .buybar { position: static; background: transparent; border: 0; padding: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .has-buybar { padding-bottom: 40px; }
  .two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: start; }
  .two-col > .sticky { position: sticky; top: calc(var(--demo-h) + var(--header-h) + 20px); }
  .m-shell { grid-template-columns: 260px 1fr; }
  .m-side { display: flex; flex-direction: column; gap: 6px; position: sticky; top: var(--demo-h); height: calc(100dvh - var(--demo-h)); padding: 24px 16px; border-inline-end: 1px solid var(--line); }
  .m-side a.nav { display: flex; align-items: center; gap: 12px; height: 48px; padding-inline: 14px; border-radius: var(--r-sm); font-weight: 600; color: var(--muted); transition: background-color var(--fast), color var(--fast); }
  .m-side a.nav:hover { background: var(--surface); color: var(--text); }
  .m-side a.nav[aria-current="page"] { background: var(--surface); color: var(--text); }
  .m-main .tabbar { display: none; }
  .s-card { width: 280px; }
  .s-card .collage { height: 180px; }
}
@media (max-width: 1023px) { .hide-mobile { display: none !important; } }


/* Images inside cards: cheaper hover (no repaint of big shadows on phones) */
@media (hover: none) { .p-card .media { transition: transform .4s cubic-bezier(.34,1.4,.64,1); } }

/* ---------- Extra delight ---------- */
/* 3D tilt + light glare on product cards (mouse only) */
.tilt { transform-style: preserve-3d; }
.tilt .media { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .5s cubic-bezier(.22,1,.36,1), box-shadow .4s; }
.tilt .media::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255,255,255,.45), transparent 55%); opacity: 0; transition: opacity .4s; mix-blend-mode: soft-light; }
.tilt.tilting .media { transition: transform .08s linear, box-shadow .4s; }
.tilt.tilting .media::after { opacity: 1; }

/* Colour change: picture crossfades */
.gallery-track > div { transition: opacity .45s var(--ease), filter .45s var(--ease); }
.gallery-main.swapping .gallery-track > div { opacity: .35; filter: blur(4px); }

/* Product page: slim bar that slides down when the buy button scrolls away */
.mini-bar { position: fixed; top: var(--demo-h); inset-inline: 0; z-index: 35; background: var(--glass); border-bottom: 1px solid var(--line); transform: translateY(-110%); transition: transform .45s var(--ease); }
.mini-bar.show { transform: none; }
.mini-bar .container { height: 64px; display: flex; align-items: center; gap: 12px; }
.mini-bar .media { width: 40px; aspect-ratio: 4/5; border-radius: 10px; flex: none; }

/* Confetti canvas */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 150; }

/* Search box: placeholder words slide */
.search .ph-roll { position: absolute; pointer-events: none; color: var(--muted); font-size: 16px; transition: opacity .35s, transform .35s var(--ease); }

.media { contain: paint; }
.store-row, .chips.scroll { -webkit-overflow-scrolling: touch; }

/* ---------- Side menu (drawer) ---------- */
.drawer { position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 61; width: min(340px, 86vw); background: var(--panel); display: flex; flex-direction: column; box-shadow: var(--shadow-lg); animation: drawerIn .45s var(--ease) both; overflow-y: auto; overscroll-behavior: contain; padding-bottom: env(safe-area-inset-bottom); }
[dir="rtl"] .drawer { animation-name: drawerInRtl; }
.drawer.out { animation: drawerOut .3s var(--ease) both; }
[dir="rtl"] .drawer.out { animation-name: drawerOutRtl; }
@keyframes drawerIn { from { transform: translateX(-100%); } to { transform: none; } }
@keyframes drawerInRtl { from { transform: translateX(100%); } to { transform: none; } }
@keyframes drawerOut { to { transform: translateX(-100%); } }
@keyframes drawerOutRtl { to { transform: translateX(100%); } }
.drawer-head { padding: 18px 18px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.drawer-sec { padding: 10px 10px 4px; }
.drawer-sec > p { font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 12px 6px; letter-spacing: .2px; }
.d-item { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 48px; padding: 0 12px; border: 0; background: transparent; border-radius: 14px; font-size: 15px; font-weight: 500; text-align: start; color: var(--text); transition: background-color var(--fast); }
.d-item:hover, .d-item[aria-current="page"] { background: var(--surface); }
.d-item .icon { color: var(--muted); }
.d-item .end { margin-inline-start: auto; color: var(--muted); font-size: 13px; }
.d-item .end .icon-sm { opacity: .6; }
.drawer .stagger > * { animation-delay: calc(var(--i, 0) * 30ms + .08s); }
.d-cta { margin: 10px 16px; padding: 16px; border-radius: 20px; background: var(--text); color: var(--on-text); display: flex; flex-direction: column; gap: 6px; }
.d-cta .btn { align-self: flex-start; background: var(--panel); color: var(--text); }
.drawer-foot { margin-top: auto; padding: 16px 22px 22px; font-size: 12px; color: var(--muted); }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 2px; }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq summary::after { content: '+'; font-size: 20px; line-height: 1; color: var(--muted); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: 8px; color: var(--muted); line-height: 1.8; }

/* ---------- Home layout (tidy rhythm) ---------- */
.home .section { margin-top: 36px; }
.home .hero { padding-top: 14px; }
.home .hero .h1 { font-size: clamp(30px, 7.5vw, 58px); }
.home .hero .chips.scroll { margin-inline: -20px; padding-inline: 20px; }
.cat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.cat-row .cat { gap: 8px; font-size: 13px; }
.cat-row .cat .media { aspect-ratio: 1; width: 100%; border-radius: 999px; }
.cat-row .cat:active .media { transform: scale(.94); }
.cat-row .cat .media { transition: transform .4s cubic-bezier(.34,1.56,.64,1); }
.home .marquee-wrap + .marquee-wrap { margin-top: 10px; }
.sell-banner { background: var(--text); color: var(--on-text); border-radius: var(--r-lg); padding: 26px; display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.sell-banner::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(201,61,38,.55), transparent 70%); inset-inline-end: -80px; top: -90px; pointer-events: none; }
.sell-banner > * { position: relative; z-index: 1; }
@media (min-width: 1024px) {
  .cat-row { grid-template-columns: repeat(4, 140px); gap: 28px; justify-content: start; }
  .home .section { margin-top: 48px; }
}

/* ---------- Badges & prices ---------- */
.p-card .badges { position: absolute; top: 10px; inset-inline-start: 10px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; z-index: 1; pointer-events: none; }
.p-card .badges .pill-tag { height: 24px; padding-inline: 9px; font-size: 11px; }
.pill-tag.sale { background: var(--brand); color: #fff; }
.pill-tag.new { background: var(--panel); color: var(--text); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
s.was { color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.p-card .price { white-space: nowrap; }
.tick { animation: tick .45s cubic-bezier(.34,1.56,.64,1); display: inline-block; }
@keyframes tick { 0% { transform: translateY(-6px); opacity: .2; } 100% { transform: none; opacity: 1; } }

/* ---------- Search suggestions ---------- */
.suggest-panel { background: var(--panel); border-radius: var(--r-lg); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); padding: 6px; animation: up .3s var(--ease) both; }
.sp-head { padding: 6px 10px 2px; }
.sp-row { display: flex; align-items: center; gap: 4px; }
.sp-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 10px; border: 0; background: transparent; border-radius: 12px; font-size: 15px; text-align: start; color: var(--text); transition: background-color var(--fast); }
.sp-main:hover { background: var(--surface); }
.sp-main .icon-sm { color: var(--muted); flex: none; }
.sp-main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-x { width: 36px; height: 36px; background: transparent; color: var(--muted); }
.sp-x:hover { background: var(--surface); color: var(--text); }

/* ---------- Store cover ---------- */
.store-cover { position: relative; height: 170px; overflow: hidden; display: block; }
.store-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.store-cover.edit { height: 140px; border-radius: var(--r-lg); cursor: pointer; }
@media (min-width: 1024px) { .store-cover { height: 240px; } }
.m-prod[hidden] { display: none; }

/* ---------- Audit fixes ---------- */
.pdp > *, .two-col > *, .info > * { min-width: 0; }               /* long rows can't push the page wider than the screen */
.price-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.link-muted { min-height: 44px; display: inline-flex; align-items: center; padding-inline: 4px; }  /* bigger tap area */
.pill-tag[data-copy] { height: 40px; }
a[data-to-reviews] { min-height: 40px; display: inline-flex; align-items: center; gap: 4px; }

/* =========================================================
   Electronics store
   ========================================================= */
.cat-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 720px) { .cat-row { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.flip-rtl { transform: scaleX(-1); }
[dir="ltr"] .flip-rtl { transform: none; }

/* "fits your phone" tag on cards */
.fit-tag { position: absolute; inset-inline-start: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 4px; height: 24px; padding-inline: 8px; border-radius: var(--pill); background: rgba(255,255,255,.92); color: var(--ok); font-size: 11px; font-weight: 700; pointer-events: none; }

/* pick-your-phone bar */
.phone-bar { width: 100%; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); text-align: start; transition: transform var(--fast) var(--ease), background var(--fast); }
.phone-bar:hover { background: var(--surface-2); }
.phone-bar:active { transform: scale(.985); }
.phone-bar .ph-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--panel); display: grid; place-items: center; flex: none; box-shadow: var(--shadow); }

/* horizontal rows that you swipe */
.h-row, .offer-row { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; margin-inline: -20px; padding-inline: 20px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.h-row::-webkit-scrollbar, .offer-row::-webkit-scrollbar { display: none; }
.h-row > .p-card { flex: none; width: 46%; max-width: 220px; scroll-snap-align: start; }
@media (min-width: 720px) { .h-row > .p-card { width: 210px; } .h-row, .offer-row { margin-inline: 0; padding-inline: 0; } }

/* offer (bundle) cards */
.offer-card { flex: none; width: 78%; max-width: 330px; display: flex; flex-direction: column; gap: 10px; scroll-snap-align: start; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px 16px; }
.offer-grid .offer-card { width: auto; max-width: none; }
.offer-media { position: relative; display: grid; gap: 4px; aspect-ratio: 4/3; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.offer-media > div { position: relative; overflow: hidden; background: var(--surface-2); }
.offer-media img, .offer-media svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.offer-media.n2 { grid-template-columns: 1fr 1fr; }
.offer-media.n3 { grid-template-columns: 1.3fr 1fr; grid-template-rows: 1fr 1fr; }
.offer-media.n3 > div:first-child { grid-row: span 2; }
.offer-media.n4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.offer-media.big { aspect-ratio: 1; border-radius: 0; }
.offer-card .offer-media { transition: transform .5s var(--ease); }
.offer-card:hover .offer-media { transform: translateY(-4px); }
.save-tag { position: absolute; top: 10px; inset-inline-start: 10px; height: 28px; padding-inline: 12px; border-radius: var(--pill); background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; z-index: 1; }
.offer-body { display: flex; flex-direction: column; gap: 2px; padding-inline: 2px; }
.offer-body .name { font-size: 16px; }
.offer-body .price { font-size: 16px; font-weight: 700; }
.b-hero .offer-media { position: absolute; inset: 0; }
.b-items { display: flex; flex-direction: column; }
.b-item { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.b-item .media { width: 56px; aspect-ratio: 1; border-radius: 12px; flex: none; }
.in-offer { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r); background: var(--surface); }
.in-offer .offer-media { width: 64px; aspect-ratio: 1; border-radius: 12px; flex: none; gap: 2px; }

/* category blocks on home + pages */
.cat-ic { width: 44px; aspect-ratio: 1; border-radius: 14px; flex: none; }
.cat-list { display: grid; gap: 12px; }
@media (min-width: 720px) { .cat-list { grid-template-columns: 1fr 1fr; } }
.cat-card { display: flex; align-items: center; gap: 14px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); transition: transform var(--fast) var(--ease); }
.cat-card:active { transform: scale(.985); }
.cat-card .media { width: 84px; aspect-ratio: 1; border-radius: 16px; flex: none; }
.cat-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; border-radius: var(--r-lg); background: var(--surface); }
.cat-hero .media { width: 92px; aspect-ratio: 1; border-radius: 18px; flex: none; }
.select.sm { height: 40px; padding-inline: 12px 30px; font-size: 13px; width: auto; }

/* trust strip */
.trust { display: grid; gap: 10px; }
@media (min-width: 720px) { .trust { grid-template-columns: repeat(3, 1fr); } }
.trust > div { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: center; padding: 16px; border-radius: var(--r-lg); background: var(--surface); }
.trust > div > svg { grid-row: span 2; }
.trust span { font-size: 12px; color: var(--muted); }

/* product page */
.crumbs { display: flex; gap: 6px; color: var(--muted); align-items: center; }
.crumbs a:hover { color: var(--text); text-decoration: underline; }
.compat { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); font-size: 14px; }
.compat.ok { background: var(--ok-bg); color: var(--ok); }
.compat.bad { background: var(--warn-bg); color: var(--warn); }
.compat .btn { color: var(--text); flex: none; }
.specs { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.specs > div { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 12px; padding: 11px 14px; font-size: 14px; }
.specs > div:nth-child(odd) { background: var(--surface); }
.specs dt { color: var(--muted); }
.specs dd { font-weight: 600; margin: 0; }

/* cart */
.cart-item.is-bundle .media { aspect-ratio: 1; }
.cart-item .media .offer-media { position: absolute; inset: 0; border-radius: 0; aspect-ratio: auto; gap: 2px; }
.free-bar { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--r); background: var(--surface); }
.free-bar .track { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.free-bar .track > span { display: block; height: 100%; border-radius: inherit; background: var(--text); transition: width .6s var(--ease); }
.free-bar.done { background: var(--ok-bg); color: var(--ok); }
.free-bar.done .track > span { background: var(--ok); }
.btn-wa { background: #25D366; color: #fff; }
.btn-wa:hover { background: #1EBE5A; }

/* admin: offer builder, specs, option chips */
.offer-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px; border-radius: var(--r); background: var(--surface); }
.offer-item .media { width: 60px; aspect-ratio: 1; border-radius: 12px; flex: none; }
.pick-row { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 14px; width: 100%; }
.pick-row:hover { background: var(--surface); }
.pick-row .media { width: 48px; aspect-ratio: 1; border-radius: 12px; flex: none; }
.spec-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; align-items: center; }
.chip-x { margin-inline-start: 4px; width: 20px; height: 20px; border-radius: 99px; display: inline-grid; place-items: center; background: rgba(255,255,255,.2); color: inherit; font-size: 15px; line-height: 1; }
.qty.sm { height: 40px; }
.qty.sm button { width: 34px; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.shake { animation: shake .3s; border-color: var(--danger) !important; }
.hidden-search { display: none !important; }
.phone-bar { border: 0; }
.b-hero .offer-media { aspect-ratio: auto; height: 100%; }
select.select.sm { height: 40px; min-height: 40px; padding-block: 0; padding-inline: 12px 32px; font-size: 13px; width: auto; border-radius: var(--pill); }

/* =========================================================
   Tech Innovation theme — finishing touches
   ========================================================= */
:root { color-scheme: dark; }
body { background: var(--bg); }
body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(1200px 600px at 50% -10%, rgba(0,102,255,.22), transparent 70%); }
/* faint circuit grid, fades out downward (static = free) */
body::before { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; will-change: transform;
  background-image: linear-gradient(rgba(0,140,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(0,140,255,.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 60%, transparent 100%); mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 60%, transparent 100%); }
.tech-bg { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; will-change: transform; }
#app { position: relative; z-index: 1; }

/* buttons + chips: electric blue */
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 0 0 1px rgba(0,255,255,.15), 0 6px 22px rgba(0,102,255,.45); }
.btn-primary:hover { background: #1A75FF; box-shadow: 0 0 0 1px rgba(0,255,255,.35), 0 8px 30px rgba(0,102,255,.6); }
.btn { color: var(--text); }
.btn-outline { box-shadow: inset 0 0 0 1px rgba(0,255,255,.25); }
.btn-ok { color: #06281C; }
.chip { color: var(--text); }
.chip:hover { border-color: rgba(0,255,255,.35); }
.chip[aria-pressed="true"], .chip.is-on { background: rgba(0,102,255,.18); border-color: var(--brand); color: #fff; box-shadow: 0 0 14px rgba(0,102,255,.35); }
.icon-btn.on-image { background: rgba(11,13,18,.72); color: #fff; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.fit-tag { background: rgba(11,13,18,.8); }
.pill-tag.new { background: rgba(0,255,255,.12); color: var(--accent); box-shadow: none; }
.pill-tag.dark { background: var(--brand); color: #fff; }
.switch span { background: #fff; }
.switch[aria-checked="true"] { background: var(--brand); box-shadow: 0 0 12px rgba(0,102,255,.6); }
.tabs button[aria-selected="true"] { background: var(--surface-2); box-shadow: inset 0 -2px 0 var(--brand); }
.tabs .n { background: var(--brand); color: #fff; }
.gallery-dots button[aria-current="true"] { background: var(--accent); }
.free-bar .track > span { background: linear-gradient(90deg, var(--brand), var(--accent)); }
.save-tag, .pill-tag.sale { background: linear-gradient(90deg, #0050E6, #00A3FF); }
.badge-count { box-shadow: 0 0 10px rgba(0,102,255,.7); }
.price, .p-card .price { color: #fff; }

/* glass bars */
.header, .tabbar, .m-top, .mini-bar, .buybar { border-color: rgba(0,255,255,.08) !important; }
.tabbar a[aria-current="page"] { color: #fff; }
.tab-ind { background: rgba(0,102,255,.22) !important; box-shadow: 0 0 16px rgba(0,102,255,.45); }

/* inputs */
.input, .select, .textarea, .search, .input-prefix { background: var(--surface); color: var(--text); }
.input:focus, .select:focus, .textarea:focus, .input-prefix:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,102,255,.25); }
.search:focus-within { box-shadow: 0 0 0 2px var(--brand), 0 0 24px rgba(0,102,255,.35); }
select option { background: #151922; color: #fff; }
::placeholder { color: #6B7385; }

/* cards get a thin cyan edge + glow on hover */
.p-card .media, .offer-media, .cat .media, .cat-card, .phone-bar, .trust > div, .card, .order, .compat:not(.ok):not(.bad), .free-bar:not(.done), .in-offer, .cat-hero { box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.p-card:hover .media, .offer-card:hover .offer-media, .cat:hover .media { box-shadow: inset 0 0 0 1px rgba(0,255,255,.35), 0 10px 40px rgba(0,102,255,.28); }
.phone-bar .ph-ic { background: rgba(0,102,255,.15); color: var(--accent); box-shadow: 0 0 18px rgba(0,102,255,.35); }
.cart-item .media { background: var(--surface); }

/* headline: white → cyan */
.hero .h1 { background: linear-gradient(100deg, #FFFFFF 30%, #7FE9FF 75%, #00FFFF); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* toasts, sheets, drawer */
.toast { background: #151B26; color: #fff; box-shadow: 0 0 0 1px rgba(0,255,255,.15), var(--shadow-lg); }
.toast .ti { background: rgba(0,102,255,.25); color: var(--accent); }
.sheet, .drawer { box-shadow: 0 0 0 1px rgba(0,255,255,.1), var(--shadow-lg); }
.d-cta .btn { color: var(--on-text); background: #fff; }
.stars { color: #FFC83D; }
.star-input button.on, .star-input button.preview { color: #FFC83D; }
.share-card { color: #fff; }

/* animated wordmark (TechText) */
.tt-logo { position: relative; display: inline-block; width: 112px; height: 40px; direction: ltr; touch-action: pan-y; user-select: none; }
.tech-text-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@media (min-width: 1024px) { .tt-logo { width: 124px; height: 44px; } }

/* PulseHeart (like button) */
.fav { --ph-idle: #C9CED8; --ph-liked: #FF4D6D; color: var(--ph-idle); transition: transform .16s var(--ease); }
.fav .ph-heart { width: 20px; height: 20px; fill: none; stroke: currentColor; transform-origin: 50% 55%; transition: fill .16s, stroke .16s, color .16s; }
.fav[aria-pressed="true"] { color: var(--ph-liked); }
.fav[aria-pressed="true"] .ph-heart { fill: var(--ph-liked); stroke: var(--ph-liked); filter: drop-shadow(0 0 6px rgba(255,77,109,.55)); }
.fav:active { transform: scale(.97); }
.fav:focus-visible { outline: 2px solid rgba(255,77,109,.6); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .fav[aria-pressed="false"]:hover { color: color-mix(in srgb, var(--ph-idle) 55%, var(--ph-liked)); } }
@media (prefers-reduced-motion: reduce) { .fav, .fav .ph-heart { transition: none; } }

/* like pill: heart + count (PulseHeart) */
.ph-pill { direction: ltr; display: inline-flex; align-items: center; gap: 5px; height: 34px; padding-inline: 9px 11px; border-radius: var(--pill); border: 0; cursor: pointer; background: rgba(23,26,33,.82); color: var(--ph-idle); }
.media .fav.ph-pill { width: auto; height: 34px; }
.ph-pill .ph-heart { width: 18px; height: 18px; }
.ph-count { font-size: 13px; font-weight: 600; color: #F5F5F5; font-variant-numeric: tabular-nums; display: inline-flex; line-height: 1.2; overflow: hidden; }
.ph-count .d { display: inline-block; }
.ph-count .roll { position: relative; display: inline-grid; overflow: hidden; }
.ph-count .roll > span { grid-area: 1 / 1; }
.ph-pill.big { height: 44px; padding-inline: 12px 16px; gap: 8px; }
.ph-pill.big .ph-heart { width: 24px; height: 24px; }
.ph-pill.big .ph-count { font-size: 17px; }
@media (pointer: coarse) { .ph-pill { min-height: 36px; } }
/* the pill is ltr inside (heart then number), so place it with physical sides: opposite corner to the badges */
[dir="rtl"] .media .fav { left: 10px; right: auto; }
[dir="ltr"] .media .fav { right: 10px; left: auto; }

/* like pill: smaller, same height and line as the badges */
.media .fav.ph-pill { top: 10px; height: 24px; padding-inline: 7px 9px; gap: 4px; }
.media .fav.ph-pill .ph-heart { width: 14px; height: 14px; }
.media .fav.ph-pill .ph-count { font-size: 11px; }
@media (pointer: coarse) { .media .fav.ph-pill { min-height: 24px; } .media .fav.ph-pill::after { content: ''; position: absolute; inset: -10px -6px; } }
.pill-tag.best { background: rgba(0,102,255,.22); color: #BFE4FF; box-shadow: inset 0 0 0 1px rgba(0,255,255,.25); }

/* normal cards: small grow on touch */
@media (hover: none) { .p-card .media { transition: transform .2s ease; } .p-card:active .media { transform: scale(1.02); } }

/* StarBorder */
.star-border { position: relative; isolation: isolate; }
.star-border::before { content: ''; position: absolute; inset: 0; border-radius: inherit; z-index: -1; box-shadow: inset 0 0 0 1px var(--star-border-track); pointer-events: none; }
.star-border__light { position: absolute; pointer-events: none; z-index: 2; }
.btn.sb-add { box-shadow: 0 6px 24px rgba(0,102,255,.4); font-weight: 700; }
.btn.sb-add:hover { filter: brightness(1.08); }
.btn.sb-add.is-disabled { filter: grayscale(.6); opacity: .55; }

/* WakeSlider */
.budget { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; }
.wake-slider { display: flex; align-items: center; gap: 12px; }
.ws-track { position: relative; flex: 1; display: flex; align-items: center; min-height: 44px; touch-action: none; cursor: grab; }
.wake-slider.dragging .ws-track { cursor: grabbing; }
.ws-bar { position: relative; flex: 1; height: 100%; border-radius: 999px; background: var(--ws-track); transform: scaleY(.214); transition: background-color .12s; overflow: hidden; will-change: transform; }
.ws-bar.on { background: var(--ws-fill); box-shadow: 0 0 8px rgba(0,102,255,.35); }
.ws-bar i { position: absolute; inset: 0; background: var(--ws-crest); opacity: 0; border-radius: inherit; }
.ws-handle { position: absolute; inset: 0; width: 100%; height: 100%; background: transparent; border: 0; padding: 0; cursor: inherit; border-radius: 12px; }
.ws-handle:focus-visible { outline: 2px solid rgba(0,255,255,.6); outline-offset: 4px; }
.ws-value { min-width: 9ch; text-align: end; font-size: 13px; font-variant-numeric: tabular-nums; opacity: .8; white-space: nowrap; }

/* phone picker */
.phone-picker .brand-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 560px) { .phone-picker .brand-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.brand-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); text-align: start; transition: box-shadow .2s, transform .15s; }
.brand-tile:hover { box-shadow: inset 0 0 0 1px rgba(0,255,255,.35); }
.brand-tile:active { transform: scale(.98); }
.phone-picker .ph-chip { direction: ltr; }
.phone-picker .not-listed { align-self: center; text-decoration: underline; color: var(--muted); }
.cur-phone { padding: 8px 12px; border-radius: 14px; background: rgba(0,102,255,.12); box-shadow: inset 0 0 0 1px rgba(0,102,255,.35); }
.port-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px; border-radius: 16px; background: var(--surface); text-align: start; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.port-opt[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--brand); }
.phone-row { padding: 8px 0; border-bottom: 1px solid var(--line); }
.phone-row:last-child { border-bottom: 0; }
.phone-row .icon-btn { width: 36px; height: 36px; }
.phone-row .icon-btn[disabled] { opacity: .25; }
optgroup { background: #151922; color: var(--muted); }
[hidden] { display: none !important; }
.brand-tile, .port-opt { border: 0; color: var(--text); }

/* quick add on cards */
.quick-add { position: absolute; bottom: 10px; z-index: 3; height: 34px; min-width: 34px; padding-inline: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 1px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; box-shadow: 0 4px 16px rgba(0,102,255,.45); cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s; }
.quick-add .icon-sm { width: 16px; height: 16px; }
.quick-add:hover { box-shadow: 0 0 0 1px rgba(0,255,255,.5), 0 6px 20px rgba(0,102,255,.6); }
.quick-add:active { transform: scale(.92); }
.quick-add:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[dir="rtl"] .quick-add { left: 10px; }
[dir="ltr"] .quick-add { right: 10px; }
@media (pointer: coarse) { .quick-add::after { content: ''; position: absolute; inset: -6px; } }
.p-card .meta .sold { font-size: 11px; color: var(--muted); }

/* delivery box on product / offer page */
.deliver-box { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(0,255,255,.12); }
.deliver-box > .row:first-child b { color: #fff; }
.deliver-box > .row:first-child > svg { color: var(--accent); flex: none; margin-top: 2px; }
.deliver-box > .row > svg { color: var(--muted); flex: none; }

/* calmer motion */
.header { background: rgba(11,13,18,.97); }
[data-reveal] { transform: translate3d(0, 10px, 0); transition-duration: .4s, .45s; }
/* cards inside sideways rows only fade in: sliding up made them look cut off at the top */
.h-row [data-reveal], .offer-row [data-reveal] { transform: none; }
.tech-bg { transition: opacity .35s ease; }
.tech-bg.quiet { opacity: .3; }

/* TextAnimate (slideLeft): words/letters slide in one by one, once */
.hero .h1 { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: #ffffff; }
.ta .ta-seg { display: inline-block; opacity: 0; transition: opacity var(--ta-t) ease-out, transform var(--ta-t) cubic-bezier(.22,1,.36,1), filter var(--ta-t) ease-out; transition-delay: var(--ta-d); will-change: transform, opacity; }
.ta-slideLeft .ta-seg { transform: translateX(36px); filter: blur(4px); }
.ta.ta-in .ta-seg { filter: none; }
.ta.ta-in .ta-seg { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .ta .ta-seg { opacity: 1; transform: none; transition: none; } }
.hero .h1 .ta-seg { color: inherit; }

/* trust strip under the hero */
.trust-strip { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-top: 14px; }
.trust-strip::-webkit-scrollbar { display: none; }
.trust-strip span { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding-inline: 12px; border-radius: 999px; background: rgba(0,102,255,.1); box-shadow: inset 0 0 0 1px rgba(0,255,255,.15); font-size: 12px; color: #D8E6FF; white-space: nowrap; }
.trust-strip svg { color: var(--accent); }

/* coupon banner */
.promo { display: flex; flex-direction: column; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: radial-gradient(120% 140% at 100% 0%, rgba(0,102,255,.35), transparent 60%), #0F1420; box-shadow: inset 0 0 0 1px rgba(0,255,255,.18); }
.promo-title { font-size: 18px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 15px; padding: 6px 10px; border-radius: 10px; background: rgba(0,0,0,.35); color: var(--accent); letter-spacing: .5px; }
.tickets { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(130px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: none; }
.tickets::-webkit-scrollbar { display: none; }
.ticket { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 10px; border: 0; border-radius: 14px; background: #F3F8FF; color: #0B1630; cursor: pointer; text-align: center;
  -webkit-mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat;
          mask: radial-gradient(circle 7px at 0 50%, #0000 98%, #000) left / 51% 100% no-repeat, radial-gradient(circle 7px at 100% 50%, #0000 98%, #000) right / 51% 100% no-repeat; transition: transform .15s; }
.ticket b { font-size: 17px; color: #0050E6; }
.ticket .tiny { color: #4A5A78; }
.ticket .code { margin-top: 4px; font-weight: 800; font-size: 13px; letter-spacing: 1px; padding: 2px 8px; border-radius: 6px; border: 1px dashed rgba(0,80,230,.45); }
.ticket[aria-pressed="true"] { background: #DFF7FF; box-shadow: inset 0 0 0 2px var(--brand); }
.ticket[aria-pressed="true"] .code::after { content: ' ✓'; }
.ticket:active { transform: scale(.97); }
.ticket-mini { font-weight: 800; letter-spacing: 1px; padding: 6px 10px; border-radius: 8px; border: 1px dashed rgba(0,255,255,.4); color: var(--accent); font-size: 13px; }

/* today's deals: two boxes */
.deal-boxes { display: grid; gap: 12px; }
@media (min-width: 760px) { .deal-boxes { grid-template-columns: 1fr 1fr; } }
.deal-box { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.deal-box.best { background: linear-gradient(160deg, rgba(0,102,255,.14), transparent 60%), var(--surface); }
.deal-box.super { background: linear-gradient(160deg, rgba(0,255,255,.08), transparent 60%), var(--surface); }
.mini-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mini-p { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mini-p .media { position: relative; aspect-ratio: 1; border-radius: 14px; margin-bottom: 4px; }
.mini-p .media .pill-tag { position: absolute; bottom: 6px; inset-inline-start: 6px; height: 20px; font-size: 10px; padding-inline: 6px; z-index: 2; }
.mini-p .price { font-weight: 700; font-size: 13px; }

/* coupon in cart */
.coupon-on { padding: 8px 10px; border-radius: 12px; background: var(--surface-2); }
.countdown { display: inline-flex; gap: 8px; align-items: center; }
.countdown [data-cd-days]:empty { display: none; }

/* cards: heart only (the like count shows on the product page) */
.p-card .ph-count { display: none; }
.media .fav.ph-pill { padding-inline: 5px; min-width: 24px; justify-content: center; }

/* payment choice at checkout */
.pay-opt { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--surface); cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); transition: box-shadow .15s; }
.pay-opt input { position: absolute; opacity: 0; pointer-events: none; }
.pay-opt .radio-dot { width: 22px; height: 22px; border-radius: 99px; box-shadow: inset 0 0 0 2px rgba(255,255,255,.3); flex: none; transition: box-shadow .15s; }
.pay-opt:has(input:checked) { box-shadow: inset 0 0 0 2px var(--brand); }
.pay-opt:has(input:checked) .radio-dot { box-shadow: inset 0 0 0 7px var(--brand); }
.pay-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.bank-details { white-space: pre-wrap; font-family: inherit; font-size: 14px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); margin: 0; direction: ltr; text-align: start; }
.wil-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.wil-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wil-row .input { width: 84px; height: 40px; }

/* sale countdown on the product page */
.sale-timer { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 6px 12px; border-radius: 10px; background: rgba(0,102,255,.14); box-shadow: inset 0 0 0 1px rgba(0,255,255,.25); font-size: 13px; }
.sale-timer svg { color: var(--accent); }
.sale-timer b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* sign in + account */
.auth-ic { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(0,102,255,.16); color: var(--accent); box-shadow: 0 0 24px rgba(0,102,255,.35); }
.auth-ic svg { width: 28px; height: 28px; }
.otp { text-align: center; letter-spacing: 14px; font-size: 24px; height: 60px; }
.auth-perks { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--r); background: var(--surface); }
.auth-perks span { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.auth-perks svg { color: var(--accent); flex: none; }
.profile-head { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r-lg); background: radial-gradient(120% 140% at 100% 0%, rgba(0,102,255,.28), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px rgba(0,255,255,.12); }
.avatar-lg { width: 56px; height: 56px; border-radius: 99px; flex: none; display: grid; place-items: center; font-size: 22px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00C2FF, #0050E6); box-shadow: 0 0 20px rgba(0,102,255,.45); }
.stats-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-3 a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 6px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.stats-3 b { font-size: 20px; }
.stats-3 span { font-size: 12px; color: var(--muted); }
.addr { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--surface-2); }
.addr.is-default { box-shadow: inset 0 0 0 1px rgba(52,211,153,.35); }
.addr-ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(0,102,255,.14); color: var(--accent); flex: none; }
.acc-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border: 0; background: none; color: var(--text); text-align: start; border-bottom: 1px solid var(--line); font-size: 15px; }
.acc-row:last-child { border-bottom: 0; }
.acc-row > svg:first-child { color: var(--muted); }
.signin-nudge { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); background: rgba(0,102,255,.12); box-shadow: inset 0 0 0 1px rgba(0,255,255,.2); font-size: 13px; }
.signin-nudge b { color: var(--accent); white-space: nowrap; }
.header-actions .icon-btn[aria-current="page"] { color: var(--accent); }
/* phone / email switch on the sign-in page */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.seg button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 42px; border: 0; border-radius: 10px; background: none; color: var(--muted); font-weight: 600; font-size: 14px; transition: background .2s, color .2s; }
.seg button[aria-selected="true"] { background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(0,102,255,.4); }

/* =========================================================
   Header v2 (AliExpress-style): wide search with a button, category row under it
   ========================================================= */
.header-inner { flex-wrap: wrap; height: auto; min-height: var(--header-h); row-gap: 0; }
.header-search { display: block; order: 10; flex: 1 0 100%; max-width: none; padding-bottom: 10px; }
.no-hsearch .header-search { display: none; }
.hs-box { display: flex; align-items: center; height: 44px; padding: 4px; padding-inline-start: 16px; border-radius: 999px; background: #0E131C; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22); transition: box-shadow .2s; }
.hs-box:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 22px rgba(0,102,255,.35); }
.hs-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--text); }
.hs-box input::-webkit-search-cancel-button { display: none; }
.hs-btn { flex: none; display: grid; place-items: center; width: 56px; height: 100%; border: 0; border-radius: 999px; background: var(--brand); color: #fff; box-shadow: 0 4px 14px rgba(0,102,255,.4); }
.hs-btn:active { transform: scale(.96); }
@media (min-width: 1024px) {
  .header-inner { flex-wrap: nowrap; height: var(--header-h); }
  .header-search { order: 0; flex: 1; max-width: 760px; padding: 0; margin-inline: 12px; }
  .no-hsearch .header-search { display: block; visibility: hidden; }
  .hs-box { height: 46px; }
}
.cat-nav { border-bottom: 1px solid rgba(255,255,255,.06); background: rgba(11,13,18,.6); }
.cn-row { display: flex; align-items: center; gap: 4px; height: 48px; overflow-x: auto; scrollbar-width: none; }
.cn-row::-webkit-scrollbar { display: none; }
.cn-row a { flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding-inline: 12px; border-radius: 999px; font-size: 14px; color: #C9D3E6; white-space: nowrap; transition: color .2s, background .2s; }
.cn-row a:hover, .cn-row a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.06); }
.cn-row .cn-all { background: rgba(255,255,255,.07); color: #fff; font-weight: 700; padding-inline: 14px; }
.cn-row .cn-hot { color: var(--accent); font-weight: 700; }

/* ---------- Home banner ---------- */
.promo-hero { position: relative; display: grid; gap: 16px; margin-top: 14px; padding: 18px 16px; border-radius: var(--r-lg); overflow: hidden;
  background: radial-gradient(90% 120% at 0% 100%, rgba(0,102,255,.35), transparent 60%), radial-gradient(60% 90% at 100% 0%, rgba(0,255,255,.12), transparent 60%), #05070C;
  box-shadow: inset 0 0 0 1px rgba(0,255,255,.14); }
.ph-main { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ph-ends { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-weight: 700; font-size: 14px; color: #fff; }
.ph-ends .countdown { font-size: 14px; padding: 4px 10px; }
.ph-big { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; font-size: clamp(34px, 9vw, 56px); font-weight: 800; line-height: 1.1; letter-spacing: -.5px; }
.ph-big > span:first-child { background: linear-gradient(100deg, #FFFFFF 10%, #7FE9FF 55%, #00FFFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ph-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #05070C; flex: none; }
.ph-go svg { width: 16px; height: 16px; }
.ph-sub { font-size: 15px; font-weight: 500; color: #C9D3E6; line-height: 1.6; }
.ph-row { display: grid; gap: 10px; }
.ph-tickets { grid-auto-columns: minmax(118px, 1fr); }
.ph-tickets .ticket { background: #fff; padding: 12px 8px; border-radius: 10px; }
.ph-tickets .ticket b { color: #0050E6; font-size: 16px; }
.ph-tickets .ticket .code { border: 0; padding: 0; color: #0050E6; letter-spacing: .5px; }
.ph-tickets .ticket + .ticket::before { content: ''; position: absolute; inset-block: 10px; inset-inline-start: -6px; border-inline-start: 2px dashed rgba(0,80,230,.25); }
.ph-best { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 10px; background: linear-gradient(135deg, #D8EBFF, #BFE0FF); color: #0B1630; }
.ph-best b { color: #0050E6; }
.ph-price { display: inline-block; align-self: flex-start; padding: 4px 10px; border-radius: 6px; background: #1E2633; color: #fff; font-weight: 800; font-size: 16px; }
.ph-best s { color: #4A5A78; }
.ph-best .media { width: 86px; aspect-ratio: 1; border-radius: 10px; flex: none; }
.ph-art { display: none; }
@media (min-width: 760px) {
  .promo-hero { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); padding: 26px 28px; align-items: center; }
  .ph-row { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: stretch; }
  .ph-art { display: block; position: relative; height: 240px; }
  .ph-float { position: absolute; width: 132px; aspect-ratio: 1; border-radius: 22px; overflow: hidden; box-shadow: 0 18px 40px rgba(0,0,0,.5), 0 0 0 1px rgba(0,255,255,.2); animation: phFloat 6s ease-in-out infinite; }
  .ph-float.f0 { inset-inline-start: 8%; top: 18px; width: 160px; z-index: 2; }
  .ph-float.f1 { inset-inline-end: 6%; top: 4px; transform: rotate(8deg); animation-delay: -2s; }
  .ph-float.f2 { inset-inline-end: 22%; bottom: 0; transform: rotate(-7deg); animation-delay: -4s; }
  .ph-word { position: absolute; inset-inline-start: 0; bottom: -10px; font-size: 92px; font-weight: 900; letter-spacing: 4px; color: transparent; -webkit-text-stroke: 1.5px rgba(0,255,255,.35); font-family: system-ui, sans-serif; direction: ltr; }
}
@keyframes phFloat { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .ph-float { animation: none; } }

/* ---------- Today's deals (bundle deals + super deals) ---------- */
.center-head { justify-content: center; }
.deal-box { align-items: center; text-align: center; padding: 18px 14px; }
.deal-box.pack { background: linear-gradient(160deg, rgba(255,184,0,.08), transparent 55%), var(--surface); }
.db-title { font-size: 22px; font-weight: 800; }
.db-pill { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding-inline: 14px 8px; border-radius: 999px; font-weight: 700; font-size: 15px; background: rgba(255,184,0,.14); color: #FFD27A; }
.db-pill svg { color: #FFB800; }
.db-pill.sm { height: 28px; font-size: 13px; padding-inline: 10px; align-self: flex-start; }
.deal-box.super .db-pill { background: rgba(255,59,92,.14); color: #FF9AAD; }
.deal-box.best .db-pill { background: rgba(0,102,255,.16); color: #9CC3FF; }
.db-go svg { width: 14px; height: 14px; }
.deal-box .mini-row { width: 100%; text-align: start; }
.mp-name { font-size: 12px; color: #C9D3E6; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }
.mini-p .price { font-size: 15px; font-weight: 800; }
.mini-p .price.hot { color: #FF4D6A; }
.mp-off { align-self: flex-start; margin-top: 2px; padding: 2px 6px; border-radius: 4px; background: #FF2E4D; color: #fff; font-weight: 700; font-size: 12px; }
.mini-p .star { color: #FFB800; }

/* ---------- Bundle deal page, cart nudge, product box ---------- */
.pk-head { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-lg); background: radial-gradient(100% 120% at 100% 0%, rgba(255,184,0,.12), transparent 60%), var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); }
.pk-head .db-pill { align-self: flex-start; }
.pk-progress { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.pk-dots { display: flex; gap: 6px; }
.pk-dots span { flex: 1; height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); transition: background .3s; }
.pk-dots span.on { background: linear-gradient(90deg, #FFB800, #FFD27A); box-shadow: 0 0 10px rgba(255,184,0,.4); }
.pack-nudge, .pack-box { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,184,0,.08); box-shadow: inset 0 0 0 1px rgba(255,184,0,.25); }
.pack-nudge svg:first-child, .pack-box > svg:first-child { color: #FFB800; flex: none; }
.pack-nudge.done { background: rgba(52,199,89,.08); box-shadow: inset 0 0 0 1px rgba(52,199,89,.3); }
.pack-nudge.done svg { color: var(--ok); }
.pack-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,184,0,.2); }
.pk-thumbs { display: flex; flex: none; }
.pk-thumbs .media { width: 52px; aspect-ratio: 1; border-radius: 12px; box-shadow: 0 0 0 2px var(--surface); }
.pk-thumbs .media + .media { margin-inline-start: -14px; }
.pk-pick { display: grid; gap: 6px; max-height: 420px; overflow-y: auto; }
.pk-opt { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 12px; cursor: pointer; }
.pk-opt:has(input:checked) { background: rgba(0,102,255,.12); }
.pk-opt input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.pk-opt .media { width: 40px; aspect-ratio: 1; border-radius: 8px; flex: none; }
.pk-calc { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.04); }

/* ---------- Help page ---------- */
.help-list { margin: 0; padding-inline-start: 20px; display: flex; flex-direction: column; gap: 6px; color: #C9D3E6; font-size: 14px; line-height: 1.7; }
.help-sec > .row svg { color: var(--accent); }
.help-sec.flash { animation: helpFlash 1.6s ease; }
@keyframes helpFlash { 0%, 40% { box-shadow: inset 0 0 0 2px var(--accent); } }

/* ---------- Footer ---------- */
.site-foot { margin-top: 48px; border-top: 1px solid rgba(255,255,255,.07); background: #07090E; }
.sf-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 18px; padding-block: 28px; }
.sf-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sf-col b { font-size: 15px; margin-bottom: 2px; }
.sf-col > a { font-size: 13px; color: #8C97AD; }
.sf-col > a:hover { color: #fff; }
.sf-pay { display: flex; flex-wrap: wrap; gap: 6px; }
.sf-pay span { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding-inline: 10px; border-radius: 8px; background: #fff; color: #0B1630; font-size: 12px; font-weight: 700; }
.sf-pay svg { color: #0050E6; }
.sf-social { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-social a { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.07); color: #fff; transition: background .2s, color .2s; }
.sf-social a:hover { background: var(--brand); }
.sf-bottom { padding-block: 14px; background: #000; font-size: 12px; color: #8C97AD; }
@media (min-width: 900px) { .sf-grid { grid-template-columns: repeat(4, 1fr); } }
.has-tabbar .site-foot { margin-bottom: calc(-1 * var(--tabbar-pad, 0px)); }
.more-end { height: 1px; }
/* search bar: never wider than the screen (some Android browsers give search inputs a fixed minimum width) */
.header-search { flex: 0 0 100%; width: 100%; min-width: 0; box-sizing: border-box; }
.hs-box { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 8px; width: 100%; min-width: 0; box-sizing: border-box; overflow: hidden; }
.hs-box input { width: 100%; min-width: 0; -webkit-appearance: none; appearance: none; padding: 0; height: 100%; }
.hs-btn { width: 52px; height: 36px; }
@media (min-width: 1024px) { .header-search { flex: 1 1 auto; width: auto; } .hs-btn { height: 38px; } }
/* "خصم حتى": room for the letter ى under the line (gradient text cuts it off otherwise) */
.ph-big { line-height: 1.4; padding-bottom: 4px; }
.hs-box input { text-overflow: ellipsis; }
/* coupon tickets in the banner: swipe row that runs to the banner edge (looks intended, not cut) */
@media (max-width: 759px) {
  .ph-tickets { margin-inline: -16px; padding-inline: 16px; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; grid-auto-columns: 132px; }
  .ph-tickets .ticket { scroll-snap-align: start; }
}
/* footer payment tiles + social icons (like the reference) */
.sf-pay { gap: 10px; }
.pay-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 76px; height: 64px; padding: 6px 10px; border-radius: 10px; background: #fff; color: #0B1630; box-shadow: 0 0 0 1px rgba(0,0,0,.08); font-size: 11px; font-weight: 700; text-align: center; line-height: 1.3; }
.pay-tile.cod { min-width: 96px; height: auto; padding: 8px 10px; }
.pay-tile img { display: block; object-fit: contain; }
.pay-tile svg { width: 26px; height: 26px; color: #0B1630; }
.pay-tile.mark { min-width: 76px; height: 48px; }
.pay-tile.mark b { font-size: 14px; letter-spacing: .3px; }
.sf-social { gap: 18px; }
.sf-social a { width: auto; height: auto; background: none; border-radius: 0; color: #E6ECF7; }
.sf-social a:hover { background: none; color: var(--accent); }
.sf-social svg { width: 30px; height: 30px; stroke-width: 2; }
.sf-pay .pay-tile span, .sf-pay .pay-tile b { all: unset; font: inherit; }
.sf-pay .pay-tile b { font-size: 14px; font-weight: 800; }
.pay-tile, .pay-tile.cod, .pay-tile.mark { height: 64px; min-width: 84px; padding: 6px 12px; }
.pay-tile.cod img { width: 34px; height: 34px; }
@media (max-width: 899px) { .sf-pay-col, .sf-social-col { grid-column: 1 / -1; } }
.sf-pay > .pay-tile { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; height: 64px; min-width: 84px; padding: 6px 12px; border-radius: 10px; background: #fff; color: #0B1630; font-size: 11px; font-weight: 700; }
.sf-pay > .pay-tile svg { width: 26px; height: 26px; color: #0B1630; }
.sf-pay > .pay-tile.mark img { height: 34px; width: auto; }
/* footer payment tiles v2: one tidy row, all the same height */
.sf-pay { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-pay > .pay-tile { height: 52px; min-width: 0; padding: 0 14px; border-radius: 10px; background: #fff; box-shadow: 0 1px 0 rgba(0,0,0,.08); flex-direction: row; gap: 8px; justify-content: center; }
.sf-pay > .pay-tile.mark { width: 76px; padding: 0 10px; }
.sf-pay > .pay-tile.mark img { height: 28px; width: 100%; object-fit: contain; }
.sf-pay > .pay-tile.cod img, .sf-pay > .pay-tile.cod svg { width: 28px; height: 28px; flex: none; }
.sf-pay > .pay-tile.cod span { font-size: 13px; font-weight: 700; color: #0B1630; white-space: nowrap; }
@media (min-width: 900px) { .sf-grid { grid-template-columns: 1fr 1fr 1.7fr 1fr; } .sf-pay { flex-wrap: nowrap; } }
/* ---------- Sign-in page v2 ---------- */
.auth-wrap { max-width: 440px; padding-top: 28px; }
.auth-side { display: none; }
.or-line { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ''; flex: 1; height: 1px; background: rgba(255,255,255,.1); }
.social-btn { background: #fff; color: #0B1630; font-weight: 700; gap: 10px; }
.social-btn:hover { background: #EEF3FF; }
.social-btn img { width: 20px; height: 20px; }
.terms-line { line-height: 1.8; }
.terms-line a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (min-width: 900px) {
  .auth-wrap { max-width: 980px; display: grid; grid-template-columns: 1fr 440px; gap: 56px; align-items: start; padding-top: 48px; }
  .auth-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: calc(var(--demo-h) + var(--header-h) + 64px); padding: 32px; border-radius: var(--r-lg);
    background: radial-gradient(120% 120% at 0% 100%, rgba(0,102,255,.35), transparent 60%), radial-gradient(80% 80% at 100% 0%, rgba(0,255,255,.12), transparent 60%), #05070C; box-shadow: inset 0 0 0 1px rgba(0,255,255,.14); }
  .as-title { font-size: 30px; font-weight: 800; background: linear-gradient(100deg, #fff 20%, #7FE9FF 70%, #00FFFF); -webkit-background-clip: text; background-clip: text; color: transparent; line-height: 1.4; }
  .as-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
  .as-list li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); font-weight: 600; }
  .as-list svg { color: var(--accent); flex: none; }
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid rgba(255,255,255,.1); }
.auth-tabs button { height: 46px; border: 0; background: none; color: var(--muted); font-weight: 700; font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color .2s, border-color .2s; }
.auth-tabs button[aria-selected="true"] { color: #fff; border-bottom-color: var(--accent); }
/* ---------- Sign-in v3 (clean form + side card) ---------- */
.auth-h { font-size: clamp(30px, 6vw, 40px); font-weight: 800; letter-spacing: -.5px; line-height: 1.25; }
.auth .input, .auth .input-prefix { background: #1A1F29; box-shadow: none; border-radius: 12px; }
.auth .btn-primary.btn-lg { border-radius: 12px; }
.auth .seg { border-radius: 12px; }
.social-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.social-sq { display: flex; align-items: center; justify-content: center; gap: 10px; height: 60px; border: 0; border-radius: 14px; background: #1A1F29; color: #fff; font-weight: 700; font-size: 14px; transition: background .2s, transform .15s; }
.social-sq:hover { background: #222938; }
.social-sq:active { transform: scale(.97); }
.social-sq svg { width: 22px; height: 22px; }
.social-sq .g { font-size: 20px; font-weight: 900; font-family: system-ui, sans-serif; background: conic-gradient(from -45deg, #EA4335 0 25%, #FBBC05 0 50%, #34A853 0 75%, #4285F4 0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.link-accent { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font: inherit; font-weight: 700; cursor: pointer; }
.auth-side .as-list, .auth-side .as-title { display: none; }
@media (min-width: 900px) {
  .auth-wrap { max-width: 1120px; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 64px; align-items: stretch; }
  .auth-side { position: relative; overflow: hidden; min-height: 620px; padding: 32px; justify-content: flex-end; top: auto;
    background: radial-gradient(90% 70% at 30% 80%, rgba(0,102,255,.55), transparent 65%), radial-gradient(70% 60% at 80% 20%, rgba(0,255,255,.22), transparent 60%), linear-gradient(160deg, #0A0E16, #05070C 60%); }
  .as-glow { position: absolute; inset: 0; background: repeating-linear-gradient(135deg, transparent 0 120px, rgba(255,255,255,.025) 120px 121px); pointer-events: none; }
  .as-bottom { position: relative; display: flex; flex-direction: column; gap: 12px; }
  .as-chips { display: flex; flex-wrap: wrap; gap: 8px; }
  .as-chips span { padding: 6px 12px; border-radius: 8px; background: rgba(0,0,0,.45); font-size: 13px; font-weight: 600; backdrop-filter: blur(6px); }
  .as-quote { display: flex; flex-direction: column; gap: 12px; padding: 22px 24px; border-radius: 18px; background: rgba(10,14,22,.55); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
  .as-quote p { font-size: 19px; line-height: 1.7; }
  .as-stars { color: #FFB800; letter-spacing: 2px; }
}
/* phone field with country picker */
.phone-in { display: flex; align-items: stretch; height: 52px; border-radius: 12px; background: #1A1F29; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); transition: box-shadow .2s; }
.phone-in:focus-within { box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 18px rgba(0,102,255,.25); }
.phone-in.invalid { box-shadow: inset 0 0 0 1.5px var(--danger); }
.cc-pick { position: relative; flex: none; display: flex; align-items: center; gap: 4px; padding-inline: 12px 10px; background: rgba(255,255,255,.04); border-inline-end: 1px solid rgba(255,255,255,.08); font-weight: 700; font-size: 15px; white-space: nowrap; cursor: pointer; }
.cc-pick svg { width: 14px; height: 14px; opacity: .6; }
.cc-pick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 16px; }
.phone-in input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding-inline: 14px; font-size: 16px; color: var(--text); }
/* phone field v2: country button + grouped number, country sheet */
.phone-in .cc-pick { border: 0; color: #fff; gap: 6px; padding-inline: 14px 10px; font-variant-numeric: tabular-nums; }
.phone-in .cc-pick:active { background: rgba(255,255,255,.08); }
.cc-flag { font-size: 20px; line-height: 1; }
.phone-in input[type="tel"] { letter-spacing: .5px; font-variant-numeric: tabular-nums; font-size: 17px; }
.cc-search { display: flex; align-items: center; gap: 8px; height: 46px; padding-inline: 14px; border-radius: 12px; background: #1A1F29; color: var(--muted); }
.cc-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; color: var(--text); font-size: 16px; }
.cc-list { display: flex; flex-direction: column; max-height: 58vh; overflow-y: auto; margin-inline: -8px; overscroll-behavior: contain; }
.cc-sec { padding: 10px 12px 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
.cc-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-inline: 12px; border: 0; border-radius: 12px; background: none; color: var(--text); font-size: 15px; text-align: start; }
.cc-row:hover, .cc-row:focus-visible { background: rgba(255,255,255,.05); }
.cc-row[aria-pressed="true"] { background: rgba(0,102,255,.14); }
.cc-row[aria-pressed="true"] svg { color: var(--accent); }
.cc-code { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 52px; text-align: end; }
.cc-tick { width: 16px; }
/* menu: categories folded under one item */
.d-chev { display: inline-grid; place-items: center; transition: transform .25s; opacity: .7; }
[data-cats-toggle][aria-expanded="true"] .d-chev { transform: rotate(180deg); }
[data-cats-toggle] .end { display: inline-flex; align-items: center; gap: 8px; }
.d-sub { display: flex; flex-direction: column; margin: 2px 0 6px; padding-inline-start: 44px; border-inline-start: 1px solid rgba(255,255,255,.08); margin-inline-start: 22px; animation: dSub .25s ease; }
.d-subitem { display: flex; align-items: center; min-height: 42px; padding-inline: 12px; border-radius: 10px; font-size: 14px; color: #C9D3E6; }
.d-subitem:hover, .d-subitem[aria-current="page"] { background: rgba(255,255,255,.05); color: #fff; }
.d-subitem[aria-current="page"] { color: var(--accent); font-weight: 700; }
.d-subitem.all { color: var(--accent); font-weight: 700; }
@keyframes dSub { from { opacity: 0; transform: translateY(-4px); } }
.drawer-wa { display: flex; align-items: center; gap: 12px; margin: 8px 16px 4px; padding: 14px 16px; border-radius: 14px; background: #1FA855; color: #fff; box-shadow: 0 8px 22px rgba(31,168,85,.3); }
.drawer-wa svg { width: 26px; height: 26px; flex: none; }
.drawer-wa .tiny { opacity: .9; }
.pin-warn { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,184,0,.12); box-shadow: inset 0 0 0 1px rgba(255,184,0,.35); color: #FFD27A; font-size: 14px; }
/* the footer is drawn only when it comes near the screen */
.site-foot { content-visibility: auto; contain-intrinsic-size: auto 420px; }
/* sections far below the screen are laid out only when you scroll near them */
main > .container > .section:nth-child(n+4), main .section[data-more] { content-visibility: auto; contain-intrinsic-size: auto 520px; }
/* smoother card hover: follows the mouse softly, no jitter */
.tilt .media { transition: transform .45s cubic-bezier(.22,1,.36,1), box-shadow .3s; will-change: auto; }
.tilt.tilting .media { transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .3s; }
.p-card:hover .media img, .p-card:hover .media svg.ph { transform: scale(1.03); }
/* cart button answers the mouse instantly */
.quick-add { transition: transform .08s ease-out, box-shadow .08s ease-out, background-color .08s ease-out; }
@media (hover: hover) and (pointer: fine) {
  .quick-add:hover { transform: scale(1.08); background-color: #1A7BFF; box-shadow: 0 0 0 1.5px rgba(0,255,255,.7), 0 6px 22px rgba(0,102,255,.7); }
  .quick-add:active { transform: scale(.94); }
}
.tilt { transform-style: flat; } /* 3D "preserve" made the tilted picture hide its own cart button from the mouse */
/* cart: select several items and remove them */
.sel-bar { position: sticky; top: calc(var(--demo-h) + var(--header-h) + 8px); z-index: 5; display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border-radius: 14px; background: #141924; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.35); }
.sel-all { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.sel-bar input, .sel-box input { width: 20px; height: 20px; accent-color: var(--brand); cursor: pointer; }
.cart-item .sel-box { display: flex; align-items: center; padding-inline-end: 4px; }
.cart-item .sel-box[hidden] { display: none; }
.selecting .cart-item { grid-template-columns: auto 72px 1fr; cursor: pointer; }
.selecting .cart-item.is-picked { box-shadow: inset 0 0 0 1.5px var(--brand); background: rgba(0,102,255,.08); }
.sel-bar .btn-danger:disabled { opacity: .45; pointer-events: none; }
.selecting .cart-item { padding: 10px; border-radius: 16px; transition: background .15s, box-shadow .15s; }
/* header spacing: buttons don't touch the top edge, search has room around it */
.header-inner { padding-block: 10px 0; row-gap: 10px; align-items: center; }
.header-inner > .icon-btn, .header-actions .icon-btn { width: 44px; height: 44px; }
.header-search { padding-bottom: 12px; }
@media (min-width: 760px) {
  .header-inner { flex-wrap: nowrap; height: auto; min-height: 72px; padding-block: 12px; }
  .header-search { order: 0; flex: 1 1 auto; width: auto; max-width: 760px; padding: 0; margin-inline: 14px; }
  .no-hsearch .header-search { display: block; visibility: hidden; }
}
/* deal of the day badge (the only card with the neon border) */
.pill-tag.deal-day { display: inline-flex; align-items: center; gap: 4px; background: linear-gradient(90deg, #0066ff, #00c8ff); color: #fff; box-shadow: 0 0 14px rgba(0,200,255,.5); }
.pill-tag.deal-day svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
/* neon trail to the cart + the cart lighting up */
.neon-fly { position: fixed; inset: 0; z-index: 9999; pointer-events: none; filter: drop-shadow(0 0 6px #00ffff) drop-shadow(0 0 12px rgba(0,102,255,.8)); }
.cart-ping { animation: cartPing .85s ease-out; }
@keyframes cartPing {
  0% { box-shadow: 0 0 0 0 rgba(0,255,255,.0); }
  20% { box-shadow: 0 0 0 2px #00ffff, 0 0 24px 6px rgba(0,200,255,.75); color: #00ffff; transform: scale(1.12); }
  100% { box-shadow: 0 0 0 14px rgba(0,255,255,0); transform: scale(1); }
}
.tabbar a.cart-ping { border-radius: 14px; }
/* 404 */
.nf { padding-top: 32px; }
.nf-hero { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 560px; margin-inline: auto; }
.nf-code { font-size: clamp(88px, 22vw, 150px); font-weight: 900; line-height: 1; letter-spacing: 6px; direction: ltr; color: transparent; -webkit-text-stroke: 2px #00e5ff; text-shadow: 0 0 18px rgba(0,229,255,.55), 0 0 42px rgba(0,102,255,.45); font-family: system-ui, sans-serif; }
.nf-code span { display: inline-block; animation: nfFlicker 3.2s infinite; }
@keyframes nfFlicker { 0%, 18%, 22%, 62%, 64%, 100% { opacity: 1; } 20%, 63% { opacity: .25; } }
.nf-search { width: 100%; margin-top: 4px; }
@media (prefers-reduced-motion: reduce) { .nf-code span { animation: none; } }
/* seasonal banner */
.season-hero { position: relative; display: flex; align-items: flex-end; min-height: 200px; margin-top: 14px; border-radius: var(--r-lg); overflow: hidden; isolation: isolate;
  background: radial-gradient(90% 120% at 0% 100%, rgba(0,102,255,.5), transparent 60%), radial-gradient(60% 90% at 100% 0%, rgba(0,255,255,.18), transparent 60%), #05070C; box-shadow: inset 0 0 0 1px rgba(0,255,255,.14); }
.season-hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.season-hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, rgba(5,7,12,.85), rgba(5,7,12,.15) 70%); }
.sh-text { display: flex; flex-direction: column; gap: 8px; padding: 20px; }
.sh-title { font-size: clamp(26px, 6vw, 42px); font-weight: 800; line-height: 1.25; }
.sh-sub { color: #DCE6F7; font-size: 15px; }
.sh-btn { align-self: flex-start; margin-top: 4px; }
.sh-btn svg { width: 14px; height: 14px; }
@media (min-width: 760px) { .season-hero { min-height: 300px; } .sh-text { padding: 32px; } }
/* shop by budget */
.budget-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(110px, 1fr); gap: 10px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.budget-row::-webkit-scrollbar { display: none; }
.budget-chip { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px 10px; border-radius: 16px; background: var(--surface); box-shadow: inset 0 0 0 1px rgba(0,255,255,.14); transition: box-shadow .2s, transform .15s; }
.budget-chip:hover { box-shadow: inset 0 0 0 1.5px var(--accent), 0 0 18px rgba(0,200,255,.25); }
.budget-chip:active { transform: scale(.97); }
.bc-top { font-size: 12px; color: var(--muted); }
.budget-chip b { font-size: 22px; font-weight: 800; color: #fff; }
.bc-n { font-size: 11px; color: var(--accent); }
.chip-x { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 99px; background: rgba(0,102,255,.16); color: #9CC3FF; }
.chip-x a { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; }
/* floating buttons: WhatsApp + back to top */
.float-btns { position: fixed; inset-inline-start: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.fb-wa, .fb-top { display: grid; place-items: center; border: 0; border-radius: 50%; color: #fff; }
.fb-wa { width: 52px; height: 52px; background: #1FA855; box-shadow: 0 8px 24px rgba(31,168,85,.45); }
.fb-wa svg { width: 26px; height: 26px; }
.fb-top { width: 42px; height: 42px; background: rgba(20,25,36,.92); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(0,0,0,.4); backdrop-filter: blur(8px); }
.fb-top svg { transform: rotate(180deg); }
.fb-top[hidden] { display: none; }
@media (min-width: 1024px) { .float-btns { bottom: 28px; inset-inline-start: 28px; } }
.h-row, .offer-row { scroll-padding-inline: 20px; } /* snapping keeps the 20px side gap, so the first card is never cut by the screen edge */
@media (min-width: 720px) { .h-row, .offer-row { scroll-padding-inline: 0; } }
/* small text button (e.g. "Clear all" next to a section title) */
.link-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: rgba(255,255,255,.05); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.link-btn:hover { background: rgba(255,255,255,.09); color: var(--text); }
.link-btn svg { width: 15px; height: 15px; }
/* cart item: name wraps, price never pushes outside the screen */
.cart-item > .stack { min-width: 0; }
.cart-item .ci-name { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.cart-item .ci-price { flex: none; }
.cart-item .row.between { gap: 10px; }
/* select bar v2: [select all] [count] [cancel] / [delete] */
.sel-bar { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "all count cancel" "del del del"; align-items: center; gap: 10px 12px; padding: 12px 14px; }
.sel-all { grid-area: all; }
.sel-count { grid-area: count; font-size: 13px; color: var(--muted); white-space: nowrap; }
.sel-cancel { grid-area: cancel; min-height: 36px; }
.sel-del { grid-area: del; width: 100%; height: 46px; justify-content: center; font-weight: 700; background: rgba(255,59,92,.14); color: #FF6B83; }
.sel-del:not(:disabled) { background: #E5364F; color: #fff; box-shadow: 0 6px 18px rgba(229,54,79,.35); }
@media (min-width: 720px) {
  .sel-bar { grid-template-columns: auto 1fr auto auto; grid-template-areas: "all count del cancel"; }
  .sel-del { width: auto; padding-inline: 18px; height: 40px; }
}
.selecting .cart-item { grid-template-columns: 26px 64px minmax(0, 1fr); gap: 10px; }
.selecting .cart-item .media { width: 64px; }
.selecting [data-rm] { visibility: hidden; } /* while picking, the single delete buttons step aside */
/* ---------- cart: the title row turns into the selection bar (no extra block) ---------- */
.cart-head { margin-bottom: 18px; min-height: 52px; display: flex; align-items: center; }
.ch-normal, .ch-select { display: flex; align-items: center; width: 100%; gap: 10px; }
.ch-normal { justify-content: space-between; }
.ch-normal[hidden], .ch-select[hidden] { display: none; }
.ch-select { animation: chIn .22s ease-out; }
@keyframes chIn { from { opacity: 0; transform: translateY(-4px); } }
.ch-x { width: 40px; height: 40px; }
.ch-count { flex: 1; font-size: 20px; font-weight: 800; }
.ch-all { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px; background: rgba(255,255,255,.05); font-size: 14px; font-weight: 600; cursor: pointer; }
.ch-del { width: 40px; height: 40px; color: #FF6B83; box-shadow: inset 0 0 0 1px rgba(255,107,131,.35); transition: box-shadow .15s, background .15s, opacity .15s; }
.ch-del:disabled { opacity: .35; pointer-events: none; }
.ch-del:not(:disabled) { box-shadow: inset 0 0 0 1.5px #FF6B83, 0 0 14px rgba(255,59,92,.35); }
.ch-del:not(:disabled):hover { background: rgba(255,59,92,.12); }
/* round neon checkboxes */
.ring-check { appearance: none; -webkit-appearance: none; width: 22px; height: 22px; margin: 0; border-radius: 50%; border: 2px solid rgba(255,255,255,.28); background: transparent; display: inline-grid; place-items: center; cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; flex: none; }
.ring-check:checked { border-color: var(--accent); background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 14px no-repeat; box-shadow: 0 0 12px rgba(0,229,255,.55); }
.ring-check:indeterminate { border-color: var(--accent); background: var(--brand) linear-gradient(#fff, #fff) center / 10px 2.5px no-repeat; }
.ring-check:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* picked item: thin blue frame only */
.selecting .cart-item.is-picked { background: transparent; box-shadow: inset 0 0 0 1.5px rgba(0,102,255,.9), 0 0 18px rgba(0,102,255,.18); }
/* ---------- cart gestures ---------- */
.ci-wrap { position: relative; border-radius: 16px; }
.ci-wrap .cart-item { position: relative; z-index: 1; background: var(--bg); border-radius: 16px; touch-action: pan-y; will-change: auto; }
.ci-bg { position: absolute; inset: 0; z-index: 0; display: none; align-items: center; justify-content: flex-end; gap: 8px; padding-inline: 24px; border-radius: 16px; background: rgba(229,54,79,.18); color: #FF6B83; font-weight: 700; font-size: 14px; }
[dir="rtl"] .ci-bg { justify-content: flex-end; flex-direction: row-reverse; }
.ci-wrap.swiping .ci-bg { display: flex; }
.ci-wrap.will-remove .ci-bg { background: #E5364F; color: #fff; }
.ci-wrap.will-remove .ci-bg svg { animation: binPop .25s ease-out; }
@keyframes binPop { 50% { transform: scale(1.25); } }
.ch-fav { width: 40px; height: 40px; color: #9CC3FF; box-shadow: inset 0 0 0 1px rgba(0,102,255,.4); transition: opacity .15s, box-shadow .15s; }
.ch-fav:disabled { opacity: .35; pointer-events: none; }
.ch-fav:not(:disabled) { box-shadow: inset 0 0 0 1.5px #4D9BFF, 0 0 14px rgba(0,102,255,.35); }
/* "Undo" in a toast */
.toast-act { flex: none; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 800; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; padding: 6px 4px; }
.ci-bg, [dir="rtl"] .ci-bg { direction: ltr; justify-content: flex-end; flex-direction: row; } /* the space opens on the right when the item slides left */
.ci-wrap { overflow: hidden; } /* the sliding item must not widen the page */
/* cart items as cards: content sits inside like the boxes above it (no text touching the edge) */
.ci-wrap .cart-item { background: var(--surface); padding: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); grid-template-columns: 76px minmax(0, 1fr); gap: 12px; }
.ci-wrap .cart-item .media { width: 76px; border-radius: 12px; }
.selecting .ci-wrap .cart-item { grid-template-columns: 24px 64px minmax(0, 1fr); padding: 12px; }
.selecting .ci-wrap .cart-item .media { width: 64px; }
.ci-wrap + .ci-wrap { margin-top: 0; }
.ci-bg { border-radius: 16px; }
.ch-count { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ch-select { gap: 8px; }
.ci-wrap .cart-item .qty { background: var(--surface-2); }
/* space between the last cart item and the totals box (phones stack them) */
@media (max-width: 899px) { .two-col > aside.card { margin-top: 20px !important; } }

/* ===== Layout guards: nothing may push past the screen edge ===== */
.form-grid > *, .field, .stack > *, .row > .grow { min-width: 0; }
.input, .select, textarea, .phone-in { max-width: 100%; }
.phone-in input[type="tel"] { width: 0; flex: 1 1 0; }
@media (max-width: 374px) { .cart-item .rm-txt { display: none; } .cart-item [data-rm] { padding-inline: 10px; } }
.tabbar a { min-width: 0; flex: 1 1 0; }
.tabbar a > span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-inline: 2px; }
@media (max-width: 359px) { .tabbar a { font-size: 10px; } }
.tabbar .badge-count { inset-inline-end: calc(50% - 24px); }
/* long names / emails / numbers wrap instead of pushing the page */
.profile-head .stack > *, .field > .small, .kv > *, .card .small, .card .tiny, .order-card *, .ci-name, .pay-opt span { overflow-wrap: anywhere; }
.phone-bar > .stack { min-width: 0; overflow-wrap: anywhere; }
.phone-bar > .btn { flex: none; }
@media (max-width: 374px) { .phone-bar > .btn { display: none; } .phone-bar { gap: 12px; padding: 12px 14px; } }

/* ===== Rich empty pages (cart / orders) ===== */
.ep-hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 28px 8px 8px; }
.ep-art { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: var(--accent, #00FFFF);
  background: radial-gradient(circle at 50% 40%, rgba(0,102,255,.22), rgba(0,102,255,.06) 70%);
  box-shadow: inset 0 0 0 1px rgba(0,255,255,.25), 0 0 28px rgba(0,102,255,.35); margin-bottom: 4px; }
.ep-art svg { width: 32px; height: 32px; filter: drop-shadow(0 0 6px rgba(0,255,255,.55)); }
.ep-hero .h2 { margin: 0; }
.ep-hero .muted { max-width: 34ch; margin: 0 0 6px; }
.ep-cats { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; max-width: 560px; }
.ep-cats .chip { height: 34px; font-size: 13px; }
.ep-help { display: flex; align-items: center; gap: 12px; margin: 22px auto 0; max-width: 560px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px rgba(255,255,255,.06); text-align: start; }
.ep-help > svg:first-child { color: #25D366; flex: none; }
.ep-help .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ep-help:active { transform: scale(.985); }

/* bottom bar: solid enough that page text never shows through it */
.tabbar { background: #0A0C11; box-shadow: 0 -8px 24px rgba(0,0,0,.35); }

/* ===== Page change: header, category row and bottom bar stay still; only the page content fades in ===== */
.header { view-transition-name: sq-header; }
.cat-nav { view-transition-name: sq-catnav; }
.tabbar { view-transition-name: sq-tabbar; }
::view-transition-group(sq-header), ::view-transition-group(sq-catnav), ::view-transition-group(sq-tabbar) { animation: none; }
::view-transition-old(sq-header), ::view-transition-old(sq-catnav), ::view-transition-old(sq-tabbar) { display: none; }
::view-transition-new(sq-header), ::view-transition-new(sq-catnav), ::view-transition-new(sq-tabbar) { animation: none; }
/* the old page stays fully drawn underneath while the new one fades in on top: no blank flash */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: .22s cubic-bezier(.2,.8,.2,1) both vtIn; }
@keyframes vtIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ===== No blinking on page changes =====
   Browsers with view transitions already fade the new page in once; the page and its blocks must not
   fade again from zero on top of that (that double fade was the "disappears and comes back"). */
#app.still .page-in, #app.still .page-in .enter > *, #app.still .page-in .pop { animation: none !important; }
@keyframes pageIn { from { opacity: .55; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pageFade { from { opacity: .55; } }
@keyframes upSoft { from { opacity: .6; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-in .enter > * { animation-name: upSoft; animation-duration: .4s; }
@supports (view-transition-name: a) {
  .page-in, .page-in.has-buybar { animation: none; }
}
.profile-head .ph-name { font-size: 17px; line-height: 1.35; text-wrap: balance; }
@media (max-width: 380px) { .profile-head .ph-name { font-size: 16px; } }
.profile-head { position: relative; }
@media (max-width: 599px) {
  .profile-head { align-items: center; padding-inline-end: 52px; }
  .profile-head .ph-edit { position: absolute; top: 12px; inset-inline-end: 12px; width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 50%; }
  .profile-head .ph-edit-txt { display: none; }
}

/* ===== Profile photo ===== */
.av-btn { position: relative; border: 0; padding: 0; cursor: pointer; overflow: visible; }
.avatar-lg img, .d-avatar img, .hdr-av img, .av-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av-cam { position: absolute; bottom: -2px; inset-inline-end: -4px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand, #0066FF); color: #fff; box-shadow: 0 0 0 3px var(--surface), 0 0 12px rgba(0,102,255,.6); }
.av-cam svg { width: 13px; height: 13px; }
.av-btn:active { transform: scale(.95); }
.av-preview { width: 132px; height: 132px; margin: 6px auto 8px; border-radius: 50%; display: grid; place-items: center; font-size: 48px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00C2FF, #0050E6); box-shadow: 0 0 0 3px rgba(0,255,255,.25), 0 0 30px rgba(0,102,255,.45); }
.d-avatar { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #00C2FF, #0050E6); box-shadow: 0 0 14px rgba(0,102,255,.4); }
.hdr-av { width: 30px; height: 30px; border-radius: 50%; display: block; box-shadow: 0 0 0 2px rgba(0,255,255,.35); }

/* ===== Profile photo cropper ===== */
.crop-stage { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 20px; background: #05070B; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.crop-stage:active { cursor: grabbing; }
.crop-stage img { position: absolute; left: 50%; top: 50%; max-width: none; transform-origin: center; opacity: 0; transition: opacity .2s; pointer-events: none; }
.crop-stage.ready img { opacity: 1; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; pointer-events: none; box-shadow: 0 0 0 999px rgba(5,7,11,.62), inset 0 0 0 2px rgba(0,255,255,.75), 0 0 18px rgba(0,255,255,.35); }
.crop-zoom { display: flex; align-items: center; gap: 10px; width: min(100%, 320px); margin: 0 auto; color: var(--muted); }
.crop-zoom input { flex: 1; accent-color: var(--brand, #0066FF); }

/* ===== Card payment page (test mode) ===== */
.pay-wrap { max-width: 520px; padding-top: 12px; }
.test-banner { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: rgba(255,176,32,.1); color: #FFC25C; box-shadow: inset 0 0 0 1px rgba(255,176,32,.35); margin-bottom: 14px; }
.test-banner .grow { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.test-banner .tiny { color: #E9D3A6; line-height: 1.6; }
.pay-sum { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.pay-amt { font-size: 24px; font-weight: 800; }
.card-preview { position: relative; aspect-ratio: 1.586; max-width: 340px; margin: 0 auto 20px; border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; justify-content: space-between; color: #fff; overflow: hidden;
  background: radial-gradient(120% 120% at 100% 0%, rgba(0,255,255,.35), transparent 55%), linear-gradient(135deg, #0B2A6B, #0066FF 60%, #00A3FF);
  box-shadow: 0 18px 40px rgba(0,102,255,.35), inset 0 0 0 1px rgba(255,255,255,.18); transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.card-preview[data-brand="mastercard"] { background: radial-gradient(120% 120% at 100% 0%, rgba(255,170,0,.35), transparent 55%), linear-gradient(135deg, #1B1B2F, #3A2A5E 60%, #6B2F4F); }
.card-preview.flip { transform: perspective(800px) rotateY(10deg) scale(.98); }
.cp-top { display: flex; justify-content: space-between; align-items: center; direction: ltr; }
.cp-chip { width: 42px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #F7D774, #C9A23A); box-shadow: inset 0 0 0 1px rgba(0,0,0,.2); }
.cp-brand img { height: 30px; background: #fff; border-radius: 6px; padding: 3px 6px; }
.cp-num { font-size: clamp(17px, 5.4vw, 22px); letter-spacing: 2px; font-variant-numeric: tabular-nums; font-weight: 600; text-shadow: 0 2px 8px rgba(0,0,0,.3); white-space: nowrap; }
.cp-bot { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; letter-spacing: 1px; opacity: .92; }
.cp-bot span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-in { position: relative; }
.cc-in .input { padding-inline-end: 64px; letter-spacing: 1px; font-variant-numeric: tabular-nums; width: 100%; }
.cc-logo { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); display: flex; }
.cc-logo img { height: 24px; background: #fff; border-radius: 5px; padding: 2px 5px; }
.pay-form .pay-2 { grid-template-columns: 1fr 1fr; }
.pay-logos { display: flex; justify-content: center; gap: 10px; }
.pay-logos img { height: 28px; background: #fff; border-radius: 6px; padding: 3px 7px; }
.spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Product buy bar: "Buy now" is the main action (bright neon cyan), "Add to cart" stays blue ===== */
.buybar { background: #0A0C11; box-shadow: 0 -10px 28px rgba(0,0,0,.45); }
.btn.buy-now { background: linear-gradient(135deg, #3DF5FF, #00B8FF); color: #03121F; font-weight: 800; border: 0;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 6px 26px rgba(0,229,255,.45); gap: 6px; }
.btn.buy-now:hover { filter: brightness(1.06); }
.btn.buy-now:active { transform: scale(.97); }
.btn.buy-now svg { width: 16px; height: 16px; }
.btn.buy-now .bn-price { font-weight: 700; opacity: .75; white-space: nowrap; }
.btn.buy-now:disabled, .btn.buy-now.is-disabled { filter: grayscale(.7); opacity: .5; }
.buybar .btn { min-width: 0; }
@media (max-width: 419px) { .btn.buy-now svg { display: none; } .buybar .btn { padding-inline: 14px; } }
@media (max-width: 399px) { .btn.buy-now .bn-price { display: none; } }
@media (max-width: 359px) { .buybar .btn { font-size: 14px; } }

/* ===== Payment result animation v3 (nijeeb-payment-v3.html), colours from the site ===== */
.nj-pay { --nj-success: var(--ok); --nj-fail: var(--danger); width: min(300px, 78vw); margin-inline: auto; text-align: center; }
.nj-pay svg { width: 100%; height: auto; overflow: visible; display: block; }
.nj-pay .msg { margin-top: 6px; font-size: 21px; font-weight: 800; opacity: 0; transform: translateY(8px); }
.nj-pay .sub { margin-top: 4px; font-size: 14px; color: var(--muted); opacity: 0; transform: translateY(8px); }
.nj-pay .nj-overlay { fill: var(--nj-success); }
.nj-glow{transform-box:fill-box;transform-origin:center;transform:scale(0);opacity:0}
.nj-icon{transform-box:fill-box;transform-origin:50% 100%;transform:scale(0)}
.nj-n{stroke-dasharray:250 250;stroke-dashoffset:250}
.nj-handle{stroke-dasharray:65;stroke-dashoffset:65;transform-box:fill-box;transform-origin:50% 100%}
.nj-overlay{opacity:0}
.nj-ring{opacity:0;transform-box:fill-box;transform-origin:center}
.nj-confetti *{opacity:0;transform-box:fill-box;transform-origin:center}
.nj-pay.play .nj-glow{animation:nj-glow-in .7s cubic-bezier(.34,1.4,.64,1) forwards, nj-breathe 1.6s .7s ease-in-out infinite alternate}
.nj-pay.play .nj-icon{animation:nj-pop .55s .1s cubic-bezier(.34,1.6,.64,1) forwards}
.nj-pay.play .nj-n{animation:nj-draw .5s .4s ease-out forwards}
.nj-pay.play .nj-handle{animation:nj-draw .3s .85s ease-out forwards, nj-think .4s 1.15s ease-in-out 2 alternate}
.nj-pay.play .msg{animation:nj-text .4s 2.5s forwards}
.nj-pay.play .sub{animation:nj-text .4s 2.65s forwards}
.nj-pay.play.success .nj-handle{animation:nj-draw .3s .85s ease-out forwards, nj-think .4s 1.15s ease-in-out 2 alternate, nj-lift .45s 1.95s cubic-bezier(.3,0,.2,1) forwards}
.nj-pay.play.success .nj-icon{animation:nj-pop .55s .1s cubic-bezier(.34,1.6,.64,1) forwards, nj-squash .55s 1.95s ease-out}
.nj-pay.play.success .nj-overlay{animation:nj-fade .3s 2.15s forwards}
.nj-pay.play.success .nj-glow{animation:nj-glow-in .7s cubic-bezier(.34,1.4,.64,1) forwards, nj-flare 1s 2.15s ease-out forwards}
.nj-pay.play.success .nj-ring{animation:nj-ring 1s 2.25s ease-out}
.nj-pay.play.success .nj-confetti *{animation:nj-confetti .95s 2.3s cubic-bezier(.2,.7,.4,1) forwards}
.nj-pay.play.fail .nj-handle{animation:nj-draw .3s .85s ease-out forwards, nj-think .4s 1.15s ease-in-out 2 alternate, nj-fall .55s 1.95s cubic-bezier(.55,0,1,.45) forwards}
.nj-pay.play.fail .nj-overlay{animation:nj-fade .3s 2.25s forwards}
.nj-pay.play.fail .nj-glow{animation:nj-glow-in .7s cubic-bezier(.34,1.4,.64,1) forwards, nj-dim .6s 2.2s ease-out forwards}
.nj-pay.play.fail .nj-icon{animation:nj-pop .55s .1s cubic-bezier(.34,1.6,.64,1) forwards, nj-shake .45s 2.75s ease-in-out}
.nj-pay.success .nj-overlay{fill:var(--nj-success)}
.nj-pay.success .nj-ring{stroke:var(--nj-success)}
.nj-pay.success .msg{color:var(--nj-success)}
.nj-pay.fail .nj-overlay{fill:var(--nj-fail)}
.nj-pay.fail .msg{color:var(--nj-fail)}
@keyframes nj-pop{to{transform:scale(1)}}
@keyframes nj-draw{to{stroke-dashoffset:0}}
@keyframes nj-glow-in{to{transform:scale(1);opacity:1}}
@keyframes nj-breathe{to{scale:1.06}}
@keyframes nj-flare{0%{scale:1}35%{scale:1.22;filter:brightness(1.15)}100%{scale:1.08}}
@keyframes nj-dim{to{opacity:.35;scale:.92}}
@keyframes nj-think{to{translate:0 -6px;filter:drop-shadow(0 0 6px #7DF9FF)}}
@keyframes nj-lift{0%{translate:0 0}50%{translate:0 -24px;opacity:1}100%{translate:0 -36px;transform:scale(1.4);opacity:0}}
@keyframes nj-fall{0%{translate:0 0;transform:rotate(0)}100%{translate:0 70px;transform:rotate(35deg);opacity:0}}
@keyframes nj-squash{0%{scale:1 1}25%{scale:1.09 .88}55%{scale:.95 1.07}80%{scale:1.02 .98}100%{scale:1 1}}
@keyframes nj-fade{to{opacity:1}}
@keyframes nj-text{to{opacity:1;transform:translateY(0)}}
@keyframes nj-ring{0%{opacity:.7;transform:scale(1)}100%{opacity:0;transform:scale(1.35)}}
@keyframes nj-shake{0%,100%{translate:0}20%{translate:-9px}40%{translate:9px}60%{translate:-6px}80%{translate:6px}}
@keyframes nj-confetti{0%{opacity:1;transform:translate(0,0) scale(.4) rotate(0)}80%{opacity:1}100%{opacity:0;transform:translate(var(--dx),var(--dy)) scale(1) rotate(var(--r))}}
@media (prefers-reduced-motion:reduce){
  .nj-pay *{animation-duration:.01s!important;animation-delay:0s!important;animation-iteration-count:1!important}
}
.pr-wrap { max-width: 480px; padding-top: 24px; padding-bottom: 40px; }
.pr-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; opacity: 0; transform: translateY(8px); animation: nj-text .4s 2.9s forwards; }
@media (prefers-reduced-motion: reduce) { .pr-actions { animation-duration: .01s; animation-delay: 0s; } }

/* swap (owner's choice): "Buy now" = electric blue with the travelling neon star; "Add to cart" = neon cyan */
.btn.buy-now { background: var(--brand); color: #fff; box-shadow: 0 6px 24px rgba(0,102,255,.4); font-weight: 800; }
.btn.cart-cyan { background: linear-gradient(135deg, #3DF5FF, #00B8FF); color: #03121F; font-weight: 800; border: 0; gap: 6px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 6px 26px rgba(0,229,255,.4); }
.btn.cart-cyan:hover { filter: brightness(1.06); }
.btn.cart-cyan:active { transform: scale(.97); }
.btn.cart-cyan.is-disabled { filter: grayscale(.7); opacity: .5; }
.btn.buy-now .bn-price { opacity: .8; }
/* "Add to cart" softer: dark with a cyan outline, so "Buy now" leads */
.btn.cart-cyan { background: rgba(0,229,255,.06); color: #7DF9FF; box-shadow: inset 0 0 0 1.5px rgba(0,229,255,.65), 0 0 18px rgba(0,229,255,.12); }
.btn.cart-cyan:hover { background: rgba(0,229,255,.12); filter: none; }

/* ===== Product videos ===== */
.vid-wrap { position: absolute; inset: 0; display: grid; place-items: center; background: #000; }
.vid-wrap video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.vid-wrap.vid-missing::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.vid-badge { position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.55); color: #fff; box-shadow: 0 0 0 2px rgba(255,255,255,.7), 0 0 14px rgba(0,229,255,.5); pointer-events: none; }
.vid-badge svg { width: 14px; height: 14px; margin-inline-start: 2px; }
[dir="rtl"] .vid-badge svg { transform: none; }
.thumbs button { position: relative; }
.vid-slot img { width: 100%; height: 100%; object-fit: cover; }
.photo-add.busy { pointer-events: none; opacity: .8; gap: 8px; }
.card-vid { position: absolute; bottom: 10px; inset-inline-start: 10px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; box-shadow: 0 0 0 1.5px rgba(255,255,255,.55); z-index: 2; pointer-events: none; }
.card-vid svg { width: 12px; height: 12px; margin-inline-start: 1px; }
/* Arabic wordmark in the header */
.logo .logo-ar { width: auto; height: 38px; color: #fff; display: block; }
@media (min-width: 1024px) { .logo .logo-ar { height: 44px; } }
/* Arabic wordmark animation (intro once per visit) */
/* Arabic logo animation: opacity + stroke only (no masks, no transforms on SVG parts) so it renders the same on every phone */
.logo-ar .ar-run path { stroke-dasharray: .1 1.2; stroke-dashoffset: .1; opacity: 0; animation: arRun 6s linear infinite; }
.logo-ar .ar-run path:nth-child(2) { animation-delay: .25s; } .logo-ar .ar-run path:nth-child(3) { animation-delay: .4s; }
@keyframes arRun { 0%, 55% { stroke-dashoffset: .1; opacity: 0; } 57% { opacity: .95; } 78% { opacity: .95; } 80%, 100% { stroke-dashoffset: -1.1; opacity: 0; } }
.logo-ar.intro .ar-solid path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: arDraw .8s cubic-bezier(.6,.1,.3,1) forwards; }
.logo-ar.intro .ar-solid path:nth-child(2) { animation-delay: .35s; }
.logo-ar.intro .ar-solid path:nth-child(3) { animation-delay: .55s; }
@keyframes arDraw { to { stroke-dashoffset: 0; } }
.logo-ar.intro .ar-dots circle { opacity: 0; animation: arFade .35s ease-out forwards; }
.logo-ar.intro .ar-dots circle:nth-child(1) { animation-delay: .9s; } .logo-ar.intro .ar-dots circle:nth-child(2) { animation-delay: 1s; }
.logo-ar.intro .ar-dots circle:nth-child(3) { animation-delay: 1.08s; } .logo-ar.intro .ar-dots circle:nth-child(4) { animation-delay: 1.18s; }
.logo-ar.intro .ar-dot { opacity: 0; animation: arFade .5s 1.35s ease-out forwards; }
@keyframes arFade { to { opacity: 1; } }
.logo-ar .ar-halo { animation: arGlow 3.2s ease-in-out infinite; }
@keyframes arGlow { 0%, 100% { opacity: .18; } 50% { opacity: .5; } }
@media (prefers-reduced-motion: reduce) { .logo-ar * { animation: none !important; } }

/* ===== Layout guards (audit) ===== */
html { overflow-x: clip; }
/* long words (product names, emails, numbers) break instead of spilling out of their box */
body { overflow-wrap: break-word; }
.row > .grow, .row > .stack, .stack > * { min-width: 0; }
.section-head > .link-btn, .section-head > a { flex: none; white-space: nowrap; }
.section-head > :first-child { min-width: 0; }
.pack-card .stack { min-width: 0; gap: 6px !important; }
.pack-card b { line-height: 1.35; }
.pack-card .db-pill { align-self: flex-start; white-space: nowrap; max-width: 100%; }
.pack-card .pk-thumbs .media { width: 52px !important; height: 52px; flex: none; }
@media (max-width: 380px) { .pack-card { gap: 10px; padding: 10px; } .pack-card .pk-thumbs .media { width: 42px !important; height: 42px; } .pack-card .pk-thumbs .media + .media { margin-inline-start: -16px; } }

/* ===== Personal data consent box ===== */
.consent-wrap { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.consent { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--line); cursor: pointer; font-size: 13px; line-height: 1.6; color: var(--text-2, var(--muted)); text-align: start; }
.consent input { flex: none; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--brand); cursor: pointer; }
.consent span { min-width: 0; overflow-wrap: anywhere; }
.consent a { color: #7DF9FF; text-decoration: underline; text-underline-offset: 3px; }
.consent-wrap.invalid .consent { box-shadow: inset 0 0 0 1.5px var(--danger); }

/* ===== Horizontal rows + ready packs: nothing cut on phone, iPad or laptop ===== */
.container { --pad: 20px; }
@media (min-width: 1024px) { .container { --pad: 32px; } }
/* rows bleed to the screen edge by exactly the page padding, so the first card lines up with the page and is never cut */
.h-row, .offer-row { margin-inline: calc(-1 * var(--pad, 20px)); padding-inline: var(--pad, 20px); scroll-padding-inline: var(--pad, 20px); padding-top: 6px; margin-top: -6px; }
@media (min-width: 720px) { .h-row, .offer-row { margin-inline: calc(-1 * var(--pad, 20px)); padding-inline: var(--pad, 20px); scroll-padding-inline: var(--pad, 20px); } }
/* pack pictures: every product shows whole (no cropped phones / cables) */
.offer-media { aspect-ratio: 1; }
.offer-media.n3 { grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; }
.offer-media.n3 > div:first-child { grid-row: span 2; }
.offer-media.n2 > div img, .offer-media.n2 > div svg, .offer-media.n3 > div:first-child img, .offer-media.n3 > div:first-child svg { object-fit: contain; }
.offer-card { width: min(78%, 300px); }
.offer-body .name, .offer-body .muted { overflow-wrap: anywhere; }
/* tablet: two and a half cards so it is clear the row scrolls */
@media (min-width: 600px) { .offer-card { width: 280px; } }
/* laptop / desktop: a tidy grid, no sideways scrolling at all */
@media (min-width: 1024px) {
  .offer-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; }
  .offer-row .offer-card { width: auto; max-width: none; }
  .offer-row > .offer-card:nth-child(n+5) { display: none; } /* home shows 4; the rest are in "See all" */
}
/* iPad + laptop: product rows and pack rows become clean grids (no half-cut cards at the edges).
   Phones keep the swipe rows. Extra items stay one tap away in "See all". */
@media (min-width: 600px) {
  .h-row, .offer-row { display: grid; overflow: visible; margin-inline: 0; padding-inline: 0; margin-top: 0; padding-top: 0; scroll-snap-type: none; gap: 14px; }
  .h-row > .p-card, .offer-row > .offer-card { width: auto !important; max-width: none; min-width: 0; }
  .h-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .h-row > :nth-child(n+9) { display: none; }
  .offer-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .offer-row > .offer-card:nth-child(n+4) { display: none; }
}
@media (min-width: 1024px) {
  .h-row { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
  .h-row > :nth-child(n+6) { display: none; }
  .offer-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .offer-row > .offer-card:nth-child(4) { display: flex; }
}
@media (min-width: 1180px) {
  .h-row { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .h-row > :nth-child(6) { display: flex; }
}
/* Home hero: coupon tickets always fit side by side (no sideways scroll, nothing hidden behind the deal card) */
.ph-tickets, .ph-tickets[style] { display: grid; grid-auto-flow: row; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; scroll-snap-type: none; gap: 8px; }
.ph-tickets .ticket { min-width: 0; padding: 10px 6px; }
.ph-tickets .ticket b { font-size: 15px; line-height: 1.3; }
.ph-tickets .ticket .tiny { font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.ph-tickets .ticket .code { font-size: 11px; white-space: nowrap; }
.ph-tickets .ticket + .ticket::before { inset-inline-start: -5px; }
@media (max-width: 380px) { .ph-tickets .ticket .code > span:first-child { display: none; } .ph-tickets .ticket b { font-size: 14px; } }
.ph-price { white-space: nowrap; }
/* tickets and the best-deal card side by side only when there is real room */
@media (min-width: 760px) { .ph-row { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 1280px) { .ph-row { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); } }
/* trust chips: wrap onto a second line instead of running off the screen */
.trust-strip { flex-wrap: wrap; overflow: visible; }
/* category bar and the moving "trending" belt: soft fade at the edges instead of a hard cut */
/* edge fades for sideways rows (classes set by app.js only when the row overflows) */
.fade-s, .fade-e { --fs: 0px; --fe: 0px; -webkit-mask-image: linear-gradient(to left, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%); mask-image: linear-gradient(to left, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%); }
.fade-s { --fs: 32px; } .fade-e { --fe: 32px; } .fade-s.fade-e { --fs: 32px; --fe: 32px; }
[dir="ltr"] .fade-s, [dir="ltr"] .fade-e { -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%); mask-image: linear-gradient(to right, transparent 0, #000 var(--fs), #000 calc(100% - var(--fe)), transparent 100%); }

/* ===== Banners slider (control panel → Store front → Banners) ===== */
.bn-wrap { position: relative; margin-top: 14px; }
.bn-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; border-radius: var(--r-lg); }
.bn-track::-webkit-scrollbar { display: none; }
.bn-track > .bn-slide { flex: 0 0 100%; scroll-snap-align: start; margin-top: 0; background: var(--bn, #0050E6); }
.bn-track > .bn-slide:not(:has(img))::after { background: radial-gradient(120% 120% at 100% 0%, rgba(255,255,255,.18), transparent 60%), linear-gradient(to top, rgba(5,7,12,.45), transparent 70%); }
.bn-dots { position: absolute; bottom: 12px; inset-inline-end: 16px; display: flex; gap: 6px; }
.bn-dots button { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.5); cursor: pointer; transition: width .3s var(--ease), background-color .3s; }
.bn-dots button[aria-selected="true"] { width: 22px; background: #fff; }
.bn-dots button::before { content: ''; position: absolute; inset: -10px -4px; } /* bigger tap area */
.bn-dots button { position: relative; }
.sh-title, .sh-sub { overflow-wrap: anywhere; }
/* Announcement bar (control panel → Store front) */
.announce { background: var(--an-bg); color: var(--an-fg); font-size: 13px; font-weight: 600; text-align: center; }
.announce a, .announce p { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; margin: 0; padding: 6px 16px; color: inherit; text-decoration: none; }
.announce span { overflow-wrap: anywhere; line-height: 1.5; }
.announce svg { flex: none; }
.co-note { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: 12px; background: rgba(0,102,255,.08); color: var(--text-2, #C9D4E8); line-height: 1.6; }
.co-note.warn { background: rgba(255,170,0,.1); color: var(--warn); }
.co-note svg { flex: none; margin-top: 3px; }
.co-note span { min-width: 0; overflow-wrap: anywhere; }
.sf-tag { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.bank-details { white-space: pre-line; }

/* ---------- Demo bar (fixed on top while orders are closed — see ORDERS_OPEN in js/data.js) ---------- */
:root { --demo-h: 0px; }
body:has(> .demo-bar:not([hidden])) { --demo-h: 34px; padding-top: var(--demo-h); }
.demo-bar { position: fixed; top: 0; inset-inline: 0; z-index: 40; height: var(--demo-h); display: flex; align-items: center; justify-content: center; padding: 0 12px;
  background: #F5B301; color: #111; font-size: 13px; font-weight: 700; text-align: center; line-height: 1.2; }
.demo-bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-bar[hidden] { display: none; }
