/* aliexpress-isr.com design system. Source of truth: DESIGN.md (stacked logo, red/ink, Rubik, bag/check/rule motion).
   Every page loads this file; page files only add what is unique to that page. */

/* ── Tokens ─────────────────────────────────────────────────────── */
:root {
    --red: #E62E2D;
    --red-press: #C9221F;
    --red-hover: #B81D1A;
    --ink: #18181B;
    --fg: #18181B;
    --soft: #66646A;
    --bg: #F5F3EF;
    --panel: #FFFFFF;
    --stage: #EFEBE4;
    --rule: #E4DFD6;
    --ok: #167A4A;
    --ok-bg: #E5F3EB;
    --bad: #A61B19;
    --bad-bg: #FDECEC;
    --yel: #FFE14D;
    --ink-surface: #18181B; /* toast, answer box, ink faces, footer: lifted in dark mode */
    --tray: #F3F3F2; /* product photo tray; stays light in dark mode so white-background photos blend */
    --on-red: #FFFFFF;
    --price: var(--red-press); /* price text; lifted in dark mode */
    --link-strong: var(--red-press);
    --font: Rubik, 'Arial Hebrew', Arial, sans-serif;
    --r-card: 12px; --r-btn: 14px; --r-panel: 20px; --r-pill: 999px;
    --wrap: 1200px; --gutter: 16px; --header-h: 64px;
    --shadow: 0 10px 28px -18px rgba(24, 24, 27, .45);
    --shadow-lift: 0 16px 34px -20px rgba(24, 24, 27, .55);
    --d-xs: 120ms; --d-s: 200ms; --d-m: 320ms; --d-l: 640ms;
    --e-out: cubic-bezier(.2, .8, .2, 1); --e-pop: cubic-bezier(.34, 1.56, .64, 1); --e-io: cubic-bezier(.65, 0, .35, 1);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --fg: #F2F1EE; --soft: #A3A1A8; --bg: #111113; --panel: #1A1A1E; --stage: #232328; --rule: #2F2F35;
        --ok: #4CC48A; --ok-bg: #173326; --bad: #FF8A87; --bad-bg: #3A1716; --ink-surface: #26262C;
        --price: #FF6A67; --link-strong: #FF7A77;
        --shadow: 0 10px 28px -18px rgba(0, 0, 0, .8); --shadow-lift: 0 16px 34px -20px rgba(0, 0, 0, .9);
        color-scheme: dark;
    }
}
@media (min-width: 768px) { :root { --gutter: 24px; --header-h: 72px; } }

