/* === products (agent 3) === */
/* Product finder. Uses only theme variables from app.css (no hard-coded colors). */
.prd-page { gap: var(--space-4); }
.prd-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.prd-header h1 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); line-height: 1.1; }
.prd-header .muted { font-size: var(--fs-sm); }

/* search */
.prd-search { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); }
.prd-search-row { display: flex; gap: var(--space-2); align-items: center; }
.prd-q.input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 var(--space-5);
  border-radius: var(--radius-pill); border-color: transparent; background: var(--surface-2);
  box-shadow: 0 1px 0 var(--bg), 0 0 0 1px var(--muted) inset;
  font-size: var(--fs-md);
}
.prd-q.input:hover { box-shadow: 0 1px 0 var(--bg), 0 0 0 1px var(--text) inset; }
.prd-q.input:focus-visible { box-shadow: 0 0 0 2px var(--text) inset, var(--focus-ring); }
.prd-go.btn { min-height: 48px; border-radius: var(--radius-pill); padding: 0 var(--space-5); text-transform: uppercase; letter-spacing: 1.4px; font-weight: var(--fw-bold); }
.prd-chips, .prd-suggest { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.prd-suggest { justify-content: center; margin-top: var(--space-2); }
.prd-chip.chip { border-color: transparent; background: var(--surface-2); color: var(--text); font-weight: var(--fw-bold); }
.prd-chip.chip:hover { background: color-mix(in srgb, var(--text) 12%, var(--surface-2)); }

.prd-note-text { font-size: var(--fs-xs); line-height: 1.5; }
.prd-note-text .badge-sample { margin-right: var(--space-1); }
.prd-note-text a { color: var(--text); font-weight: var(--fw-bold); }

/* layout: filters bar above full-width results */
.prd-layout { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.prd-main { display: flex; flex-direction: column; gap: var(--space-4); min-width: 0; }
.prd-filter-toggle { display: none; }
.prd-filters.card { display: flex; flex-wrap: wrap; align-items: flex-end; gap: var(--space-3); padding: var(--space-3) var(--space-4); }
.prd-field { display: flex; flex-direction: column; gap: 4px; min-width: 130px; flex: 1 1 130px; border: 0; padding: 0; margin: 0; }
.prd-field > label, .prd-field > legend { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); padding: 0; }
.prd-field .select, .prd-field .input { min-height: 38px; font-size: var(--fs-sm); border-radius: var(--radius-pill); border-color: transparent; background-color: var(--surface-2); box-shadow: 0 0 0 1px var(--line) inset; }
.prd-field .select { padding-left: var(--space-3); }
.prd-price { flex: 1.4 1 190px; }
.prd-price-row { display: flex; align-items: center; gap: var(--space-2); }
.prd-price-row .input { min-width: 0; }
.prd-clear.btn { min-height: 38px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 1.4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); }

.prd-count { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); }
.prd-intent-tags { display: inline-flex; flex-wrap: wrap; gap: var(--space-1); }

