:root {
  --bg: #fff8ef;
  --paper: #ffffff;
  --ink: #1c1a17;
  --muted: #6b655c;
  --red: #d92b1f;
  --red-dark: #a81f15;
  --orange: #f59e0b;
  /* Brand blue, sampled from Orlando's photo (lid #02aff9, deepened a touch
     for white-text contrast). The --green* names are kept so the 40+
     usages don't churn — they hold blue now, not green. */
  --green: #017eb3;
  --green-bg: #ebf9ff;
  --masthead: #029adb;
  --masthead-dark: #0172a2;
  --strip-bg: #ebf9ff;
  --border: #e8ddd0;
  --blue: #1d4ed8;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
  line-height: 1.45;
  overflow-wrap: break-word;
}

/* Masthead — bright brand blue, slim: lang toggle left, cart right,
   kicker + title + city pills below. No tagline / updated line up here —
   those live in the About section below the items. */
.masthead {
  background: var(--masthead);
  color: #fff;
  padding: 10px 14px 12px;
  text-align: center;
}
.masthead-inner { max-width: 1280px; margin: 0 auto; }
.masthead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.masthead-left { display: flex; gap: 8px; align-items: center; }
.masthead-top .view-btn { background: transparent; border-color: rgba(255,255,255,.65); color: #fff; flex-shrink: 0; }
/* Hamburger active dot: a filter is on. Red, white-ringed, straddling the
   button's top-right corner so it reads on the blue masthead. */
#filter-btn { position: relative; }
.filter-dot {
  position: absolute; top: -4px; right: -4px; width: 11px; height: 11px;
  border-radius: 50%; background: var(--red); border: 2px solid #fff;
}
.filter-dot[hidden] { display: none; }
.kicker { margin: 0 0 2px; font-size: 0.75rem; letter-spacing: 0.14em; font-weight: 700; opacity: 0.9; }
.masthead h1 { margin: 0 0 4px; font-size: clamp(1.35rem, 6vw, 1.9rem); line-height: 1.05; letter-spacing: -0.02em; }
.updated { margin: 8px 0 0; font-size: 0.8rem; font-weight: 600; }

/* Deal clock strip — light blue, one line: label + live countdown.
   Wraps to at most two lines on a tiny screen; the countdown keeps
   ticking every second (tickCountdowns writes #clock-countdown). */
.clock-strip { background: var(--strip-bg); padding: 8px 14px; text-align: center; }
.clock-line { margin: 0 auto; max-width: 1280px; display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 2px 8px; font-size: 0.85rem; }
.clock-label { font-weight: 800; letter-spacing: 0.06em; color: var(--masthead-dark); }
.clock-time { font-weight: 800; color: var(--masthead-dark); font-variant-numeric: tabular-nums; }

/* Search bar — sticky at the top of the viewport so it's always in reach
   on a phone (it used to sit below the two deal sections). Full-width
   input, no hamburger needed: it's one row and it fits everywhere. */
.search-bar {
  position: sticky; top: 0; z-index: 40;
  background: var(--bg); border-bottom: 1px solid var(--border);
}
.search-bar-inner { max-width: 1280px; margin: 0 auto; padding: 10px 12px 8px; }
.search-bar .search-row { margin: 0 0 4px; }
/* Typing in the top bar jumps to the results — leave room for the sticky
   bar so the section heading isn't hidden under it. */
#prices-section { scroll-margin-top: 76px; }

main { max-width: 1280px; margin: 0 auto; padding: 8px 12px 40px; }

.ad-page {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px;
  margin: 16px 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ad-page h2 { margin: 0 0 4px; font-size: 1.3rem; letter-spacing: -0.01em; }
.section-sub { margin: 0 0 14px; color: var(--muted); font-size: 0.9rem; }

/* About this site — the long texts, below the items where they belong. */
.about-lead { margin: 0 0 8px; font-size: 1rem; font-weight: 700; line-height: 1.4; }
.about-updated { margin: 0 0 8px; font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.about-note { margin: 0; font-size: 0.9rem; color: var(--muted); }

/* Deal cards */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.deal-card {
  border: 1px solid var(--border);
  border-left: 5px solid var(--orange);
  border-radius: 10px;
  padding: 14px;
  background: #fffdf8;
}
.deal-card.hot { border-left-color: var(--red); }
.deal-store { font-size: 0.75rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.deal-item { font-weight: 800; font-size: 1.05rem; margin: 2px 0; }
.deal-price-row { display: flex; align-items: baseline; gap: 8px; margin: 4px 0; flex-wrap: wrap; }
.deal-price { font-size: 1.6rem; font-weight: 800; color: var(--red); }
.deal-was { color: var(--muted); text-decoration: line-through; font-size: 0.95rem; white-space: nowrap; }
.deal-save { background: var(--green-bg); color: var(--green); font-weight: 800; font-size: 0.8rem; border-radius: 999px; padding: 2px 8px; }
.deal-terms { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.deal-countdown {
  margin-top: 10px; font-weight: 800; font-size: 0.95rem; color: var(--red-dark);
  font-variant-numeric: tabular-nums;
}
.deal-countdown.expired { color: var(--muted); }
.deal-qty {
  display: inline-block; margin-top: 8px; font-size: 0.75rem; font-weight: 800;
  background: #fef3c7; color: #92400e; border-radius: 6px; padding: 2px 7px;
}

/* Tags */
.tag {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.03em;
  border-radius: 4px; padding: 1px 5px; vertical-align: middle; margin-left: 4px;
  white-space: nowrap;
}
.tag-clip { background: #dbeafe; color: var(--blue); }
.tag-online { background: #ede9fe; color: #6d28d9; }
.tag-member { background: #fef3c7; color: #92400e; }

/* Ad view toggle + weekly-ad grid (like the mail ad: big photo, giant price) */
.view-toggle { display: flex; gap: 8px; margin: 0 0 14px; }
.view-btn {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 7px 14px; font-size: 0.9rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.view-btn.on { background: var(--green); border-color: var(--green); color: #fff; }

/* City toggle — Bakersfield / Columbus (Easton) / Youngstown, under the
   title. The masthead is blue, so the shared .view-btn rules read
   backwards here — default white pill = inactive, blue .on pill =
   invisible. Scoped rules: active city gets the white pill with blue
   text, inactive is a ghost outline. */
.city-toggle { display: flex; gap: 8px; margin: 8px 0 0; justify-content: center; flex-wrap: wrap; }
.city-toggle .view-btn { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.city-toggle .view-btn.on { background: #fff; border-color: #fff; color: var(--masthead-dark); }

/* Region tabs: the second row holds the cities of the active region
   (California zones, or the two Ohio cities). The ZIP row lives under
   the California row only. */
.city-subrow { margin-top: 6px; }
.zip-row { display: flex; gap: 8px; margin: 10px 0 0; justify-content: center; align-items: center; flex-wrap: wrap; color: #fff; }
.zip-row label { font-size: 0.85rem; font-weight: 700; }
.zip-row input { width: 6.5em; padding: 6px 9px; font-size: 0.9rem; border: 2px solid rgba(255,255,255,.6); border-radius: 999px; background: #fff; color: #222; text-align: center; }
.zip-row input:focus { outline: 2px solid #fff; outline-offset: 1px; }
.zip-row .view-btn { background: transparent; border-color: rgba(255,255,255,.6); color: #fff; }
.zip-status { flex-basis: 100%; margin: 0; font-size: 0.82rem; text-align: center; }
.zip-row[hidden], .city-subrow[hidden] { display: none; }

/* Small screens: tighter pills so all three cities always fit, and the
   Columbus label shortens to "Columbus" at 360px (CSS only — the button
   text is untouched; the kicker above still says COLUMBUS (EASTON)). */
@media (max-width: 480px) {
  .masthead, .cart-page-head { padding: 8px 12px 10px; }
  .city-toggle { gap: 6px; }
  .city-toggle .view-btn { padding: 6px 9px; font-size: 0.78rem; }
  .masthead-top .view-btn, .cart-btn { padding: 6px 11px; font-size: 0.85rem; }
  .masthead-top .cart-back { padding: 6px 11px; font-size: 0.85rem; }
  /* Modal on a phone: store column keeps a 120px floor, price column wraps. */
  .modal-store { min-width: 120px; }
  .modal { padding: 16px 14px 24px; }
}
@media (max-width: 380px) {
  #city-columbus { font-size: 0; }
  #city-columbus::after { content: "Columbus"; font-size: 0.78rem; }
}
.item-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 700px) { .item-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .item-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .item-grid { grid-template-columns: repeat(5, 1fr); } }
.ad-cat {
  margin: 18px 0 10px; font-size: 0.85rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.ad-cat:first-child { margin-top: 0; }
.item-card { position: relative; border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: #fff; }
.item-card:hover { border-color: var(--green); }
.ad-img { width: 100%; height: 140px; object-fit: contain; background: #fff; border-radius: 8px; }
.ad-name { font-weight: 800; font-size: 0.98rem; margin-top: 8px; line-height: 1.25; }
.ad-size { font-size: 0.8rem; color: var(--muted); }
.ad-price-row { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 2px; flex-wrap: wrap; }
.ad-price { font-size: 2rem; font-weight: 800; color: var(--red); letter-spacing: -0.02em; line-height: 1; }
.ad-was { color: var(--muted); text-decoration: line-through; font-size: 0.95rem; }
.ad-unit { font-size: 0.85rem; color: var(--muted); font-weight: 700; }
.ad-store { font-weight: 800; font-size: 0.9rem; }
.ad-deal { margin-top: 4px; font-size: 0.8rem; font-weight: 800; color: var(--red-dark); }
/* Freshness colors on verified dates: orange at 14 days, red at 28+ days. */
.ad-verified.fresh-warn, .verified.fresh-warn, .modal-note.fresh-warn { color: #b96a00; }
.ad-verified.fresh-stale, .verified.fresh-stale, .modal-note.fresh-stale { color: #c0392b; font-weight: 600; }
.ad-verified { font-size: 0.75rem; color: var(--muted); margin-top: 2px; }
.ad-unpriced { margin-top: 8px; color: var(--muted); font-weight: 700; }
.ad-save {
  position: absolute; top: 10px; right: 10px; background: var(--green-bg); color: var(--green);
  font-weight: 800; font-size: 0.75rem; border-radius: 999px; padding: 3px 8px;
}
.deal-img { width: 100%; height: 110px; object-fit: contain; background: #fff; border-radius: 8px; margin-bottom: 6px; }
.modal-img { width: 100%; max-height: 180px; object-fit: contain; background: #fff; border-radius: 10px; margin: 4px 0 10px; }

/* Price table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { padding: 9px 8px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--muted); font-weight: 700; font-size: 0.8rem; text-align: right; }
th:first-child, td:first-child { text-align: left; }
td.best { background: var(--green-bg); color: var(--green); font-weight: 800; border-radius: 6px; }
td.notpriced { color: #c9c0b4; text-align: center; }
.item-cell { font-weight: 700; }
.item-size { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
.unit-price { display: block; font-weight: 400; font-size: 0.75rem; color: var(--muted); }
td.best .unit-price { color: var(--green); }
.verified { display: block; font-weight: 400; font-size: 0.7rem; color: var(--muted); }
.cat-row td {
  background: #faf5ec; font-weight: 800; font-size: 0.8rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); padding: 8px;
}
.table-note { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; }

/* Basket */
.basket-layout { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 700px) { .basket-layout { grid-template-columns: 1.1fr 1fr; } }
.basket-items { display: flex; flex-wrap: wrap; gap: 6px; align-content: flex-start; }
.basket-chip {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 6px 11px; font-size: 0.85rem; cursor: pointer; font-family: inherit;
}
.basket-chip:hover { border-color: var(--green); }
.basket-chip.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.basket-chip:disabled { opacity: 0.45; cursor: default; }
.basket-results { background: #fffdf8; border: 1px solid var(--border); border-radius: 10px; padding: 14px; }
.basket-empty { color: var(--muted); margin: 0; }
.basket-line { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid var(--border); font-size: 0.95rem; }
.basket-line:last-child { border-bottom: 0; }
.basket-line.best { font-weight: 800; color: var(--green); }
.basket-line .count { color: var(--muted); font-size: 0.8rem; font-weight: 400; }
.basket-split { margin-top: 12px; background: var(--green-bg); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; }
.basket-split strong { color: var(--green); }
.basket-total-line { margin-top: 10px; font-size: 0.95rem; }

/* Ad cycles */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.ad-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.ad-card .store { font-weight: 800; }
.ad-card .cycle { color: var(--red-dark); font-weight: 700; font-size: 0.9rem; }
.ad-card .src { color: var(--muted); font-size: 0.8rem; margin-top: 2px; }

/* Upload */

footer { max-width: 1280px; margin: 0 auto; padding: 0 16px 40px; color: var(--muted); font-size: 0.85rem; text-align: center; }
footer p { margin: 6px 0; }
.fineprint { font-size: 0.78rem; }

/* Item detail modal — tap any item to compare all stores */
[data-item] { cursor: pointer; }
.deal-card[data-item]:hover { border-color: var(--green); }
td.item-cell[data-item]:hover { color: var(--masthead-dark); }
.tap-hint { display: block; margin-top: 6px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
/* Deal source link — small text link, never a button; only renders when
   the deal carries a src URL (plumbing; no deals carry one yet). */
.deal-src-line { margin: 6px 0 0; font-size: 0.8rem; }
a.deal-src { color: var(--green); text-decoration: underline; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(28, 26, 23, 0.55);
  display: flex; align-items: flex-end; justify-content: center; z-index: 50;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--paper); border-radius: 16px 16px 0 0; width: 100%; max-width: 560px;
  max-height: 85vh; overflow-y: auto; padding: 20px 18px 28px; position: relative;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.25);
}
@media (min-width: 700px) {
  .modal-backdrop { align-items: center; padding: 20px; }
  /* Wider on desktop so store names + notes have room (was 560px). */
  .modal { border-radius: 16px; max-width: 720px; }
}
.modal-close {
  position: absolute; top: 8px; right: 8px; border: 0; background: transparent;
  font-size: 1.2rem; cursor: pointer; color: var(--muted); padding: 10px 12px;
}
.modal-title { margin: 0 28px 2px 0; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.modal-sub { margin: 0 0 12px; color: var(--muted); font-size: 0.88rem; }
.modal-row {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--border);
}
.modal-row.best { background: var(--green-bg); border-radius: 8px; padding: 10px 8px; }
.modal-row.best .modal-price { color: var(--green); }
.modal-row.unpriced { opacity: 0.55; }
/* Store column: real floor so it can never collapse to one letter per line.
   (Was min-width: 0 while the price column refused to shrink — the store
   name + CHEAPEST/LOWEST/MEMBER badges stacked letter-by-letter.) */
.modal-store { font-weight: 700; flex: 1 1 auto; min-width: 140px; }
.modal-store .addr { display: block; font-weight: 400; font-size: 0.78rem; color: var(--muted); }
/* Price column: wraps normally now. The old white-space: nowrap made the
   long note one unbreakable line, so flex gave the price column the whole
   row and crushed the store column. Price lines stay right-aligned and
   the unit price keeps itself together. */
.modal-price { font-weight: 800; font-size: 1.1rem; flex: 0 1 auto; min-width: 0; text-align: right; }
.modal-price .unit-price { display: block; text-align: right; white-space: nowrap; }
.modal-note { display: block; font-size: 0.78rem; font-weight: 400; color: var(--muted); text-align: right; overflow-wrap: break-word; }
/* Badges wrap as whole units, never letter-by-letter. */
.modal-best-tag { font-size: 0.7rem; font-weight: 800; color: var(--green); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }

/* Modal sort: best per unit vs lowest total */
.modal-summary { margin: 6px 0; font-size: 0.9rem; }
.modal-sort { display: flex; gap: 8px; margin: 12px 0 4px; }
.sort-btn {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 0.85rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.sort-btn.on { background: var(--green); border-color: var(--green); color: #fff; }

/* My Cart — white pill in the masthead top row, opposite the lang toggle.
   (It used to be a fixed red button floating top-right.) */
.cart-btn {
  background: #fff; color: var(--masthead-dark); border: 2px solid #fff;
  border-radius: 999px; padding: 7px 13px; font-size: 0.9rem; font-weight: 800;
  cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.cart-btn:hover { background: var(--strip-bg); }
.cart-count {
  display: inline-block; background: var(--masthead-dark); color: #fff;
  border-radius: 999px; min-width: 20px; padding: 1px 6px; margin-left: 4px;
  font-size: 0.8rem; font-weight: 800;
}
.cart-count[hidden] { display: none; }
.cart-backdrop {
  position: fixed; inset: 0; background: rgba(28, 26, 23, 0.55);
  display: flex; justify-content: flex-end; z-index: 70;
}
.cart-backdrop[hidden] { display: none; }
.cart-panel {
  background: var(--paper); width: 100%; max-width: 420px; height: 100%;
  overflow-y: auto; padding: 20px 16px 28px; position: relative;
  box-shadow: -4px 0 24px rgba(0,0,0,0.25);
}

/* Filter drawer — same pattern as the cart drawer, mirrored to the left:
   backdrop + full-height panel + X. Pills match the basket chips. */
.filter-backdrop {
  position: fixed; inset: 0; background: rgba(28, 26, 23, 0.55);
  display: flex; justify-content: flex-start; z-index: 70;
}
.filter-backdrop[hidden] { display: none; }
.filter-panel {
  background: var(--paper); width: 100%; max-width: 420px; height: 100%;
  overflow-y: auto; padding: 20px 16px 28px; position: relative;
  box-shadow: 4px 0 24px rgba(0,0,0,0.25);
}
.filter-group { margin: 16px 0 4px; }
.filter-h {
  margin: 0 0 8px; font-size: 0.85rem; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
}
.filter-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-pill {
  border: 1px solid var(--border); background: #fff; border-radius: 999px;
  padding: 6px 11px; font-size: 0.85rem; cursor: pointer; font-family: inherit;
}
.filter-pill:hover { border-color: var(--green); }
.filter-pill.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }

/* Show more / less — the ranked list is capped at 64 until you ask for the rest. */
.show-more-wrap { text-align: center; margin: 16px 0 4px; }
.show-more-wrap .view-btn { padding: 10px 24px; font-size: 0.95rem; }
.show-more-wrap .view-btn[hidden] { display: none; }
#filter-clear { margin-top: 22px; }
.cart-line {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.cart-line-info { flex: 1; min-width: 0; }
.cart-line-name { font-weight: 800; font-size: 0.95rem; }
.cart-line-size { font-size: 0.78rem; color: var(--muted); }
.cart-store {
  margin-top: 6px; font-family: inherit; font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--border); border-radius: 8px; padding: 5px 6px;
  background: #fff; max-width: 210px;
}
.cart-line-right { text-align: right; flex-shrink: 0; }
.cart-qty { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.cart-qty-btn {
  width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border);
  background: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; font-family: inherit;
}
.cart-qty-btn:hover { border-color: var(--green); color: var(--green); }
.cart-qty-num { font-weight: 800; min-width: 18px; text-align: center; }
.cart-line-total { font-weight: 800; font-size: 1.05rem; margin-top: 4px; }
.cart-remove { border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 0.8rem; padding: 2px; }
.cart-remove:hover { color: var(--red); }
.cart-total-row {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 1.15rem; margin-top: 14px; padding-top: 12px; border-top: 2px solid var(--ink);
}
.cart-note { font-size: 0.85rem; color: var(--muted); margin: 8px 0 0; }
.add-btn {
  display: inline-block; margin-top: 8px; border: 1.5px solid var(--green); background: #fff;
  color: var(--green); border-radius: 999px; padding: 6px 12px; font-size: 0.85rem;
  font-weight: 800; cursor: pointer; font-family: inherit;
}
.add-btn:hover { background: var(--green); color: #fff; }
.add-btn.row-add { display: block; margin: 6px 0 0 auto; padding: 4px 10px; font-size: 0.8rem; }
.add-btn.modal-add { margin: 0 0 6px; }

/* Search the catalog */
.search-row { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; }
#item-search {
  flex: 1; font-family: inherit; font-size: 1rem; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 999px; background: #fff; min-width: 0;
}
#item-search:focus { outline: none; border-color: var(--green); }
.search-clear {
  border: 1px solid var(--border); background: #fff; border-radius: 50%;
  width: 34px; height: 34px; font-size: 0.9rem; cursor: pointer; font-family: inherit; flex-shrink: 0;
}
.search-clear[hidden] { display: none; }
.search-count { font-size: 0.9rem; color: var(--muted); margin: 4px 0 0; }
.search-count[hidden] { display: none; }

/* Add-to-cart qty stepper — shows the count right where you tapped Add */
.add-stepper {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 8px;
  border: 1.5px solid var(--green); border-radius: 999px; padding: 4px 6px;
  background: #fff; color: var(--green); font-weight: 800; font-size: 0.85rem;
}
.add-stepper .qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 0; background: var(--green);
  color: #fff; font-size: 1rem; font-weight: 800; cursor: pointer; font-family: inherit; line-height: 1;
}
.add-stepper .qty-num { min-width: 64px; text-align: center; }
.add-stepper.row-add { display: flex; margin: 6px 0 0 auto; width: max-content; }

/* Full cart page (cart.html) — Walmart-cart style: photo left, price + name right.
   Header matches the home page: blue, slim, lang toggle top-left,
   back link top-right, city pills below the title. */
.cart-page-head { background: var(--masthead); color: #fff; padding: 10px 14px 12px; text-align: center; }
.cart-head-inner { max-width: 860px; margin: 0 auto; }
.cart-page-head h1 { margin: 8px 0 4px; font-size: clamp(1.3rem, 5.5vw, 1.5rem); }
.cart-back { color: #fff; font-weight: 700; text-decoration: none; font-size: 0.9rem; }
.masthead-top .cart-back { border: 1px solid rgba(255,255,255,.65); border-radius: 999px; padding: 7px 13px; }
.cart-page { max-width: 860px; margin: 0 auto; padding: 12px 12px 150px; }
.cart-page-line { display: flex; gap: 12px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 12px; margin: 10px 0; }
.cart-page-img { width: 90px; height: 90px; object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 8px; }
.cart-page-info { flex: 1; min-width: 0; }
.cart-page-price { font-size: 1.5rem; font-weight: 800; }
.cart-page-unit { font-size: 0.85rem; color: var(--muted); font-weight: 400; }
.cart-page-name { font-weight: 700; font-size: 0.98rem; margin-top: 2px; }
.cart-page-size { font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.cart-page-actions { display: flex; gap: 16px; margin-top: 8px; }
.cart-link-btn { border: 0; background: transparent; padding: 0; font: inherit; font-size: 0.88rem; color: var(--ink); text-decoration: underline; cursor: pointer; }
.cart-link-btn:hover { color: var(--masthead-dark); }
.cart-page-right { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-empty { background: var(--paper); border: 1px solid var(--border); border-radius: 12px; padding: 20px; margin: 10px 0; text-align: center; }
.cart-sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; background: var(--paper);
  border-top: 1px solid var(--border); padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,0.08); z-index: 60;
}
.cart-sticky-bar[hidden] { display: none; }
.cart-sticky-inner { max-width: 860px; margin: 0 auto; }
.cart-sticky-total { display: flex; justify-content: space-between; align-items: baseline; font-size: 1.1rem; margin-bottom: 8px; }
.cart-sticky-total strong { font-size: 1.4rem; }
.cart-checkout {
  width: 100%; border: 0; border-radius: 999px; padding: 13px; font-size: 1.05rem;
  font-weight: 800; font-family: inherit; background: var(--blue); color: #fff; cursor: pointer;
}
.cart-checkout:disabled { background: #93a4c4; cursor: default; }
.cart-sticky-note { text-align: center; font-size: 0.8rem; color: var(--muted); margin: 6px 0 0; }