/* ── Base and browser surfaces ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 12px); }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--font); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; caret-color: var(--red); }
img, svg, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-color: currentColor; }
::selection { background: var(--red); color: var(--on-red); }
:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; font-weight: 800; text-wrap: balance; letter-spacing: -.01em; }
p { margin: 0; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
html { scrollbar-color: color-mix(in srgb, var(--soft) 55%, transparent) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--soft) 45%, transparent); border-radius: 10px; border: 3px solid var(--bg); }
.tabular, .price, bdi.num { font-variant-numeric: tabular-nums; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 22px; height: 22px; flex: none; }
.i--sm { width: 18px; height: 18px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap--read { max-width: calc(720px + 2 * var(--gutter)); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-weight: 600; text-decoration: none; transition: top var(--d-s) var(--e-out); }
.skip:focus { top: 10px; }
main { display: block; min-height: 50vh; }
[hidden] { display: none !important; }

/* ── The brand bag (inline SVG partial) ─────────────────────────── */
.bag { display: block; overflow: visible; }
.bag .bh { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; transition: transform var(--d-s) var(--e-out); }
.bag .bb { fill: currentColor; transition: fill var(--d-s) var(--e-out), stroke var(--d-s); }
.bag .bc { fill: none; stroke: var(--knock, #fff); stroke-width: 7.5; stroke-linecap: round; stroke-linejoin: round; }

/* ── Header (progress rule = its bottom border) ─────────────────── */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--panel); }
.site-header::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 2px; background: color-mix(in srgb, var(--red) 18%, transparent); }
.site-header__rule { position: absolute; inset-inline: 0; bottom: 0; height: 2px; z-index: 1; pointer-events: none; }
.site-header__rule i { display: block; height: 100%; width: 0; background: var(--red); margin-inline-start: 0; }
.site-header__rule.go i { width: 82%; transition: width 2.2s cubic-bezier(.1, .7, .2, 1); }
.site-header__rule.done i { width: 100%; opacity: 0; transition: width var(--d-s) var(--e-out), opacity 300ms 220ms; }
.site-header__bar { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.site-logo { flex: none; display: block; line-height: 0; border-radius: 8px; padding-block: 6px; }
.site-logo img { width: 128px; height: auto; }
@media (min-width: 768px) { .site-logo img { width: 148px; } }
.site-nav { display: none; align-items: center; gap: 2px; margin-inline-start: 8px; }
.site-nav a { text-decoration: none; padding: 8px 12px; border-radius: 10px; font-weight: 500; color: var(--soft); white-space: nowrap; transition: background var(--d-s), color var(--d-s); }
.site-nav a:hover { color: var(--fg); background: var(--stage); }
.site-nav a[aria-current="page"] { color: var(--fg); font-weight: 600; box-shadow: inset 0 -2px 0 var(--red); border-radius: 0; }
@media (min-width: 1024px) { .site-nav { display: flex; } }
.site-search { margin-inline-start: auto; position: relative; display: none; }
.site-search input { width: 260px; height: 42px; border: 1.5px solid var(--rule); background: var(--bg); border-radius: var(--r-pill); padding: 0 42px 0 16px; transition: border-color var(--d-s), width var(--d-m) var(--e-out); }
.site-search input::placeholder { color: var(--soft); }
.site-search input:focus { outline: none; border-color: var(--fg); background: var(--panel); }
.site-search:focus-within input { box-shadow: 0 0 0 2.5px var(--red); }
.site-search .i { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
@media (min-width: 768px) { .site-search { display: block; } }
@media (min-width: 1280px) { .site-search input { width: 300px; } }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; border: 0; background: transparent; color: var(--fg); position: relative; transition: background var(--d-s); text-decoration: none; }
.icon-btn:hover { background: var(--stage); }
.site-header__tools { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
@media (min-width: 768px) { .site-header__tools { margin-inline-start: 4px; } .js-search-open { display: none; } }
@media (min-width: 1024px) { .js-menu-open { display: none; } }
.saved-btn .bag { width: 20px; color: var(--fg); --knock: var(--panel); }
.saved-btn .bb { fill: none; stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }
.saved-btn.has .bb { fill: currentColor; stroke: none; }
.saved-btn__n { position: absolute; top: 4px; inset-inline-end: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.saved-btn__n:empty { display: none; }
.bump { animation: bump 380ms var(--e-pop); }
@keyframes bump { 40% { transform: scale(1.35); } }
/* Mobile search row and menu panel */
.site-header__search-row { display: none; padding: 0 var(--gutter) 12px; }
.site-header.search-open .site-header__search-row { display: block; }
.site-header__search-row .site-search { display: block; margin: 0; }
.site-header__search-row .site-search input { width: 100%; }
.site-menu { display: none; border-top: 1px solid var(--rule); padding: 8px var(--gutter) 16px; background: var(--panel); }
.site-header.menu-open .site-menu { display: grid; }
.site-menu a { display: flex; align-items: center; gap: 12px; padding: 13px 4px; text-decoration: none; font-weight: 600; font-size: 1.05rem; border-bottom: 1px solid var(--rule); }
.site-menu a .i { color: var(--soft); }
.site-menu a:last-child { border-bottom: 0; }

/* ── Saved drawer ───────────────────────────────────────────────── */
.drawer { position: fixed; inset: 0; z-index: 60; display: none; }
.drawer.open { display: block; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(17, 17, 19, .45); opacity: 0; transition: opacity var(--d-m); }
.drawer.open .drawer__scrim { opacity: 1; }
.drawer__panel { position: absolute; inset-block: 0; inset-inline-end: 0; width: min(420px, 100%); background: var(--panel); display: flex; flex-direction: column; transform: translateX(100%); transition: transform var(--d-m) var(--e-out); box-shadow: var(--shadow-lift); }
[dir="rtl"] .drawer__panel { transform: translateX(-100%); }
.drawer.open .drawer__panel, [dir="rtl"] .drawer.open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--rule); }
.drawer__head h2 { font-size: 1.15rem; }
.drawer__body { overflow-y: auto; padding: 12px 16px 24px; display: grid; gap: 10px; align-content: start; }
.saved-item { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 12px; align-items: center; background: var(--bg); border-radius: var(--r-card); padding: 8px; }
.saved-item img { width: 64px; height: 64px; object-fit: contain; border-radius: 9px; background: var(--tray); mix-blend-mode: multiply; padding: 4px; }
.saved-item a:not(.btn) { unicode-bidi: plaintext; font-weight: 500; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.saved-item .price { color: var(--price); font-weight: 800; }

/* ── Buttons, chips, links ─────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: var(--r-btn); border: 1.5px solid var(--fg); background: transparent; color: var(--fg); font-weight: 700; font-size: 1rem; line-height: 1.2; text-decoration: none; transition: transform var(--d-xs) var(--e-out), background var(--d-s), color var(--d-s), border-color var(--d-s); -webkit-tap-highlight-color: transparent; }
.btn:hover { background: var(--stage); }
.btn:active { transform: scale(.97); }
.btn--primary { background: var(--red-press); border-color: var(--red-press); color: #fff; --knock: var(--red-press); }
.btn--primary:hover { background: var(--red-hover); border-color: var(--red-hover); --knock: var(--red-hover); }
.btn--pill { border-radius: var(--r-pill); }
.btn--sm { min-height: 40px; padding: 7px 14px; font-size: .9rem; border-radius: 11px; }
.btn--block { width: 100%; }
.btn .bag { width: 17px; }
.btn--buy:hover .bh { transform: translateY(-6px); }
.btn--buy.wait .bag { transform-origin: 50% 10%; animation: swing 700ms var(--e-io) infinite alternate; }
@keyframes swing { from { transform: rotate(-13deg); } to { transform: rotate(13deg); } }
.link-more { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; font-weight: 600; color: var(--link-strong); text-decoration: none; white-space: nowrap; }
.link-more:hover { text-decoration: underline; }
.link-more .i { width: 18px; height: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-block: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 7px 14px; border-radius: var(--r-pill); background: var(--stage); color: var(--fg); border: 0; font-weight: 500; font-size: .92rem; text-decoration: none; white-space: nowrap; transition: background var(--d-s), color var(--d-s); }
.chip:hover { background: color-mix(in srgb, var(--stage) 70%, var(--fg) 10%); }
.chip[aria-pressed="true"], .chip[aria-current="page"], .chip.is-on { background: var(--ink); color: #fff; }
@media (prefers-color-scheme: dark) { .chip[aria-pressed="true"], .chip[aria-current="page"], .chip.is-on { background: #F2F1EE; color: #111113; } }
.pill { display: inline-flex; align-items: center; gap: 5px; border-radius: var(--r-pill); padding: 3px 10px; font-size: .8rem; font-weight: 600; background: var(--stage); color: var(--fg); white-space: nowrap; }
.pill--ok { background: var(--ok-bg); color: var(--ok); }
.pill--red { background: var(--red-press); color: #fff; }

/* ── "Price checked" stamp: the check draws once when seen ──────── */
.stamp > span { white-space: normal; } /* a long stamp wraps inside the gutter instead of overflowing */
.stamp { display: inline-flex; align-items: center; gap: 6px; background: var(--ok-bg); color: var(--ok); border-radius: var(--r-pill); padding: 4px 11px 4px 10px; font-size: .85rem; font-weight: 600; white-space: nowrap;  max-width: 100%;}
.stamp svg { width: 14px; height: 14px; flex: none; }
.stamp path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .stamp:not(.drawn) path { stroke-dashoffset: 1; }
.stamp.drawn path { transition: stroke-dashoffset 420ms var(--e-out); stroke-dashoffset: 0; }

/* ── Page scaffolding ───────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 0; align-items: center; font-size: .85rem; color: var(--soft); margin: 0; padding: 0; list-style: none; }
.crumbs a { color: var(--soft); text-decoration: none; display: inline-block; padding-block: 12px; padding-inline: 6px; min-inline-size: 40px; text-align: center; }
.crumbs a:hover { color: var(--fg); text-decoration: underline; }
/* Current page: one line, clipped, and spaced like the links around the separators. */
.crumbs li:not(:has(a)) { padding-inline: 0 6px; }
@media (max-width: 767px) { .crumbs li:not(:has(a)) { max-inline-size: 24ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } }
.crumbs li + li::before { content: "/"; margin-inline-end: 0; color: color-mix(in srgb, var(--soft) 60%, transparent); }
.crumbs li:not(:has(a))::before { margin-inline-end: 6px; }
.page-head { padding-block: 24px 16px; display: grid; gap: 10px; }
.page-head h1 { font-size: clamp(1.7rem, 4.2vw, 2.6rem); }
.page-head .lede { color: var(--soft); font-size: 1.05rem; max-width: 62ch; }
.page-head__meta { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; color: var(--soft); font-size: .9rem; }
.section { padding-block: 22px; }
.section + .section { padding-top: 10px; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section__head h2 { font-size: clamp(1.25rem, 2.6vw, 1.6rem); }
.section__head p { color: var(--soft); margin-top: 4px; font-size: .95rem; }
.panel { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 20px; }
.note { background: var(--stage); border-radius: var(--r-card); padding: 12px 16px; font-size: .95rem; }
.muted { color: var(--soft); }

/* ── Grids and rails ───────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(158px, 44%); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scroll-padding-inline: var(--gutter); }
.rail > * { scroll-snap-align: start; }
@media (min-width: 640px) { .rail { grid-auto-columns: minmax(180px, 30%); } }
@media (min-width: 1024px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; } }

/* ── Deal card ─────────────────────────────────────────────────── */
.deal-card { position: relative; display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); overflow: hidden; transition: box-shadow var(--d-s) var(--e-out), transform var(--d-s) var(--e-out); min-width: 0; }
.deal-card:hover { box-shadow: var(--shadow); }
/* Product photos (mega-deals treatment): a light tray, white backgrounds vanish via multiply, the whole product shows. */
.deal-card__media { display: block; aspect-ratio: 1; background: var(--tray); overflow: hidden; padding: 8%; }
.deal-card__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; filter: brightness(1.05) contrast(1.02); transition: transform var(--d-m) var(--e-out); }
.deal-card:hover .deal-card__media img { transform: scale(1.03); }
.deal-card__media { position: relative; }
.deal-card__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--tray); opacity: 0; transition: opacity var(--d-m) var(--e-out); pointer-events: none; }
.deal-card__video.is-playing { opacity: 1; }
.deal-card__vid { position: absolute; inset-block-start: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 7px; border-radius: var(--r-pill); background: color-mix(in srgb, var(--ink) 72%, transparent); color: #fff; font-size: .75rem; font-weight: 500; line-height: 1.4; transition: opacity var(--d-s); }
.deal-card__vid svg { width: 11px; height: 11px; fill: currentColor; }
.deal-card__video.is-playing + .deal-card__vid { opacity: 0; }
.deal-card__body { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px 12px; flex: 1; }
.deal-card__category { font-size: .78rem; color: var(--soft); font-weight: 500; }
.deal-card__title { font-size: .95rem; font-weight: 500; line-height: 1.35; letter-spacing: 0; min-height: 2.7em; }
/* The clamp sits on the link with plaintext bidi, so an English title is cut at its own end, not its start. */
.deal-card__title a { text-decoration: none; unicode-bidi: plaintext; text-align: right; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.nw { white-space: nowrap; }
.deal-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.deal-card__price { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 2px; }
.deal-card__approx { color: var(--fg); font-weight: 700; font-size: 1.1rem; font-variant-numeric: tabular-nums; line-height: 1.25; }
.deal-card__vat { font-size: .78rem; color: var(--soft); }
.deal-card__now { color: var(--price); font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.deal-card__claim { font-size: .78rem; font-weight: 600; color: var(--ok); }
.deal-card__verified { font-size: .8rem; color: var(--soft); font-variant-numeric: tabular-nums; }
.deal-card__cta { position: relative; z-index: 1; margin-top: auto; }
.deal-card__actions { margin-top: auto; padding-top: 8px; position: relative; z-index: 1; }
.deal-card__actions .btn { white-space: nowrap; width: 100%; min-height: 42px; padding: 9px 12px; font-size: .92rem; border-radius: 11px; }
.save-btn { position: absolute; z-index: 2; top: 8px; inset-inline-end: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--panel) 92%, transparent); color: var(--fg); display: grid; place-items: center; box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .35); transition: transform var(--d-xs) var(--e-out); --knock: var(--red); }
.save-btn:active { transform: scale(.94); }
.save-btn .bag { width: 19px; }
.save-btn .bb { fill: transparent; stroke: currentColor; stroke-width: 7; stroke-linejoin: round; }
.save-btn .bc { stroke: #fff; stroke-dasharray: 1; stroke-dashoffset: 1; }
.save-btn:hover .bh { transform: translateY(-5px); }
.save-btn[aria-pressed="true"] { color: var(--red); }
.save-btn[aria-pressed="true"] .bb { fill: var(--red); stroke: var(--red); }
.save-btn[aria-pressed="true"] .bc { stroke-dashoffset: 0; transition: stroke-dashoffset 300ms var(--e-out) 140ms; }
.save-btn.pop .bag { animation: pop 420ms var(--e-pop); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(.8); } 70% { transform: scale(1.16); } 100% { transform: scale(1); } }