/* results grid: 5 -> 3 -> 2 -> 1 columns, by available width */
.prd-results { container-type: inline-size; min-width: 0; }
.prd-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@container (min-width: 420px) { .prd-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@container (min-width: 660px) { .prd-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@container (min-width: 1040px) { .prd-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* product card (album-card style) */
.prd-card {
  position: relative; display: flex; flex-direction: column; gap: var(--space-2); min-width: 0;
  background: var(--surface); border-radius: 8px; padding: var(--space-3);
  box-shadow: var(--shadow);
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.prd-card:hover { background: var(--surface-2); box-shadow: var(--shadow-lg); }
.prd-card.prd-top { box-shadow: 0 0 0 2px var(--good) inset, var(--shadow-lg); }
.prd-card.is-comparing { box-shadow: 0 0 0 2px var(--text) inset, var(--shadow); }
.prd-card.prd-top.is-comparing { box-shadow: 0 0 0 2px var(--good) inset, 0 0 0 4px var(--text) inset, var(--shadow-lg); }
.prd-card-top { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 36px; }
.prd-cat { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); text-transform: uppercase; letter-spacing: 1.4px; }
.prd-ribbon {
  display: inline-flex; align-items: center; padding: 3px var(--space-2); border-radius: var(--radius-pill);
  background: var(--good); color: var(--accent-ink); font-size: var(--fs-xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: 1px; white-space: nowrap;
}
.prd-icons { display: flex; gap: var(--space-1); flex-shrink: 0; }
.prd-circle {
  width: 36px; height: 36px; border-radius: 50%; border: 0; padding: 0;
  display: inline-grid; place-items: center; cursor: pointer;
  background: var(--surface-2); color: var(--text); font-size: var(--fs-md); line-height: 1;
  box-shadow: 0 0 0 1px var(--line) inset;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease);
}
.prd-circle:hover:not(:disabled) { transform: scale(1.06); background: color-mix(in srgb, var(--text) 14%, var(--surface-2)); }
.prd-circle:disabled { opacity: 0.4; cursor: not-allowed; }
.prd-circle:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.prd-circle.is-on { background: var(--text); color: var(--bg); box-shadow: none; }
.prd-star.is-on { background: var(--text); color: var(--bg); }

.prd-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); line-height: 1.3; color: var(--text); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.prd-model { font-size: var(--fs-xs); color: var(--muted); margin-top: -4px; }
.prd-rating { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); font-weight: var(--fw-bold); }
.prd-stars { --r: 80%; position: relative; display: inline-block; width: 70px; height: 12px; font-size: 12px; line-height: 12px; letter-spacing: 2px; }
.prd-stars::before, .prd-stars::after { content: "★★★★★"; position: absolute; inset: 0; overflow: hidden; white-space: nowrap; }
.prd-stars::before { color: var(--line); }
.prd-stars::after { color: var(--text); width: var(--r); }
.prd-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.prd-tags .tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; }

.prd-price-block { margin-top: auto; padding-top: var(--space-2); }
.prd-best-label { font-size: 11px; font-weight: var(--fw-bold); color: var(--muted); text-transform: uppercase; letter-spacing: 1.2px; }
.prd-best { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: 1.15; font-variant-numeric: tabular-nums; color: var(--text); }
.prd-top .prd-best { color: var(--good); }
.prd-best-at { font-size: var(--fs-xs); color: var(--muted); }
.prd-best-at strong { color: var(--text); }
.prd-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.prd-badges .tag { font-size: 11px; }

/* compact offer list */
.prd-offers { width: 100%; border-collapse: collapse; font-size: var(--fs-xs); margin-top: var(--space-1); }
.prd-offers th, .prd-offers td { padding: 6px 0; border-top: 1px solid var(--line); vertical-align: top; text-align: left; font-weight: var(--fw-regular); }
.prd-offers th { color: var(--text); padding-right: var(--space-2); }
.prd-offers th a { color: inherit; text-decoration: none; font-weight: var(--fw-bold); }
.prd-offers th a:hover { text-decoration: underline; }
.prd-offers th a:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.prd-offers td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prd-offer-note { display: block; font-size: 11px; color: var(--muted); font-weight: var(--fw-regular); }
.prd-was { display: block; font-size: 11px; color: var(--muted); }
.prd-win th a, .prd-win td { color: var(--good); font-weight: var(--fw-bold); }
.prd-win .prd-offer-note { color: var(--good); font-weight: var(--fw-bold); }
.prd-oos th, .prd-oos td { opacity: 0.45; }
.prd-oos td { text-decoration: line-through; }

/* empty / loading */
.prd-empty { gap: var(--space-2); border-style: none; background: var(--surface); }
.prd-empty-title { font-size: var(--fs-lg); }
.prd-skel { min-height: 160px; background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: prd-shimmer 1.2s linear infinite; border: 0; }
@keyframes prd-shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .prd-skel { animation: none; } .prd-circle, .prd-card { transition: none; } }

/* compare */
.prd-compare.card { padding: var(--space-4); box-shadow: var(--shadow-lg); border: 0; }
.prd-compare:focus { outline: none; }
.prd-compare-head { justify-content: space-between; margin-bottom: var(--space-3); }
.prd-compare-head h2, .prd-watch h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.prd-compare-head .btn { border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 1.4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); }
.prd-compare-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 calc(-1 * var(--space-2)); }
.prd-compare-table { min-width: 520px; }
.prd-compare-table th, .prd-compare-table td { padding: var(--space-2); font-size: var(--fs-xs); vertical-align: top; }
.prd-compare-table thead th { text-transform: none; letter-spacing: 0; color: var(--text); font-size: var(--fs-xs); min-width: 140px; }
.prd-compare-table tbody th { color: var(--muted); white-space: nowrap; text-transform: none; letter-spacing: 0; font-weight: var(--fw-bold); position: sticky; left: 0; background: var(--surface); }
.prd-best-cell { color: var(--good); font-weight: var(--fw-bold); background: color-mix(in srgb, var(--good) 12%, transparent); }
.prd-sub { font-size: 11px; font-weight: var(--fw-regular); margin-top: 2px; }

