/*
 * Offers in Qatar. One stylesheet, no framework: the pages are server
 * rendered and this is all they load.
 *
 * The look: a dark masthead set in the condensed face of a shelf ticket, a
 * sand floor, white cards, and one loud thing per card, the red ticket.
 */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("inter-latin.woff2") format("woff2"); }
@font-face { font-family: "Oswald"; font-style: normal; font-weight: 600 700; font-display: swap; src: url("oswald-latin.woff2") format("woff2"); }

:root {
  --ink: #1a1714;
  --sand: #f5f1ea;
  --paper: #fff;
  --tile: #f7f4ee;
  --red: #c72626;
  --red-ink: #a81b1b;
  --gold: #c9a84c;
  --text: #171717;
  --soft: #525252;
  --mute: #737373;
  --faint: #a3a3a3;
  --line: rgba(0, 0, 0, 0.08);
  --ticket: "Oswald", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bar-h: 118px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--sand); color: var(--text); font: 400 15px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1360px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
.ic { width: 1em; height: 1em; flex: none; }
.ic-xs { width: 12px; height: 12px; }
.ic-s { width: 14px; height: 14px; }
.ic-m { width: 18px; height: 18px; }

/* ── masthead ─────────────────────────────────────────────────────────── */
.mast { background: var(--ink); color: var(--sand); }
.mast > .wrap { padding-top: 20px; padding-bottom: 34px; }
.top { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.home { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: rgba(245, 241, 234, 0.8); text-decoration: none; }
.home:hover { color: #fff; }
.crumbs { margin-top: 18px; font-size: 13px; color: rgba(245, 241, 234, 0.55); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: 0.5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }
.crumbs [aria-current] { color: rgba(245, 241, 234, 0.85); }
.mast-grid { margin-top: 30px; display: grid; gap: 30px; }
.mast h1, .mast .h1 { font: 600 clamp(40px, 8.2vw, 96px)/0.92 var(--ticket); letter-spacing: -0.01em; text-transform: uppercase; color: #fff; text-wrap: balance; }
.lede { margin-top: 20px; max-width: 62ch; font-size: 16px; line-height: 1.6; color: rgba(245, 241, 234, 0.72); }
.mast-side { display: flex; flex-direction: column; justify-content: flex-end; gap: 22px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 28px 32px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 26px; align-content: end; }
.stats dd { font: 600 clamp(30px, 4.4vw, 48px)/1 var(--ticket); font-variant-numeric: tabular-nums; color: #fff; }
.stats dd small { font: 500 0.4em/1 var(--body); letter-spacing: 0.04em; color: rgba(245, 241, 234, 0.6); }
.stats dt { margin-top: 6px; font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(245, 241, 234, 0.55); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; background: rgba(255, 255, 255, 0.07); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); font-size: 13px; font-weight: 500; text-decoration: none; }
.chips a:hover { background: rgba(255, 255, 255, 0.13); }
.chips a.on { background: #fff; color: var(--ink); box-shadow: none; }
.chip-logo { display: inline-flex; min-width: 28px; height: 28px; padding: 0 4px; align-items: center; justify-content: center; background: #fff; overflow: hidden; }
.chip-logo:empty { display: none; }
/* The masthead's stores: their logos only, the name on hover (title) and for screen readers;
   a store whose logo fails to load shows its name instead. */
.chips-logo { gap: 6px; }
.chips-logo a { position: relative; padding: 0; gap: 0; }
.chips-logo .chip-logo { min-width: 40px; height: 40px; padding: 0 6px; }
.chips-logo .logo { max-width: 76px; max-height: 28px; height: auto; border-radius: 2px; }
.chips-logo .chip-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chips-logo .chip-logo:empty + .chip-name { position: static; display: inline-flex; align-items: center; width: auto; height: 40px; padding: 0 12px; overflow: visible; clip: auto; }
.chips-logo a:hover .chip-logo, .chips-logo a:focus-visible .chip-logo { box-shadow: 0 0 0 2px var(--sand); }
.chips-logo a.on { background: none; }
.chips-logo a.on .chip-logo { box-shadow: 0 0 0 3px var(--red); }
.chips .hid { display: none; }
.mast .show-all { align-self: flex-start; margin-top: -12px;color: rgba(245, 241, 234, 0.8); text-decoration-color: rgba(245, 241, 234, 0.35); }
/* A store's own mark: square icons stay square; a wordmark (Grand Hyper, SPAR, RP Tech) keeps its shape at the same height. */
.logo { object-fit: contain; border-radius: 4px; flex: none; width: auto; max-width: 64px; }
.mast-slim > .wrap { padding-bottom: 20px; }

.rail-wrap { border-top: 1px solid rgba(255, 255, 255, 0.1); padding: 22px 0 34px; }
.rail-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.rail-head h2 { font: 600 22px/1.2 var(--ticket); letter-spacing: 0.02em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.rail-head a { font-size: 13px; color: rgba(245, 241, 234, 0.7); text-underline-offset: 4px; text-decoration-color: rgba(255, 255, 255, 0.25); }
.rail-head a:hover { color: #fff; text-decoration-color: #fff; }
.rail { margin-top: 16px; display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > li { flex: none; width: 168px; }
.rail-card { display: block; height: 100%; padding: 10px; border-radius: 12px; background: #fff; color: var(--text); text-decoration: none; transition: transform 0.2s; }
.rail-card:hover { transform: translateY(-4px); }
.rail-photo { position: relative; display: block; aspect-ratio: 1; padding: 12px; border-radius: 8px; background: var(--tile); }
.rail-photo img, .card-photo img, .item-photo img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; display: block; }
.rail-photo .ticket { position: absolute; left: 8px; top: 8px; }
.rail-name { margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; font-size: 13px; line-height: 1.3; color: #262626; }
.rail-price { margin-top: 8px; display: flex; align-items: baseline; gap: 8px; font-variant-numeric: tabular-nums; }
.rail-price b { font: 600 21px/1 var(--ticket); color: #0a0a0a; }
.rail-price s { font-size: 12px; color: var(--mute); }
.rail-price i { font-style: normal; font-size: 11px; color: var(--mute); }
.rail-light { margin-left: -4px; padding: 4px 4px 10px; scrollbar-width: thin; }
.rail-light .rail-card { box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); }
.rail-light > li { width: 156px; }
.nophoto { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; font-size: 12px; color: var(--faint); }

.ticket { display: inline-flex; align-items: baseline; padding: 5px 6px 4px; border-radius: 4px; background: var(--red); color: #fff; font: 600 17px/1 var(--ticket); box-shadow: 0 2px 0 rgba(0, 0, 0, 0.12); }
.ticket small { margin-left: 1px; font-size: 0.62em; }
.ticket-big { padding: 8px 10px 6px; font-size: 30px; }

/* ── the search bar that comes with you ───────────────────────────────── */
.bar { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--line); background: rgba(245, 241, 234, 0.95); backdrop-filter: blur(12px); }
.bar > .wrap { padding-top: 12px; padding-bottom: 12px; }
.find { display: flex; align-items: center; gap: 8px; }
.find-box { position: relative; flex: 1; min-width: 0; }
.find-ic { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--mute); pointer-events: none; }
.find input[type="search"] { width: 100%; height: 48px; padding: 0 14px 0 44px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 12px; background: #fff; font-size: 16px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.04); }
.find input::placeholder { color: var(--faint); }
/* Suggestions while typing: where the words lead, then the best matches. */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 60; max-height: min(72vh, 540px); overflow-y: auto; padding: 6px 0; background: #fff; border: 1px solid rgba(0, 0, 0, 0.1); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.16); }
.sg { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--ink); font-size: 14px; text-decoration: none; }
.sg:hover, .sg.on { background: rgba(0, 0, 0, 0.05); }
.sg.on { box-shadow: inset 3px 0 0 var(--ink); }
.sg-all { font-size: 15px; }
.sg-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-main small { margin-left: 4px; color: var(--mute); font-size: 12px; }
.sg-offer .sg-main small { display: block; margin: 1px 0 0; }
.sg-n { flex: none; color: var(--mute); font-size: 12px; font-variant-numeric: tabular-nums; }
.sg-h { padding: 10px 14px 4px; color: var(--mute); font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.sg-pic { display: inline-flex; flex: none; width: 40px; height: 40px; align-items: center; justify-content: center; background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.sg-pic img { max-width: 36px; max-height: 36px; object-fit: contain; }
.sg-price { flex: none; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; }
.sg-price small { color: var(--mute); font-size: 11px; font-weight: 500; }
.sg-price s { display: block; color: var(--mute); font-size: 12px; font-weight: 400; }
.find select { height: 40px; padding: 0 30px 0 12px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; background: #fff; font-size: 14px; max-width: 46vw; }
.find-go { height: 40px; padding: 0 14px; border: 0; border-radius: 8px; background: var(--text); color: #fff; font-size: 14px; font-weight: 600; }
.js .find-go { display: none; }
.open-filters { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--text); color: #fff; font-size: 14px; font-weight: 600; flex: none; }
.bar-meta { margin-top: 10px; display: flex; align-items: center; gap: 12px; min-height: 26px; }
.count { flex: none; font-size: 14px; color: var(--soft); font-variant-numeric: tabular-nums; }
.count b { font: 600 18px/1 var(--ticket); color: #0a0a0a; }
.pills { display: flex; flex: 1; min-width: 0; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pills li { flex: none; }
.pills a { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px 4px 12px; border-radius: 999px; background: var(--text); color: #fff; font-size: 12px; white-space: nowrap; text-decoration: none; }
.pills a:hover { background: var(--red); }
.pills:empty { display: none; }
.bar-meta .clear-all { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 1px solid var(--text); background: #fff; color: var(--text); font-size: 12px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.bar-meta a.clear-all:hover { background: var(--red); border-color: var(--red); color: #fff; }
.bar-meta .clear-all.off { border-color: rgba(0, 0, 0, 0.12); color: var(--faint); cursor: default; }
@media (max-width: 639px) {
  .find { flex-wrap: wrap; }
  .find-box { flex: 1 1 60%; }
  .find select { order: 3; height: 38px; margin-left: auto; }
}

/* ── aisles ───────────────────────────────────────────────────────────── */
.aisles { padding-top: 26px; }
.aisles ul { display: flex; gap: 10px; margin: 0 -16px; padding: 0 16px 8px; overflow-x: auto; scrollbar-width: none; }
.aisles ul::-webkit-scrollbar { display: none; }
.aisles li { flex: none; width: 128px; }
.aisles a { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; height: 100%; padding: 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); text-decoration: none; transition: box-shadow 0.15s; }
.aisles a:hover { box-shadow: 0 0 0 1px var(--text); }
.aisles a.on { background: var(--text); color: #fff; box-shadow: none; }
.aisle-ic { width: 22px; height: 22px; stroke-width: 1.75; color: var(--red-ink); }
.aisles a.on .aisle-ic { color: var(--gold); }
.aisle-name { font-size: 13px; font-weight: 500; line-height: 1.25; }
.aisle-n { margin-top: auto; font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.aisles a.on .aisle-n { color: rgba(255, 255, 255, 0.65); }

/* ── within an aisle: its sub-categories ──────────────────────────────── */
.subs:empty { display: none; }
.subs ul { display: flex; gap: 8px; margin: 0 -16px; padding: 14px 16px 4px; overflow-x: auto; scrollbar-width: none; }
.subs ul::-webkit-scrollbar { display: none; }
.subs li { flex: none; }
.subchip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); font-size: 13px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: box-shadow 0.15s; }
.subchip:hover { box-shadow: 0 0 0 1px var(--text); }
.subchip span { font-size: 12px; font-weight: 400; color: var(--mute); font-variant-numeric: tabular-nums; }
.subchip.on { background: var(--text); color: #fff; box-shadow: none; }
.subchip.on span { color: rgba(255, 255, 255, 0.7); }

/* ── the shelf ────────────────────────────────────────────────────────── */
.shelf { padding-top: 26px; padding-bottom: 72px; scroll-margin-top: var(--bar-h); }
#bar-top { scroll-margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { display: flex; animation: arrive 0.28s ease-out both; }
.card article { position: relative; display: flex; flex-direction: column; width: 100%; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); transition: transform 0.2s, box-shadow 0.2s; }
.card article:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 16px 32px -16px rgba(26, 23, 20, 0.45); }
.card-photo { position: relative; aspect-ratio: 10 / 9; padding: 20px; background: var(--tile); }
.card-photo img { transition: transform 0.3s; }
.card article:hover .card-photo img { transform: scale(1.04); }
.card-photo .ticket { position: absolute; left: 10px; top: 10px; }
.new { position: absolute; right: 10px; top: 10px; padding: 4px 6px; border-radius: 4px; background: #0a0a0a; color: #fff; font-size: 10px; font-weight: 600; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 14px; }
.card-brand { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 11px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--mute); }
.card-brand > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-spec { flex: none; padding: 2px 6px; border-radius: 4px; background: var(--sand); color: #404040; letter-spacing: 0.02em; text-transform: none; font-variant-numeric: tabular-nums; }
.card-name { margin-top: 4px; min-height: 2.75em; font-size: 14px; font-weight: 400; line-height: 1.375; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card-name a { text-decoration: none; }
.card-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: 12px; }
.price { margin-top: 12px; font-variant-numeric: tabular-nums; }
.now { font: 600 26px/1 var(--ticket); color: #0a0a0a; }
.cur { margin-right: 4px; font: 500 0.42em/1 var(--body); letter-spacing: 0.02em; color: var(--mute); vertical-align: 0.18em; }
.unit { margin-left: 4px; font: 500 0.42em/1 var(--body); letter-spacing: 0.02em; color: var(--mute); }
.price-note { margin-top: 6px; display: inline-block; padding: 2px 6px; background: #3f3a8c; color: #fff; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; }
.rail-note { display: block; margin-top: 4px; font-size: 11px; font-weight: 600; color: #3f3a8c; }
.was { margin-top: 6px; font-size: 12px; line-height: 1.25; color: var(--mute); }
.was.none { color: var(--faint); }
.save { margin-left: 6px; font-weight: 500; color: var(--red-ink); }
.price-view .now { font-size: 44px; }
.price-view .was { font-size: 14px; }
.card-foot { margin-top: auto; padding-top: 14px; font-size: 12px; color: var(--mute); }
.card-store { display: flex; align-items: center; gap: 6px; min-width: 0; font-weight: 500; color: #404040; }
.card-store span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card-meta { margin-top: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: #15803d; }
.status::before { content: ""; width: 7px; height: 7px; background: currentColor; }
.status-ended { color: var(--red-ink); }
.status-view { margin-top: 14px; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.shop { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 2px; font-weight: 500; color: var(--text); text-decoration: underline; text-decoration-color: #d4d4d4; text-underline-offset: 2px; }
.shop:hover { text-decoration-color: var(--text); }
@keyframes arrive { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

#results { transition: opacity 0.15s; min-width: 0; }
.loading #results { opacity: 0.55; }
.fixed { margin-bottom: 16px; font-size: 14px; color: var(--soft); }
.empty { padding: 32px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); }
.empty-h { font: 600 26px/1 var(--ticket); text-transform: uppercase; color: #0a0a0a; }
.empty p + p { margin-top: 12px; max-width: 46ch; color: var(--soft); }
.empty .btn { margin-top: 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 20px; border: 0; border-radius: 8px; background: var(--text); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; transition: background 0.15s; }
.btn:hover { background: var(--red); }
.btn-line { background: none; color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.btn-line:hover { background: var(--text); color: #fff; }
.more { margin-top: 32px; text-align: center; font-size: 14px; }

.ways { margin-top: 64px; padding-top: 8px; border-top: 1px solid var(--line); }
.ways h2, .block h2 { margin-top: 28px; font: 600 20px/1.2 var(--ticket); letter-spacing: 0.02em; text-transform: uppercase; color: #0a0a0a; }
.links { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.links a { display: inline-flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06); font-size: 13px; text-decoration: none; }
.links a:hover { box-shadow: 0 0 0 1px var(--text); }
.links span { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
.faq { margin-top: 12px; max-width: 72ch; }
.faq dt { margin-top: 18px; font-weight: 600; }
.faq dd { margin-top: 4px; color: var(--soft); line-height: 1.6; }

/* ── the filter panel: a sheet on a phone, a sidebar on a wide screen ── */
.panel { position: fixed; inset: auto 0 0 0; z-index: 60; display: none; flex-direction: column; max-height: 90dvh; border-radius: 16px 16px 0 0; background: var(--sand); box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.3); }
.filters-open .panel { display: flex; animation: up 0.22s ease-out both; }
.filters-open::before { content: ""; position: fixed; inset: 0; z-index: 55; background: rgba(26, 23, 20, 0.65); }
.filters-open { overflow: hidden; }
@keyframes up { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.panel-head p { font: 600 20px/1 var(--ticket); letter-spacing: 0.02em; text-transform: uppercase; }
.panel-head button { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: #404040; }
.panel-body { overflow-y: auto; overscroll-behavior: contain; padding: 20px 16px; }
.panel-foot { padding: 12px 16px; border-top: 1px solid var(--line); }
.panel-foot button { width: 100%; height: 48px; border: 0; border-radius: 12px; background: var(--text); color: #fff; font-size: 15px; font-weight: 600; }
.panel section { padding: 20px 0; border-top: 1px solid rgba(0, 0, 0, 0.07); }
.panel section:first-child { padding-top: 0; border-top: 0; }
.panel h3 { font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mute); }
.panel-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.panel-row a { font-size: 12px; color: #404040; text-underline-offset: 2px; }
.levels { margin-top: 12px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.bands { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, 0.1); background: #fff; color: #262626; font-size: 13px; line-height: 1.25; text-decoration: none; transition: border-color 0.15s; }
.pill:hover { border-color: var(--text); }
.pill span { font-size: 11px; color: var(--mute); font-variant-numeric: tabular-nums; }
.pill.on { border-color: var(--text); background: var(--text); color: #fff; }
.pill.on span { color: rgba(255, 255, 255, 0.7); }
.pill.none, .check.none { opacity: 0.4; pointer-events: none; }
.levels .pill { flex-direction: column; gap: 2px; }
.levels .pill b { font-weight: 600; }
.range { margin-top: 10px; display: flex; align-items: center; gap: 6px; }
.range input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 6px; background: #fff; font-size: 13px; font-variant-numeric: tabular-nums; }
.range span { color: var(--faint); }
.range button { flex: none; height: 36px; padding: 0 12px; border: 1px solid var(--text); border-radius: 6px; background: none; font-size: 13px; font-weight: 500; }
.range button:hover { background: var(--text); color: #fff; }
.checks { margin: 12px -6px 0; }
.check { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 4px 6px; border-radius: 6px; font-size: 14px; color: #262626; text-decoration: none; }
.check:hover { background: rgba(0, 0, 0, 0.04); }
.box { flex: none; width: 16px; height: 16px; border: 1.5px solid #a3a3a3; border-radius: 3px; background: #fff; }
.check.on .box { border-color: var(--text); background: var(--text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat; }
.check.on .check-label { font-weight: 500; color: #0a0a0a; }
.check-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-n { font-size: 12px; color: var(--mute); font-variant-numeric: tabular-nums; }
/* The category tree: an aisle a line, opened to show its sub-categories. */
.tree { margin-top: 8px; }
.tree > li + li { border-top: 1px solid rgba(0, 0, 0, 0.06); }
.tree summary { display: flex; align-items: center; gap: 10px; padding: 10px 2px; list-style: none; cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); }
.tree summary::-webkit-details-marker { display: none; }
.tree summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: -3px 3px 0 0; border-right: 2px solid #404040; border-bottom: 2px solid #404040; transform: rotate(45deg); transition: transform 0.15s; }
.tree details[open] > summary::after { margin-top: 3px; transform: rotate(-135deg); }
.tree summary:hover .tree-name { text-decoration: underline; text-underline-offset: 3px; }
.tree-name { flex: 1; min-width: 0; }
.tree .checks { margin: 0 -6px 10px; }
.tree .checks .check { font-size: 13.5px; }
.brand-find { width: 100%; height: 36px; margin-top: 12px; padding: 0 10px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 6px; background: #fff; font-size: 13px; }
.brand-find + .checks { margin-top: 8px; }
.checks .hid { display: none; }
.show-all { margin-top: 6px; padding: 0; border: 0; background: none; font-size: 13px; font-weight: 500; text-decoration: underline; text-decoration-color: #d4d4d4; text-underline-offset: 2px; }

/* ── one offer ────────────────────────────────────────────────────────── */
.item-wrap { padding-top: 28px; padding-bottom: 72px; }
.item { display: grid; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05); }
.item-photo { position: relative; padding: 24px; background: var(--tile); }
.item-photo img { aspect-ratio: 1; height: auto; max-width: 210px; margin: 0 auto; }
.item-photo .nophoto { aspect-ratio: 1; max-width: 210px; margin: 0 auto; }
.item-photo .ticket { position: absolute; left: 20px; top: 20px; }
.item-body { display: flex; flex-direction: column; padding: 24px; min-width: 0; }
.item-brand { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mute); text-decoration-color: #d4d4d4; text-underline-offset: 4px; }
.item-brand:hover { color: var(--text); }
.item h1 { margin-top: 8px; padding-right: 36px; font-size: 22px; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; color: #0a0a0a; text-wrap: balance; }
.ended { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #fdf1f1; color: var(--red-ink); font-size: 14px; font-weight: 500; }
.item .price { margin-top: 20px; }
.btn-go { margin-top: 20px; height: 48px; font-size: 15px; }
.say { margin-top: 18px; font-size: 15px; line-height: 1.6; color: #404040; }
.tags { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags a { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--sand); font-size: 12px; color: #404040; text-decoration: none; }
.tags a:hover { background: #ebe5d9; }
.facts { margin-top: 22px; border-top: 1px solid #f5f5f5; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 10px 0; }
.facts > div + div { border-top: 1px solid #f5f5f5; }
.facts dt { color: var(--mute); }
.facts dd { text-align: right; font-weight: 500; font-variant-numeric: tabular-nums; }
.sub { margin-top: 26px; font: 600 16px/1.2 var(--ticket); letter-spacing: 0.02em; text-transform: uppercase; }
.hist { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.hist th { padding: 6px 0; text-align: left; font-weight: 500; color: var(--mute); border-bottom: 1px solid #ededed; }
.hist td { padding: 7px 0; border-bottom: 1px solid #f5f5f5; }
.hist th:not(:first-child), .hist td:not(:first-child) { text-align: right; }
.fine { margin-top: 16px; font-size: 12px; line-height: 1.6; color: var(--mute); }
.block { margin-top: 40px; }
.block h2 { margin-top: 0; }
.block-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.block-head a { font-size: 13px; text-underline-offset: 3px; }
.block .grid, .block .rail { margin-top: 14px; }

/* An offer opened in place, over the shelf. */
.qv { width: min(980px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px); margin: auto; padding: 0; border: 0; border-radius: 16px; background: #fff; color: var(--text); overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45); }
.qv[open] { display: flex; flex-direction: column; }
.qv::backdrop { background: rgba(26, 23, 20, 0.7); backdrop-filter: blur(2px); }
.qv-scroll { overflow-y: auto; overscroll-behavior: contain; }
.qv .item { border-radius: 0; box-shadow: none; }
.qv-close { position: absolute; right: 12px; top: 12px; z-index: 5; display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); color: #404040; }
.qv-more { padding: 22px 24px 24px; border-top: 1px solid #f5f5f5; background: #faf8f4; }
.qv-more h2 { font: 600 18px/1.2 var(--ticket); letter-spacing: 0.02em; text-transform: uppercase; }
.qv-full { display: inline-block; margin-top: 14px; font-size: 13px; text-underline-offset: 3px; }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 13px; line-height: 1.65; color: var(--mute); }
.foot p { max-width: 78ch; }
.foot p + p { margin-top: 12px; }

/* ── wider screens ────────────────────────────────────────────────────── */
@media (min-width: 640px) {
  .wrap { padding-left: 24px; padding-right: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rail > li { width: 188px; }
  .aisles ul { margin: 0 -24px; padding: 0 24px 8px; }
  .subs ul { margin: 0 -24px; padding: 14px 24px 4px; }
}
@media (min-width: 768px) {
  .item { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
  .item-photo { padding: 40px; }
  .item-photo img { max-width: 380px; }
  .item-body { padding: 32px; }
}
@media (min-width: 1024px) {
  .wrap { padding-left: 40px; padding-right: 40px; }
  .mast > .wrap { padding-bottom: 48px; }
  .mast-grid { margin-top: 44px; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: start; }
  .stats { border-top: 0; border-left: 1px solid rgba(255, 255, 255, 0.1); padding: 0 0 0 40px; }
  .open-filters, .panel-head, .panel-foot { display: none; }
  .aisles ul { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; padding: 0; overflow: visible; }
  .aisles li { width: auto; }
  .subs ul { flex-wrap: wrap; margin: 0; padding: 16px 0 0; overflow: visible; }
  /* The filters run the full height of the offers beside them, with no scroll of their own;
     only when the offers are few (shorter than the filters) does the list scroll. */
  .shelf { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 32px; align-items: stretch; }
  .panel, .filters-open .panel { position: relative; inset: auto; z-index: auto; display: block; min-height: 560px; max-height: none; border-radius: 0; background: none; box-shadow: none; animation: none; }
  .filters-open::before { display: none; }
  .filters-open { overflow: auto; }
  .panel-body { position: absolute; inset: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; padding: 0 12px 16px 0; }
  .grid-tight { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .aisles ul { grid-template-columns: repeat(9, minmax(0, 1fr)); }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .grid-tight { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1536px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {

  .card, .filters-open .panel { animation: none; }
  .card article, .card-photo img, .rail-card { transition: none; transform: none !important; }
}

/* Price order, inside the price filter. */
.orders { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.orders .pill { gap: 6px; }
.orders .ic { color: currentColor; }
/* What a shelf page is about: its own heading, above the offers (the masthead is the same everywhere). */
.scope { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; margin-bottom: 16px; }
.scope h1 { font: 600 clamp(22px, 2.4vw, 30px)/1.1 var(--ticket); letter-spacing: 0.01em; text-transform: uppercase; color: #0a0a0a; }
.scope a { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 500; color: var(--text); text-underline-offset: 3px; }

/* Rows that scroll sideways get arrows (added by offers.js, shown only when there is more that way). */
.hs { position: relative; }
.hs-btn { position: absolute; top: 50%; z-index: 3; display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border: 0; background: var(--text); color: #fff; transform: translateY(-50%); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); }
.hs-btn:hover { background: var(--red); }
.hs-btn[hidden] { display: none; }
.hs-prev { left: 0; }
.hs-next { right: 0; }
.mast .hs-btn { background: #fff; color: var(--ink); }
.mast .hs-btn:hover { background: var(--gold); }

/* No curves anywhere on these pages: square buttons, cards, chips and photos. */
*, *::before, *::after { border-radius: 0 !important; }

/* An offer's period, when the store states one. */
.period { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 3px 8px; border-radius: 6px; background: #fdf1f1; color: var(--red-ink); font-size: 12px; font-weight: 500; }
.period .ic { width: 13px; height: 13px; }
