/* Style "shelf tag" (loaded last, after desktop.css; approved from the mockup 2026-11-17).
   Same palette; flat surfaces instead of soft shadows under every card,
   hierarchy from solid colour blocks and 1.5px lines, and the one bold
   element is the price: Rubik numbers like a supermarket shelf tag, the
   saving in yellow on purple. Receipt motif: dashed rules in the breakdown.
   Skills: ui-ux-pro-max (Flat Design, rtl_level full; Rubik), frontend-design
   (no SaaS-card kit, no gradient washes, boldness in one place). */
/* Rubik is loaded with the other fonts in index.html */

:root {
  --shadow: none;
  --shadow-lg: none;
  --edge: inset 0 0 0 1.5px var(--line);
  --edge-strong: inset 0 0 0 1.5px #DCD3F3;
  --font-num: "Rubik", var(--font-he);
  --r: 16px; --r-lg: 22px;
}
html[lang="ar"] { --font-num: "Rubik", "Noto Sans Arabic", var(--font-he); }

/* ---------- type: headings and every price in Rubik ---------- */
.h-hero, .topbar h1, .sec-head h2, .welcome h1, .verdict b,
.savings .amount, .w-amount, .offer .total .v, .offer .who b, .ol .p b, .ol-sum .grand,
.pcard .pr b, .bcard .nm, .lcard h3, .dock .bar b, .shop-row .p, table.detail .pr {
  font-family: var(--font-num);
}
.h-hero { font-weight: 800; letter-spacing: -.01em; }
.offer .total .v, .savings .amount, .w-amount { font-weight: 900; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* ---------- flat surfaces: a line, not a shadow ---------- */
.pcard, .offer, .verdict, .bcard, .lcard, .tile, .icon-btn, .search, .data-note, .since,
.dock-list .dl, .shop-row, .import-row, .detail-wrap, .pill-select, .choice, .group, .premium-card, .about-card {
  box-shadow: var(--edge);
}
.search:focus-within { box-shadow: inset 0 0 0 2px var(--purple-300); }
.icon-btn { background: var(--surface); }
.tile .e, .bcard .ico { filter: none; }
.dock { box-shadow: 0 -1.5px 0 var(--line); background: var(--bg); }
.nav { background: var(--surface); backdrop-filter: none; border-top: 1.5px solid var(--line); }
.nav a[aria-current="page"] .ni { background: var(--purple); color: #fff; }
.toast { box-shadow: none; }

/* ---------- buttons: solid primary, tonal secondary ---------- */
.btn-primary { box-shadow: none; }
.btn-ghost { background: var(--lilac-50); box-shadow: none; color: var(--purple-600); }
.add-btn { box-shadow: none; }
.stepper button { box-shadow: inset 0 0 0 1.5px var(--line); }
.cat { background: var(--lilac-50); box-shadow: none; }
.cat[aria-pressed="true"] { background: var(--ink); }
.toggle, .filters label.sel { box-shadow: var(--edge); }

/* ---------- home: the saving is the shelf tag ---------- */
.savings { background: var(--purple); box-shadow: none; }
.savings .amount { color: var(--yellow); }
.savings .amount small { color: #fff; font-family: var(--font-he); font-weight: 700; }
.savings .btn { background: var(--yellow); color: var(--ink); }
.bcard { box-shadow: var(--edge); }
.city-chip { border: 0; box-shadow: var(--edge); }

/* ---------- compare: the winner is a solid block, the breakdown a receipt ---------- */
.offer.best { background: var(--mint-50); box-shadow: inset 0 0 0 2px var(--mint); }
.offer.best .total .v { color: var(--mint-800); }
.offer .expand { border-top: 1.5px dashed var(--line); }
.offer.best .expand { border-top-color: rgba(18, 128, 79, .3); }
.ol { border-bottom: 1.5px dashed var(--line); }
.offer.best .ol { border-bottom-color: rgba(18, 128, 79, .25); }
.ol-sum .grand { border-top: 2px solid var(--ink); padding-top: 8px; margin-top: 4px; }
.verdict { background: var(--surface); }
.tag { background: var(--lilac-50); }
.tag.promo, .tag.warn, .ol .pbadge, table.detail .pbadge { background: var(--yellow); color: var(--ink); }
.chain-badge { border-radius: var(--r-sm); }

/* ---------- onboarding ---------- */
.w-chip { box-shadow: var(--edge); }
.w-chip[aria-checked="true"] { box-shadow: none; }
.w-amount { color: var(--purple); }
.savings .amount { font-size: clamp(28px, 16.5cqi, 52px); }
/* the signature: the cheapest total is a yellow shelf tag */
.offer.best .total .v { background: var(--yellow); color: var(--ink); padding: 4px 9px 2px; border-radius: var(--r-sm); display: inline-block; font-size: clamp(20px, 6vw, 25px); }
.offer.best .total { display: grid; justify-items: end; gap: 4px; }

/* ---------- design review 2: fewer cards, structure instead of "A · B" ---------- */
/* product list: one surface with rows, not a stack of cards */
.plist { gap: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge); overflow: hidden; }
.plist .pcard { border-radius: 0; box-shadow: none; background: transparent; border-bottom: 1.5px solid var(--line); }
.plist .pcard:last-child { border-bottom: 0; }
.plist .empty-res { padding: var(--s6) var(--s4); }
/* the verdict is a sentence on the page, not a box */
.verdict { background: transparent; box-shadow: none; padding: 0; }
/* shopping list and the list summary: rows with rules */
.shop-group ul { gap: 0; background: var(--surface); border-radius: var(--r); box-shadow: var(--edge); overflow: hidden; }
.shop-row { box-shadow: none; border-radius: 0; background: transparent; border-bottom: 1.5px solid var(--line); }
.shop-group li:last-child .shop-row { border-bottom: 0; }
.dock-list { gap: 0; background: var(--surface); border-radius: var(--r-sm); box-shadow: var(--edge); }
.dock-list .dl { box-shadow: none; border-radius: 0; background: transparent; border-bottom: 1.5px solid var(--line); }
.dock-list .dl:last-child { border-bottom: 0; }
/* size as a small tag, brand after it */
.pcard .br { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pcard .sz { font-size: var(--t-xs); font-weight: 700; color: var(--ink); background: var(--lilac-50); border-radius: var(--r-xs); padding: 1px 7px; }
/* list summary: the count as a badge */
.dock .bar .count { display: inline-block; margin-inline-start: 6px; font-size: var(--t-sm); font-weight: 700; background: var(--lilac-50);
  color: var(--purple-600); border-radius: var(--r-pill); padding: 2px 10px; vertical-align: middle; }
/* store: name, then the address under it */
.offer .where { display: grid; gap: 1px; }
.offer .where b { font-weight: 700; color: var(--ink-2); }
.offer .where span { color: var(--ink-3); }
.shop-where { display: grid; gap: 2px; }
.shop-where span { color: var(--ink-3); font-size: var(--t-sm); }
/* home: "new list" next to "see all" */
.sec-actions { display: inline-flex; gap: var(--s4); align-items: center; }
.sec-actions .link { display: inline-flex; align-items: center; gap: 4px; }
.sec-actions .link svg { width: 18px; height: 18px; }
.city-chip svg { width: 16px; height: 16px; color: var(--purple); }
/* text fields look like fields (settings, onboarding) */
input.pref-select, .field-input { min-height: 44px; border: 1.5px solid #8E8AA8; border-radius: var(--r-sm); background: var(--surface);
  padding: 8px 12px; font: inherit; font-size: 16px; color: var(--ink); max-width: none; }
input.pref-select:focus-visible, .field-input:focus-visible { border-color: var(--purple); outline: 3px solid var(--lilac); outline-offset: 0; }
select.pref-select { box-shadow: var(--edge); background-color: var(--surface); }

/* ---------- tab bar: Liquid Glass (iOS 26 style), phones only ---------- */
/* A floating glass capsule over the content: translucent white, strong blur and
   saturation so colour behind it reads through, a light rim and a top
   highlight. The current tab is a brighter glass lozenge. Solid white where
   blur isn't supported or the user asked for less transparency. */
@media (max-width: 979px) {
  :root { --nav-h: 82px; }  /* the capsule floats 10px up: content and the list summary clear it */
  .nav {
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 24px); max-width: 416px;
    padding: 6px; gap: 2px;
    border: 0; border-radius: 30px;
    background: rgba(255, 255, 255, .62);
    -webkit-backdrop-filter: blur(22px) saturate(180%);
    backdrop-filter: blur(22px) saturate(180%);
    box-shadow:
      inset 0 0 0 1px rgba(255, 255, 255, .7),      /* the glass rim */
      inset 0 1px 0 rgba(255, 255, 255, .95),       /* top highlight */
      inset 0 -1px 0 rgba(23, 21, 47, .06),
      0 10px 30px rgba(40, 20, 110, .16),
      0 1px 3px rgba(40, 20, 110, .10);
  }
  /* the sheen: brighter at the top, like light on a curved surface */
  .nav::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, 0) 55%);
  }
  .nav a { position: relative; z-index: 1; border-radius: 24px; min-height: 56px; color: var(--ink-2);
    transition: background-color .2s var(--ease-out, ease), color .2s var(--ease-out, ease), transform .12s var(--ease-out, ease); }
  .nav a[aria-current="page"] {
    color: var(--purple-600);
    background: rgba(255, 255, 255, .78);
    box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(101, 37, 245, .10), 0 2px 10px rgba(60, 30, 140, .14);
  }
  .nav a[aria-current="page"] .ni, .nav .ni { background: transparent; color: inherit; }
  .nav .ni { height: 26px; }
  /* the list summary floats on the same glass, just above the bar */
  .dock { bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0px)); }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  @media (max-width: 979px) { .nav { background: rgba(255, 255, 255, .96); } }
}
@media (max-width: 979px) and (prefers-reduced-transparency: reduce) {
  .nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav::before { display: none; }
}