/* watchlist */
.prd-watch.card { padding: var(--space-4); border: 0; }
.prd-watch h2 { margin-bottom: var(--space-2); }
.prd-watch-list { list-style: none; margin: 0; padding: 0; }
.prd-watch-item { display: grid; grid-template-columns: 1fr auto auto; gap: var(--space-3); align-items: center; padding: var(--space-2) 0; border-top: 1px solid var(--line); }
.prd-watch-item:first-child { border-top: 0; }
.prd-watch-info { min-width: 0; }
.prd-link { background: none; border: 0; padding: 0; color: var(--text); font: inherit; font-size: var(--fs-sm); font-weight: var(--fw-bold); text-align: left; cursor: pointer; }
.prd-link:hover { text-decoration: underline; }
.prd-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
.prd-watch-price { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.prd-watch-now { font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.prd-x-btn.btn { min-height: 32px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 1.4px; font-size: 11px; font-weight: var(--fw-bold); padding: 0 var(--space-3); }

/* compare tray */
.prd-tray {
  position: sticky; bottom: var(--space-3); z-index: 20;
  background: var(--surface-2); border-radius: 8px; padding: var(--space-2) var(--space-3);
  box-shadow: var(--shadow-lg);
}
.prd-tray[hidden] { display: none; }
.prd-tray-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
.prd-tray-items { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; min-width: 0; }
.prd-tray-chip.chip { cursor: default; color: var(--text); background: var(--surface); border-color: transparent; padding-right: 4px; font-size: var(--fs-xs); }
.prd-x { width: 24px; height: 24px; border-radius: 50%; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: var(--fs-md); line-height: 1; }
.prd-x:hover { color: var(--text); background: var(--surface-2); }
.prd-x:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.prd-tray-hint { font-size: var(--fs-xs); }
.prd-tray-btns { gap: var(--space-2); flex-wrap: nowrap; }
.prd-tray-btns .btn { min-height: 38px; border-radius: var(--radius-pill); text-transform: uppercase; letter-spacing: 1.4px; font-size: var(--fs-xs); font-weight: var(--fw-bold); }

/* mobile */
@media (max-width: 699px) {
  /* keep the compare tray above the shell's fixed bottom tab bar */
  .prd-tray { bottom: calc(var(--tabbar-h, 64px) + var(--space-2) + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 720px) {
  .prd-filter-toggle.btn {
    display: inline-flex; align-self: flex-start; min-height: 36px; border-radius: var(--radius-pill);
    background: var(--surface-2); color: var(--text); border-color: transparent;
    text-transform: uppercase; letter-spacing: 1.4px; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  }
  .prd-filterwrap { display: flex; flex-direction: column; gap: var(--space-2); }
  .prd-filters[data-open="false"] { display: none; }
  .prd-field { flex: 1 1 140px; }
  .prd-price { flex-basis: 100%; }
}
@media (max-width: 480px) {
  .prd-search { padding: var(--space-3); }
  .prd-q.input { padding: 0 var(--space-4); font-size: var(--fs-sm); }
  .prd-go.btn { padding: 0 var(--space-4); }
  .prd-header h1 { font-size: var(--fs-xl); }
  .prd-watch-item { grid-template-columns: auto 1fr auto; }
  .prd-watch-item .prd-x-btn { grid-column: 2 / -1; justify-self: start; }
  .prd-tray-btns { width: 100%; }
  .prd-tray-btns .btn { flex: 1; }
}
/* product art / photos (art-frame from app.css) */
.prd-media { margin-bottom: var(--space-1); }
@container (max-width: 419px) { .prd-media { aspect-ratio: auto; height: 150px; } }
.prd-cmp-thumb { width: 96px; margin-bottom: var(--space-2); }
.prd-watch-item { grid-template-columns: auto minmax(0, 1fr) auto auto; }
.prd-watch-thumb { width: 44px; flex: none; }
.prd-dev-hint { white-space: nowrap; }
@media (max-width: 480px) {
  .prd-dev-hint { white-space: normal; }
  .prd-watch-item { grid-template-columns: auto minmax(0, 1fr) auto; }
}
/* === end products === */

/* === grocery (agent 2) === */
.gro-page { --gro-gap: var(--space-4); }
.gro-header { align-items: flex-start; }
.gro-h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); }
.gro-label { display: block; font-size: var(--fs-sm); font-weight: var(--fw-bold); margin-bottom: var(--space-2); }
.gro-link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--text); font-size: var(--fs-xs); font-weight: var(--fw-bold);
  text-decoration: underline; text-underline-offset: 2px;
}
.gro-link:hover { color: var(--accent-hover); }
.gro-link:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--radius-xs); }