/* Skeleton card (lightest loader that keeps the layout) */
.skeleton { background: linear-gradient(90deg, var(--stage) 30%, color-mix(in srgb, var(--stage) 55%, var(--panel)) 50%, var(--stage) 70%); background-size: 300% 100%; animation: shim 1.3s linear infinite; border-radius: 6px; }
@keyframes shim { from { background-position: 0 0; } to { background-position: 150% 0; } }

/* ── Stories ───────────────────────────────────────────────────── */
.stories { display: flex; gap: 14px; overflow-x: auto; scrollbar-width: none; padding: 12px var(--gutter) 10px; margin-inline: calc(-1 * var(--gutter)); }
.stories::-webkit-scrollbar { display: none; }
.story { flex: none; width: 78px; display: grid; justify-items: center; gap: 6px; background: none; border: 0; padding: 0; color: var(--fg); text-align: center; }
.story__ring { position: relative; width: 66px; height: 66px; border-radius: 26%; padding: 2.5px; background: var(--red); display: block; transition: transform var(--d-s) var(--e-out); }
.story:hover .story__ring { transform: translateY(-2px); }
.story.seen .story__ring { background: var(--rule); }
.story__face { width: 100%; height: 100%; border-radius: 23%; border: 2.5px solid var(--panel); background: var(--stage) center / cover no-repeat; display: grid; place-items: center; overflow: hidden; }
.story__face--ink { background-color: var(--ink-surface); color: var(--yel); }
.story__face--red { background-color: var(--red-press); color: #fff; }
.story__face b { font-size: 1.05rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.story__label { font-size: .78rem; font-weight: 500; line-height: 1.2; max-width: 78px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: balance; }
.story.seen .story__label { color: var(--soft); }
.story-entry { display: inline-flex; align-items: center; gap: 8px; border-radius: var(--r-pill); background: var(--panel); border: 1px solid var(--rule); padding: 5px 14px 5px 6px; font-weight: 600; font-size: .9rem; color: var(--fg); box-shadow: 0 4px 14px -10px rgba(0, 0, 0, .4); }
.story-entry__ring { width: 28px; height: 28px; border-radius: 26%; padding: 2px; background: var(--red); display: block; }
.story-entry__ring i.is-ink { background: var(--ink-surface); color: #fff; display: grid; place-items: center; --knock: var(--ink-surface); }
.story-entry__ring i.is-ink .bag { width: 11px; }
.story-entry__ring i { display: block; width: 100%; height: 100%; border-radius: 23%; border: 2px solid var(--panel); background: var(--stage) center / cover; }
/* Viewer */
.sv { position: fixed; inset: 0; z-index: 80; background: rgba(10, 10, 12, .92); display: none; align-items: center; justify-content: center; }
.sv.open { display: flex; }
.sv__frame { position: relative; width: 100%; height: 100%; max-width: 440px; max-height: 100dvh; background: #000; color: #fff; overflow: hidden; touch-action: pan-y; user-select: none; }
@media (min-width: 640px) { .sv__frame { height: min(820px, 94dvh); border-radius: 18px; } }
.sv__bars { position: absolute; top: max(10px, env(safe-area-inset-top)); inset-inline: 10px; display: flex; gap: 4px; z-index: 3; direction: rtl; }
.sv__bars i { flex: 1; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, .35); overflow: hidden; position: relative; }
.sv__bars i b { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: right; }
.sv__bars i.done b { transform: none; }
.sv__top { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 12px); inset-inline: 10px; z-index: 3; display: flex; align-items: center; gap: 10px; }
.sv__av { width: 32px; height: 32px; border-radius: 26%; background: var(--red) url(/img/brand/icon.svg) center / cover no-repeat; border: 1.5px solid #fff; flex: none; } /* the brand tile until a story brings its own photo */
.sv__title { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.sv__title b { font-size: .95rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sv__title small { font-size: .78rem; opacity: .8; }
.sv__btn { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .25); color: #fff; display: grid; place-items: center; }
.sv__slide { position: absolute; inset: 0; background: #000 center / cover no-repeat; display: flex; flex-direction: column; justify-content: flex-end; }
.sv__slide::before { content: ""; position: absolute; inset: 0 0 auto; height: 110px; background: linear-gradient(to bottom, rgba(0, 0, 0, .55), transparent); }
.sv__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 30%; background: #000; } /* square clips sit above the price card */
.sv__slide--video .sv__card { z-index: 1; }
.sv__slide--video::before { z-index: 1; }
.sv__slide--ink { background-color: var(--ink); justify-content: center; }
.sv__slide--red { background-color: var(--red-press); justify-content: center; }
.sv__slide--ink::before, .sv__slide--red::before { display: none; }
.sv__card { position: relative; padding: 70px 18px max(20px, env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(0, 0, 0, .88) 55%, transparent); display: grid; gap: 8px; }
.sv__card small { opacity: .8; font-size: .82rem; }
.sv__card h3 { font-size: 1.2rem; font-weight: 700; line-height: 1.3; unicode-bidi: plaintext; }
.sv__price { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.9rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.sv__price s { font-size: 1.1rem; font-weight: 500; opacity: .7; }
.sv__acts { display: flex; gap: 8px; margin-top: 4px; }
.sv__acts .btn--primary { flex: 1; }
.sv__acts .btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.sv__acts .btn--ghost:hover { background: rgba(255, 255, 255, .12); }
.sv__fact { position: relative; padding: 0 26px; display: grid; gap: 14px; }
.sv__big { font-size: clamp(3.5rem, 18vw, 5.5rem); font-weight: 800; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.sv__slide--ink .sv__big { color: var(--yel); }
.sv__fact p { font-size: 1.15rem; line-height: 1.5; font-weight: 500; }
.sv__fact a { color: #fff; font-weight: 600; }
.sv__code { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; color: var(--ink); border-radius: 14px; padding: 12px 14px; font-weight: 800; font-size: 1.3rem; direction: ltr; letter-spacing: .04em; }
.sv__code button { border: 0; background: none; color: var(--red-press); font-weight: 700; font-size: .95rem; letter-spacing: 0; }
.sv__tap { position: absolute; top: 80px; bottom: 140px; width: 34%; z-index: 2; border: 0; background: transparent; }
.sv__tap--prev { right: 0; } .sv__tap--next { left: 0; }
.sv__end { position: relative; display: grid; justify-items: center; gap: 12px; text-align: center; padding: 0 26px; }
.sv__done { width: 64px; height: 64px; border-radius: 26%; background: var(--ok); display: grid; place-items: center; }
.sv__done svg { width: 32px; height: 32px; }
.sv__done path { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw var(--d-l) var(--e-out) 120ms forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ── Reading pages (guides, answers, blog) ─────────────────────── */
.prose { font-size: 1.08rem; line-height: 1.75; max-width: 34em; } /* ch is a Latin "0": Hebrew runs ~30% more letters per ch */
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-top: 1.8em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5em; font-weight: 700; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose a { color: var(--link-strong); text-decoration-color: color-mix(in srgb, var(--red-press) 40%, transparent); font-weight: 500; }
.prose img { border-radius: var(--r-card); }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; display: block; overflow-x: auto; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: start; vertical-align: top; }
.prose th { font-weight: 600; background: var(--stage); }
.prose blockquote { margin-inline: 0; padding: 4px 16px; border-inline-start: 1px solid var(--rule); color: var(--soft); }
.answer { background: var(--ink-surface); color: #F2F1EE; border: 1px solid color-mix(in srgb, var(--rule) 60%, transparent); border-radius: var(--r-panel); padding: 18px 20px; display: grid; gap: 6px; }
.answer h2, .answer strong:first-child { color: #fff; }
.answer__label { font-size: .85rem; font-weight: 700; color: var(--yel); }
.answer p { font-size: 1.08rem; line-height: 1.6; }
.answer small { color: #A3A1A8; font-size: .82rem; }
.answer small a { color: #F2F1EE; display: inline-block; padding: 10px 6px; margin-block: -10px; min-inline-size: 44px; }
.collection-list-head { display: block; margin-top: 8px; }
.collection-list-head p { max-width: 68ch; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fact { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 12px; display: grid; gap: 2px; text-align: center; }
.fact b { font-size: clamp(1.3rem, 4vw, 1.75rem); font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fact small { color: var(--soft); font-size: .82rem; }
.toc { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px 18px; }
.toc h2 { font-size: 1rem; margin-bottom: 8px; }
.toc ol { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 4px; }
.toc a { color: var(--fg); text-decoration: none; }
.toc a:hover { color: var(--red-press); text-decoration: underline; }
.faq { display: grid; gap: 8px; }
.faq details { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); }
.faq summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .i { transition: transform var(--d-s) var(--e-out); color: var(--soft); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq .faq__a { padding: 0 16px 16px; color: var(--fg); line-height: 1.7; }
.byline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; color: var(--soft); font-size: .9rem; }
.related { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.related:has(> :nth-child(3):last-child) { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.wrap--read .related { grid-template-columns: 1fr; } /* reading column: stacked rows, never an orphan */
.related a { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 14px 16px; font-weight: 600; text-decoration: none; transition: border-color var(--d-s); }
.related a:hover { border-color: var(--fg); }
.related a .i { color: var(--soft); flex: none; }

/* ── Tool (calculator), coupon ticket ──────────────────────────── */
.tool { background: var(--panel); border: 1.5px solid var(--fg); border-radius: var(--r-panel); padding: 16px 18px; display: grid; gap: 10px; }
.tool label { font-weight: 700; }
.tool input { width: 100%; height: 50px; border: 1.5px solid var(--rule); border-radius: 12px; padding: 0 14px; font-size: 1.25rem; font-weight: 700; direction: ltr; text-align: right; background: var(--bg); font-variant-numeric: tabular-nums; }
.tool input:focus { outline: none; border-color: var(--fg); }
.tool input:focus-visible { outline: 2.5px solid var(--red); outline-offset: 2px; }
.tool__out { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.tool__out:empty { display: none; }
.tool__out.ok { color: var(--ok); } .tool__out.bad { color: var(--bad); }
.ticket { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 16px 18px; }
.ticket::before, .ticket::after { content: ""; position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 1px solid var(--rule); transform: translateY(-50%); }
.ticket::before { right: -10px; clip-path: inset(0 50% 0 0); } .ticket::after { left: -10px; clip-path: inset(0 0 0 50%); }
.ticket__value { font-size: 1.5rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ticket__cond { color: var(--soft); font-size: .9rem; }
.ticket.best { border: 2px solid var(--fg); }
.code-btn { display: inline-flex; align-items: center; gap: 8px; border: 1.5px dashed var(--fg); background: transparent; border-radius: 11px; padding: 9px 14px; font-weight: 800; letter-spacing: .04em; direction: ltr; transition: background var(--d-s), color var(--d-s); white-space: nowrap; }
.code-btn svg { width: 16px; height: 16px; }
.code-btn .ck { display: none; }
.code-btn .ck path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.code-btn.ok { background: var(--fg); color: var(--panel); border-style: solid; }
.code-btn.ok .ck { display: block; }
.code-btn.ok .ck path { transition: stroke-dashoffset 280ms var(--e-out) 80ms; stroke-dashoffset: 0; }
.code-btn.ok .cp { display: none; }

/* ── Empty state / 404: the bag lying on its side ──────────────── */
.empty { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 40px 16px; }
.empty .bag { width: 72px; color: var(--fg); opacity: .85; transform-origin: 50% 100%; animation: tip 4.2s var(--e-io) infinite alternate; }
.empty .bb { fill: none; stroke: currentColor; stroke-width: 6; stroke-linejoin: round; }
.empty .bc { display: none; }
@keyframes tip { from { transform: rotate(-22deg); } to { transform: rotate(-14deg); } }
.empty h2, .empty h1 { font-size: 1.4rem; }
.empty p { color: var(--soft); max-width: 46ch; }

/* ── Toast ─────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translate(-50%, 150%); opacity: 0; z-index: 90; display: flex; align-items: center; gap: 10px; min-width: 220px; background: var(--ink-surface); border: 1px solid color-mix(in srgb, var(--rule) 50%, transparent); color: #fff; border-radius: 14px; padding: 9px 10px 9px 16px; font-weight: 500; box-shadow: var(--shadow-lift); transition: transform var(--d-m) var(--e-out), opacity var(--d-s), visibility 0s linear var(--d-m); max-width: calc(100vw - 32px); visibility: hidden; pointer-events: none; }
.toast.show { transform: translate(-50%, 0); opacity: 1; visibility: visible; pointer-events: auto; transition-delay: 0s; }
.has-sticky .toast { bottom: calc(max(18px, env(safe-area-inset-bottom)) + 76px); }
#toast-text { white-space: nowrap; }
.toast__tile { width: 28px; height: 28px; border-radius: 26%; background: var(--red); display: grid; place-items: center; flex: none; --knock: var(--red); }
.toast__tile .bag { width: 16px; color: #fff; }
.toast button { border: 0; background: none; color: var(--yel); font-weight: 700; padding: 4px 8px; }

/* ── Footer (dark surface, dark logo) ──────────────────────────── */
.site-footer { background: var(--ink-surface); color: #D9D7D2; margin-top: 48px; border-top: 1px solid var(--rule); }
.site-footer a { color: #D9D7D2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__top { display: grid; gap: 28px; padding-block: 36px 24px; }
@media (min-width: 900px) { .site-footer__top { grid-template-columns: 1.2fr 2.8fr; } }
.site-footer__brand > a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer__brand img { width: 150px; height: auto; }
.site-footer__brand p { margin-top: 12px; color: #A3A1A8; max-width: 34ch; font-size: .95rem; }
.site-footer__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (min-width: 640px) { .site-footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.site-footer h2 { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .92rem; }
.site-footer li a { display: inline-block; padding-block: 10px; min-inline-size: 44px; }
.site-footer__bottom { border-top: 1px solid #2F2F35; padding-block: 18px 28px; display: grid; gap: 10px; font-size: .82rem; color: #A3A1A8; }
.site-footer__bottom p { max-width: 60ch; }
@media (max-width: 600px) { .site-footer__bottom { padding-bottom: 80px; } } /* clear the floating WhatsApp button */
.site-footer__bottom button { background: none; border: 0; color: #D9D7D2; text-decoration: underline; padding: 6px 0; font-size: inherit; min-height: 44px; }
.newsletter { display: grid; gap: 10px; }
.newsletter form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter input { flex: 1 1 200px; min-height: 46px; border-radius: 12px; border: 1.5px solid #3A3A42; background: #232328; color: #fff; padding: 0 14px; }
.newsletter input::placeholder { color: #A3A1A8; }
.newsletter input:focus { outline: none; border-color: #fff; box-shadow: 0 0 0 2.5px var(--red); }
.newsletter__ok { color: #4CC48A; font-weight: 600; }

/* ── Sticky buy bar (deal pages, mobile) ───────────────────────── */
.buybar { position: fixed; inset-inline: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 12px; background: var(--panel); border-top: 1px solid var(--rule); padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom)); transform: translateY(110%); transition: transform var(--d-m) var(--e-out); }
.buybar.show { transform: none; }
.buybar__price { font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.buybar .btn { flex: 1; }
@media (min-width: 900px) { .buybar { display: none; } }

/* ── Search field with a submit button (home, deals hub, search, 404) ── */
.search-field { position: relative; display: flex; align-items: center; gap: 6px; width: 100%; max-width: 580px; background: var(--panel); border: 1.5px solid var(--rule); border-radius: var(--r-btn); padding: 4px; padding-inline-start: 44px; transition: border-color var(--d-s), box-shadow var(--d-s) var(--e-out); }
.search-field:hover { border-color: color-mix(in srgb, var(--fg) 35%, var(--rule)); }
.search-field:focus-within { border-color: var(--fg); box-shadow: var(--shadow); }
.search-field > .i { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-50%); color: var(--soft); pointer-events: none; }
.search-field input { flex: 1; min-width: 0; height: 44px; border: 0; background: transparent; font-size: 1rem; }
.search-field input::placeholder { color: var(--soft); opacity: 1; }
.search-field input:focus { outline: none; }
.search-field:has(input:focus-visible) { outline: 2.5px solid var(--red); outline-offset: 2px; }
.search-field .btn { min-height: 44px; padding: 8px 18px; border-radius: 11px; flex: none; }


/* ── Israel customs fact (partials/customs-facts) ──────────────── */
.customs-facts { background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-panel); padding: 18px 20px; display: grid; gap: 10px; }
.customs-facts__title { font-size: 1.15rem; }
.customs-facts__list { margin: 0; padding-inline-start: 1.2em; display: grid; gap: 8px; line-height: 1.65; }
.customs-facts__source { color: var(--soft); font-size: .88rem; }
.customs-facts__source a, .customs-facts--compact a { color: var(--link-strong); font-weight: 600; }
.customs-facts--compact { background: none; border: 0; padding: 0; display: block; line-height: 1.65; }

/* ── Development-data notice (never shown in production) ───────── */
.dev-note { margin-block: 12px; }

/* Rails that should stay one row on desktop */
@media (min-width: 1024px) { .rail--cap > :nth-child(n+6) { display: none; } }


/* ── Editorial articles: live deal box and the data-review note ── */
.article-deal { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card); padding: 10px; margin-block: 1.2em; }
.article-deal__media { display: block; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: #F3F3F2; }
.article-deal__media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; border-radius: 0; }
.article-deal__body { display: grid; gap: 4px; justify-items: start; }
.article-deal__label { font-size: .78rem; font-weight: 600; color: var(--soft); }
.article-deal__title { font-weight: 600; color: var(--fg) !important; text-decoration: none; line-height: 1.35; }
.article-deal__price { color: var(--price); font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.article-deal__checked { font-size: .82rem; color: var(--soft); }
.article-deal .btn { margin-top: 4px; color: #fff !important; }
.article-note { background: var(--stage); border-radius: var(--r-card); padding: 10px 14px; font-size: .92rem; color: var(--soft); }

/* Special collections: answer, key numbers and the cart calculator above the grid */
@media (max-width: 639px) { .collection-intro .facts { display: none; } } /* the answer box already states the numbers */
.collection-intro { display: grid; gap: 12px; margin-block: 8px 20px; }
@media (min-width: 900px) { .collection-intro { grid-template-columns: 1.2fr 1fr; align-items: start; } .collection-intro .collection-intro__jump { grid-column: 1; } }
.collection-tool .tool { max-width: 520px; }
.collection-intro__jump { justify-self: start; }


/* Touch screens: 44px targets for the controls people tap most */
@media (pointer: coarse) {
    .chip, .btn--sm, .icon-btn, .save-btn { min-height: 44px; }
    .save-btn { width: 44px; height: 44px; }
    .story-entry { min-height: 44px; }
    .deal-card__title a { padding-block: 3px; min-height: 44px; }
}
/* Story face with the brand bag */
.story__bag { width: 30px; color: #fff; --knock: var(--red-press); }
.saved-item__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; font-size: .8rem; color: var(--soft); }
.saved-item .btn { margin-top: 6px; }
/* Keep the WhatsApp button clear of the toast */
main[tabindex="-1"]:focus { outline: none; }
body.toast-open .wa-btn { bottom: calc(86px + env(safe-area-inset-bottom)); }
@media (max-width: 600px) { main { padding-bottom: 12px; } }

/* ── Motion preferences ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; transition-delay: 0ms !important; scroll-behavior: auto !important; }
    .js .stamp:not(.drawn) path { stroke-dashoffset: 0; }
}

.empty__acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