/* layout: stacked on mobile, list | compare on wide screens */
.gro-layout { display: grid; gap: var(--gro-gap); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) {
  .gro-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .gro-col-compare { position: sticky; top: var(--space-4); }
}

/* add form + autocomplete */
.gro-add-row { display: flex; gap: var(--space-2); align-items: stretch; }
.gro-combo { position: relative; flex: 1; min-width: 0; }
.gro-add-btn { flex: none; }
.gro-suggest {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px);
  margin: 0; padding: var(--space-1); list-style: none;
  background: var(--surface-3); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  max-height: 320px; overflow-y: auto;
}
.gro-opt {
  display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-xs);
}
.gro-opt:hover, .gro-opt[aria-selected="true"] { background: var(--surface-hover); }
.gro-opt[aria-selected="true"] { box-shadow: var(--text) 2px 0 0 inset; }
.gro-opt-name { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text); }
.gro-opt-meta { font-size: var(--fs-xs); color: var(--muted); }
.gro-opt-free .gro-opt-name { font-weight: var(--fw-regular); }

/* list */
.gro-list-head, .gro-list-foot, .gro-compare-head, .gro-ads-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap;
}
.gro-list-head { margin-bottom: var(--space-2); }
.gro-count { font-size: var(--fs-xs); }
.gro-list { list-style: none; margin: 0; padding: 0; }
.gro-line { padding: var(--space-2) 0; }
.gro-line + .gro-line { box-shadow: var(--line) 0 -1px 0; }
.gro-line-row { display: flex; align-items: center; gap: var(--space-3); min-height: var(--control-h); }
.gro-check {
  flex: none; width: 22px; height: 22px; margin: 0; cursor: pointer;
  appearance: none; -webkit-appearance: none; border-radius: var(--radius-circle);
  box-shadow: var(--line-input) 0 0 0 2px inset; display: grid; place-items: center;
  transition: background var(--dur) var(--ease);
}
.gro-check:checked { background: var(--text); box-shadow: none; }
.gro-check:checked::after {
  content: ""; width: 6px; height: 11px; margin-top: -2px;
  border: solid var(--bg); border-width: 0 2.5px 2.5px 0; transform: rotate(45deg);
}
.gro-check:focus-visible { outline: none; box-shadow: var(--line-input) 0 0 0 2px inset, var(--focus-ring); }
.gro-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gro-line-name {
  font-size: var(--fs-sm); font-weight: var(--fw-bold); cursor: pointer;
  overflow-wrap: anywhere;
}
.gro-line-sub { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px var(--space-2); font-size: var(--fs-xs); }
.gro-line.is-checked .gro-line-name { color: var(--muted); text-decoration: line-through; }
.gro-qty { display: flex; align-items: center; gap: var(--space-1); flex: none; }
.gro-qty-val { min-width: 2ch; text-align: center; font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.gro-icon-btn {
  flex: none; width: var(--control-sm); height: var(--control-sm); padding: 0; border: 0;
  display: inline-grid; place-items: center; cursor: pointer;
  border-radius: var(--radius-circle); background: var(--surface-2); color: var(--text);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.gro-icon-btn:hover:not(:disabled) { background: var(--surface-hover); transform: scale(1.06); }
.gro-icon-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.gro-icon-btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.gro-del { background: transparent; color: var(--muted); }
.gro-del:hover:not(:disabled) { color: var(--bad); background: var(--bad-soft); }
.gro-picker { padding: var(--space-2) 0 var(--space-1) calc(22px + var(--space-3)); display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-xs); }
.gro-picker-label { font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--muted); }
.gro-list-foot { margin-top: var(--space-3); font-size: var(--fs-xs); }
.gro-clear { min-height: var(--control-sm); padding: 0 var(--space-3); font-size: var(--fs-xs); }

/* empty */
.gro-empty-title { font-size: var(--fs-md); color: var(--text); }
.gro-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-2); margin-top: var(--space-2); }

/* compare */
.gro-compare { display: flex; flex-direction: column; gap: var(--space-4); }
.gro-status { font-size: var(--fs-xs); }
.gro-sample-note { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); font-size: var(--fs-xs); }
.gro-compare-empty { font-size: var(--fs-sm); }
.gro-toggle {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-1);
  padding: var(--space-1); border-radius: var(--radius-pill); background: var(--surface-2);
}
.gro-seg {
  min-height: var(--control-sm); border: 0; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; color: var(--muted);
  font-size: var(--fs-xs); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: 1px;
}
.gro-seg[aria-pressed="true"] { background: var(--text); color: var(--bg); }
.gro-seg:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.gro-winner {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-4); border-radius: var(--radius);
  background: linear-gradient(160deg, var(--hero-from), var(--hero-to)); box-shadow: var(--shadow-lg);
}
.gro-winner-main { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 2px var(--space-3); }
.gro-winner-label {
  grid-column: 1 / -1; font-size: var(--fs-xs); font-weight: var(--fw-bold);
  text-transform: uppercase; letter-spacing: var(--eyebrow-tracking); color: var(--muted);
}
.gro-winner-store { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); }
.gro-winner-total { font-size: var(--fs-xl); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; justify-self: end; }
.gro-winner-main > .gro-winner-total:nth-child(2) { justify-self: start; }
.gro-savings { color: var(--good); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.gro-warn-text { color: var(--warn); font-size: var(--fs-xs); }
.gro-budget-btn { align-self: flex-start; margin-top: var(--space-1); }

.gro-stores, .gro-split, .gro-blines { list-style: none; margin: 0; padding: 0; }
.gro-stores { display: flex; flex-direction: column; gap: var(--space-2); }
.gro-store { border-radius: var(--radius); background: var(--surface-2); overflow: hidden; }
.gro-store.is-winner { box-shadow: var(--good) 0 0 0 1px inset; }
.gro-store-head {
  width: 100%; display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3); border: 0; background: transparent; color: inherit; text-align: left; cursor: pointer;
}
.gro-store-head:hover { background: var(--surface-hover); }
.gro-store-head:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--focus) inset; }
.gro-rank {
  flex: none; width: 28px; height: 28px; display: grid; place-items: center;
  border-radius: var(--radius-circle); background: var(--surface-3);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
}
.gro-store.is-winner .gro-rank { background: var(--accent); color: var(--accent-ink); }
.gro-store-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gro-store-name { font-size: var(--fs-sm); font-weight: var(--fw-bold); display: inline-flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.gro-store-meta { font-size: var(--fs-xs); overflow-wrap: anywhere; }
.gro-missing { color: var(--warn); }
.gro-store-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.gro-store-total { font-size: var(--fs-md); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.gro-store.is-winner .gro-store-total { color: var(--good); }
.gro-store-diff { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }
.gro-chev { flex: none; color: var(--muted); transition: transform var(--dur) var(--ease); }
.gro-store-head[aria-expanded="true"] .gro-chev { transform: rotate(180deg); }
.gro-store-body { padding: 0 var(--space-3) var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.gro-missing-note { font-size: var(--fs-xs); color: var(--warn); }
.gro-store-budget { align-self: flex-start; min-height: var(--control-sm); padding: 0 var(--space-3); font-size: var(--fs-xs); }

.gro-bline { display: flex; justify-content: space-between; gap: var(--space-3); padding: var(--space-2) 0; }
.gro-bline + .gro-bline { box-shadow: var(--line) 0 -1px 0; }
.gro-bline-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.gro-bline-name { font-size: var(--fs-sm); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.gro-bline-meta { font-size: var(--fs-xs); }
.gro-bline-store { color: var(--text); font-weight: var(--fw-bold); }
.gro-bline-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); margin-top: 2px; }
.gro-bline-price { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; text-align: right; }
.gro-bline-total { font-size: var(--fs-sm); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.gro-bline-each { font-size: var(--fs-xs); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gro-was { font-size: var(--fs-micro); }

.gro-split { display: flex; flex-direction: column; gap: var(--space-2); }
.gro-split-store { border-radius: var(--radius); background: var(--surface-2); padding: var(--space-3); }
.gro-split-head { display: grid; grid-template-columns: 1fr auto; gap: 2px var(--space-3); align-items: baseline; margin-bottom: var(--space-1); }
.gro-split-head .gro-store-meta { grid-row: 2; }
.gro-split-sub { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.gro-error { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); color: var(--bad); font-size: var(--fs-sm); }

/* weekly ads */
.gro-ads { display: flex; flex-direction: column; gap: var(--space-4); }
.gro-ads [data-region="ads"] { display: flex; flex-direction: column; }
.gro-ads-week { font-size: var(--fs-xs); margin-top: 2px; }
.gro-ads-tools { display: flex; flex-direction: column; gap: var(--space-3); }
.gro-ads-search { max-width: 420px; }
.gro-ads-chips {
  display: flex; gap: var(--space-2); overflow-x: auto; padding: 2px 2px var(--space-1);
  scrollbar-width: thin; -webkit-overflow-scrolling: touch;
}
.gro-ads-chip { flex: none; }
.gro-chip-n { font-size: var(--fs-micro); opacity: 0.7; font-variant-numeric: tabular-nums; }
.gro-deals {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
}
.gro-deal {
  display: flex; flex-direction: column; gap: var(--space-1);
  padding: var(--space-3) var(--space-4) var(--space-4); border-radius: var(--radius);
  background: var(--surface-2); transition: background var(--dur) var(--ease);
}
.gro-deal:hover { background: var(--surface-3); box-shadow: var(--shadow); }
.gro-deal-store { font-size: var(--fs-micro); font-weight: var(--fw-bold); text-transform: uppercase; letter-spacing: var(--eyebrow-tracking); color: var(--muted); }
.gro-deal-title { font-size: var(--fs-sm); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.gro-deal-price { font-size: var(--fs-xl); font-weight: var(--fw-bold); line-height: var(--lh-tight); margin-top: var(--space-1); font-variant-numeric: tabular-nums; }
.gro-deal-price.is-deal { color: var(--good); }
.gro-deal-meta { font-size: var(--fs-xs); }
.gro-deal-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.gro-tag-coupon { background: var(--info-soft); color: var(--info); }
.gro-deal-action { margin-top: auto; padding-top: var(--space-2); }
.gro-deal-add { min-height: var(--control-sm); padding: 0 var(--space-4); font-size: var(--fs-xs); letter-spacing: 1px; }
.gro-deal-instore { font-size: var(--fs-xs); }
.gro-ads-none { font-size: var(--fs-sm); }
.gro-ads-more { align-self: center; margin-top: var(--space-3); }

@media (max-width: 480px) {
  .gro-add-btn { padding: 0 var(--space-4); }
  .gro-line-row { gap: var(--space-2); }
  .gro-winner-store, .gro-winner-total { font-size: var(--fs-lg); }
  .gro-store-head { gap: var(--space-2); padding: var(--space-3) var(--space-2); }
  .gro-deals { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
  .gro-deal { padding: var(--space-3); }
  .gro-deal-price { font-size: var(--fs-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .gro-icon-btn, .gro-chev, .gro-check, .gro-deal { transition: none; }
}
/* category thumbnails (art-thumb from app.css) */
.gro-opt { flex-direction: row; align-items: center; gap: var(--space-3); }
.gro-opt-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gro-thumb { width: 36px; height: 36px; }
.gro-line-thumb { width: 40px; height: 40px; }
.gro-line.is-checked .gro-line-thumb { opacity: 0.5; }
.gro-deal-head { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.gro-deal-head { margin-bottom: var(--space-1); }
.gro-deal-head .gro-thumb { width: 44px; height: 44px; background: var(--surface-3); }
.gro-deal-head .gro-deal-store { min-width: 0; overflow-wrap: anywhere; }
.gro-deal:hover .gro-deal-head .art-thumb .art-bg { fill: var(--surface-hover); }
@media (max-width: 480px) {
  .gro-line-thumb { width: 36px; height: 36px; }
  .gro-deal-head { gap: var(--space-2); }
  .gro-deal-head .gro-thumb { width: 36px; height: 36px; }
}
/* === end grocery === */
