@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #eef2f6;
  --surface: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --ink: #0f172a;
  --muted: #526074;
  --line: #d9e0ea;
  --line-strong: #b6c4d8;
  --primary: #0f766e;
  --primary-strong: #0b4f4f;
  --accent: #ea580c;
  --accent-soft: #ffedd9;
  --shadow: 0 20px 52px rgba(15, 23, 42, 0.08);
  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 0% 0%, #dbeafe 0%, transparent 34%),
    radial-gradient(circle at 100% 0%, #dcfce7 0%, transparent 28%),
    radial-gradient(circle at 50% 120%, #ffedd5 0%, transparent 32%),
    linear-gradient(165deg, #edf2f8 0%, #f4f7fb 38%, #f8fafc 100%);
  letter-spacing: 0.01em;
}

a {
  color: #0f5f8e;
}

a:hover {
  color: #0b4b70;
}

.topbar-wrap {
  width: min(1220px, 94vw);
  margin: 18px auto 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgba(167, 179, 198, 0.42);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(10px);
}

.topbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  text-decoration: none;
  color: var(--ink);
}

.topbar-brand::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0f766e, #06b6d4);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.14);
}

.topbar-links {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.topbar-link {
  border: 1px solid rgba(167, 179, 198, 0.46);
  border-radius: 999px;
  background: #fff;
  color: #1e293b;
  text-decoration: none;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
}

.topbar-link:hover {
  border-color: rgba(15, 118, 110, 0.35);
  color: #0b4f4f;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  z-index: -1;
  filter: blur(36px);
  opacity: 0.55;
  animation: drift 9s ease-in-out infinite alternate;
}

.ambient--one {
  width: 240px;
  height: 240px;
  right: 4vw;
  top: 8vh;
  background: #c8ecd6;
}

.ambient--two {
  width: 180px;
  height: 180px;
  left: -70px;
  top: 45vh;
  background: #ffd39f;
  animation-delay: 1.2s;
}

.dashboard {
  width: min(1360px, 95vw);
  margin: 16px auto 44px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(320px, 0.82fr) minmax(480px, 1.18fr);
}

.panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(247, 250, 255, 0.85));
  border: 1px solid rgba(182, 196, 216, 0.46);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  backdrop-filter: blur(9px);
}

.panel--full {
  grid-column: 1 / -1;
}

.panel--shopping .product-results {
  max-height: 72vh;
}

.panel--shopping .shopping-list {
  max-height: none;
}

.shopping-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 320px);
  gap: 12px;
  align-items: start;
}

.shopping-cart-panel {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 9px;
  min-height: 0;
  max-height: 64vh;
  width: min(100%, 320px);
  justify-self: end;
  display: flex;
  flex-direction: column;
}

.shopping-cart-panel .list-head {
  margin-top: 0;
}

.shopping-cart-panel .shopping-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 56vh;
  overflow: auto;
}

.hero {
  width: min(1220px, 94vw);
  margin: 12px auto 0;
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 20px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-color: rgba(167, 179, 198, 0.5);
  box-shadow: 0 28px 58px rgba(15, 23, 42, 0.11);
  backdrop-filter: blur(10px);
  padding: 14px 16px;
  background:
    radial-gradient(circle at 6% 10%, rgba(191, 219, 254, 0.9) 0, rgba(191, 219, 254, 0) 37%),
    radial-gradient(circle at 96% 92%, rgba(209, 250, 229, 0.75) 0, rgba(209, 250, 229, 0) 33%),
    linear-gradient(150deg, rgba(255, 255, 255, 0.97), rgba(245, 248, 253, 0.9));
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.hero::before {
  width: 260px;
  height: 260px;
  right: -115px;
  top: -130px;
  background: rgba(56, 189, 248, 0.2);
}

.hero::after {
  width: 220px;
  height: 220px;
  left: -90px;
  bottom: -120px;
  background: rgba(34, 197, 94, 0.15);
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero--single {
  grid-template-columns: 1fr;
  align-items: start;
}

.hero-content {
  display: grid;
  gap: 7px;
  max-width: 760px;
}

.hero h1 {
  margin: 0;
  max-width: 24ch;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.45rem, 2vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  font-weight: 700;
  color: #0f172a;
}

.eyebrow {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border: 1px solid rgba(37, 99, 235, 0.28);
  border-radius: 999px;
  background: rgba(219, 234, 254, 0.72);
  text-transform: uppercase;
  font-size: 0.67rem;
  letter-spacing: 0.1em;
  color: #1e3a8a;
  font-weight: 700;
}

.hero-copy {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.35;
  font-size: 0.86rem;
}

.hero-links {
  margin-top: 16px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
  color: #0f5f8e;
}

.text-link::after {
  content: '\2192';
  transition: transform 130ms ease;
}

.text-link:hover::after {
  transform: translateX(2px);
}

.hero-metrics {
  display: grid;
  gap: 9px;
  align-content: start;
  justify-self: stretch;
}

.language-switch {
  display: grid;
  gap: 6px;
  width: 100%;
  max-width: 240px;
  padding: 11px;
  border-radius: 13px;
  border: 1px solid rgba(167, 179, 198, 0.46);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.language-switch label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.language-switch select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  font-size: 0.86rem;
  background: #fff;
  color: var(--ink);
}

.metric {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  padding: 11px 12px;
  border: 1px solid rgba(167, 179, 198, 0.46);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.8);
}

.hero-metrics .hint {
  margin: 0;
  padding: 10px 12px;
  border: 1px dashed rgba(167, 179, 198, 0.68);
  border-radius: 13px;
  background: rgba(248, 250, 253, 0.84);
}

h2 {
  margin: 0 0 12px;
  font-size: 1.11rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

h3,
h4,
p {
  margin: 0;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
}

.grid-2 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

input {
  width: 100%;
  border-radius: 13px;
  border: 1px solid rgba(182, 196, 216, 0.8);
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

select {
  width: 100%;
  border-radius: 13px;
  border: 1px solid rgba(182, 196, 216, 0.8);
  padding: 11px 12px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

input:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

select:focus {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.input-with-clear {
  position: relative;
}

.input-with-clear input {
  padding-right: 40px;
}

.input-clear {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #cad6e6;
  background: #ffffff;
  color: #41556f;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-clear[hidden] {
  display: none;
}

.inline-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid rgba(167, 179, 198, 0.56);
  border-radius: 12px;
  padding: 9px 13px;
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.btn:disabled {
  opacity: 0.52;
  transform: none;
  cursor: not-allowed;
}

.btn--primary {
  border-color: transparent;
  background: linear-gradient(135deg, #0f766e, #0891b2);
  color: #fff;
}

.btn--accent {
  border-color: transparent;
  background: linear-gradient(135deg, #ea580c, #f59e0b);
  color: #fff;
}

.btn--ghost {
  background: #fff;
  border-color: rgba(167, 179, 198, 0.66);
  color: #1e293b;
}

.btn--soft {
  background: #edf4ff;
  border-color: #c9d6ea;
  color: #0f4c81;
}

.btn--icon {
  width: 34px;
  height: 34px;
  padding: 0;
  font-size: 1.1rem;
  line-height: 1;
}

.btn--icon-sm {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 0.95rem;
  line-height: 1;
}

.chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid #cad6e6;
  padding: 5px 12px;
  background: #f3f7fd;
  color: #1e3a63;
  font-size: 0.79rem;
}

.chip--info {
  margin-top: 12px;
}

.chain-block {
  margin-top: 14px;
}

.chain-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-panels {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.selection-panels--stack {
  grid-template-columns: 1fr;
}

.selection-board {
  border: 1px solid rgba(182, 196, 216, 0.7);
  border-radius: 16px;
  background: #fff;
  padding: 10px;
}

.selection-board h3 {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.selection-board-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.selection-square {
  border: 1px solid #cfdae9;
  border-radius: 13px;
  background: linear-gradient(180deg, #f8fbff, #f3f7fd);
  display: grid;
  gap: 3px;
  text-align: left;
  padding: 8px;
  cursor: pointer;
  min-height: 64px;
  transition: border-color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.selection-square:hover {
  border-color: #9db7d8;
  background: #edf4ff;
  transform: translateY(-1px);
}

.selection-square span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}

.selection-square small {
  font-size: 0.72rem;
  color: var(--muted);
}

.selection-square strong {
  justify-self: end;
  align-self: end;
  color: #334a66;
}

#stores-selected-retailer-board {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#stores-selected-retailer-board .selection-square {
  min-height: 34px;
  padding: 5px 9px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#stores-selected-retailer-board .selection-square span {
  font-size: 0.76rem;
  line-height: 1;
}

#stores-selected-retailer-board .selection-square strong {
  align-self: center;
  justify-self: auto;
  font-size: 0.9rem;
  line-height: 1;
}

.chip-toggle {
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.chip-toggle.is-active {
  background: linear-gradient(135deg, #dbeafe, #dcfce7);
  border-color: #8bb7d6;
  color: #17406f;
}

.store-chip-board {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 6px 10px;
}

.selection-chip strong {
  font-size: 0.95rem;
  line-height: 1;
}

.hint {
  margin-top: 7px;
  color: var(--muted);
  font-size: 0.82rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.store-list {
  margin-top: 12px;
  border: 1px solid rgba(182, 196, 216, 0.7);
  background: linear-gradient(180deg, #f9fbff, #f4f8fd);
  border-radius: 16px;
  overflow: auto;
  max-height: 255px;
}

.store-item {
  padding: 10px 12px;
  border-bottom: 1px solid #dce5f0;
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 10px;
  align-items: start;
}

.store-item:last-child {
  border-bottom: 0;
}

.store-item h4 {
  font-size: 0.95rem;
}

.store-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.79rem;
}

.store-distance {
  color: #39527a;
  font-weight: 600;
}

.store-item-actions {
  display: grid;
  gap: 4px;
  justify-items: end;
  align-content: center;
}

.store-item-actions .text-link {
  font-size: 0.78rem;
}

.store-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-top: 3px;
}

.store-check input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #0f766e;
}

.store-actions {
  margin-top: 10px;
}

.offers-section {
  position: relative;
  overflow: hidden;
  padding: 22px;
  border-color: rgba(245, 158, 11, 0.34);
  box-shadow: 0 28px 68px rgba(234, 88, 12, 0.12);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.28), transparent 32%),
    radial-gradient(circle at 14% 12%, rgba(251, 191, 36, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(14, 165, 233, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.98), rgba(248, 250, 255, 0.95));
}

.offers-section::before {
  content: '';
  position: absolute;
  inset: auto -60px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.09);
  filter: blur(8px);
  pointer-events: none;
}

.offers-head {
  align-items: flex-start;
  gap: 16px;
  position: relative;
  z-index: 1;
}

.offers-head h2 {
  margin: 0;
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.55rem, 2.9vw, 2.2rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.offers-head .hint {
  margin: 4px 0 0;
  max-width: 58ch;
  font-size: 0.9rem;
}

#offers-count {
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(255, 251, 235, 0.92);
  color: #9a3412;
  font-weight: 800;
}

.offers-filters-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(255, 247, 237, 0.95), rgba(255, 255, 255, 0.9)),
    radial-gradient(circle at top left, rgba(251, 191, 36, 0.12), transparent 38%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  position: relative;
  z-index: 1;
}

.offers-filters-copy {
  display: grid;
  gap: 4px;
}

.offers-filters-top {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  align-items: end;
}

.offers-search-field {
  max-width: 320px;
  justify-self: end;
}

.offers-search-field input {
  background: rgba(255, 255, 255, 0.94);
}

.offers-filter-kicker {
  color: #9a3412;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.offers-filter-label {
  color: #3b2f1a;
  font-size: 1rem;
  font-weight: 700;
}

.offers-filter-rail {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 6px;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.offers-filter-rail::-webkit-scrollbar {
  display: none;
}

.offer-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid rgba(191, 122, 44, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #41321d;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 9px 20px rgba(148, 163, 184, 0.08);
  transition: transform 120ms ease, border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.offer-filter-chip > span:first-child {
  font-size: 0.84rem;
  line-height: 1.1;
}

.offer-filter-chip:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(234, 88, 12, 0.3);
  box-shadow: 0 14px 24px rgba(148, 163, 184, 0.12);
}

.offer-filter-chip:focus-visible {
  outline: none;
  border-color: #0f766e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}

.offer-filter-chip.is-active {
  border-color: rgba(234, 88, 12, 0.42);
  background: linear-gradient(135deg, rgba(255, 237, 213, 0.98), rgba(254, 215, 170, 0.78));
  color: #7c2d12;
}

.offer-filter-chip:disabled {
  opacity: 0.62;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.offer-filter-chip__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  font-size: 0.72rem;
  font-weight: 800;
}

.offer-filter-chip.is-active .offer-filter-chip__count {
  background: rgba(124, 45, 18, 0.1);
}

.offers-toolbar {
  margin-top: 14px;
  display: flex;
  justify-content: center;
}

.offers-grid {
  margin-top: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
  position: relative;
  z-index: 1;
}

.offer-card {
  position: relative;
  min-height: 100%;
  gap: 14px;
  grid-template-columns: 84px minmax(0, 1fr) minmax(132px, 156px);
  align-items: start;
  border-color: rgba(245, 158, 11, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.95)),
    linear-gradient(135deg, rgba(255, 237, 213, 0.72), rgba(255, 255, 255, 0));
  box-shadow: 0 12px 24px rgba(245, 158, 11, 0.08);
}

.offer-card:hover {
  transform: translateY(-2px);
  border-color: rgba(234, 88, 12, 0.34);
  box-shadow: 0 18px 32px rgba(245, 158, 11, 0.14);
}

.offer-card--spotlight {
  grid-column: span 2;
  grid-template-columns: 112px minmax(0, 1fr) minmax(150px, 180px);
  border-color: rgba(234, 88, 12, 0.3);
  background:
    radial-gradient(circle at top right, rgba(251, 191, 36, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(255, 237, 213, 0.95), rgba(255, 255, 255, 0.92) 58%);
}

.offer-card__media {
  position: relative;
}

.offer-card__media img {
  width: 84px;
  height: 84px;
}

.offer-card--spotlight .offer-card__media img {
  width: 112px;
  height: 112px;
}

.offer-card__body {
  min-width: 0;
}

.offer-card__body h3 {
  font-size: 1rem;
}

.offer-card--spotlight .offer-card__body h3 {
  font-size: 1.08rem;
}

.offer-actions {
  display: grid;
  gap: 10px;
  justify-items: stretch;
  align-content: start;
  min-width: 132px;
}

.offer-actions .text-link {
  justify-content: center;
}

.offer-add-btn {
  width: 100%;
  border-radius: 999px;
  padding-inline: 14px;
  box-shadow: 0 10px 18px rgba(245, 158, 11, 0.12);
}

.offer-add-btn.is-added {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(236, 253, 245, 0.96);
  color: #0f766e;
}

.offer-badge {
  position: absolute;
  left: 8px;
  top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.offer-promo {
  color: var(--accent);
  font-weight: 700;
}

.offer-meta {
  color: var(--muted);
}

.offers-jump-overlay {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.offers-jump-overlay.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.offers-jump-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
}

#home-shopping-section {
  scroll-margin-top: 18px;
}

.product-results {
  margin-top: 10px;
  display: grid;
  gap: 9px;
  max-height: 60vh;
  overflow: auto;
}

.result-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) minmax(90px, 112px);
  gap: 11px;
  padding: 10px;
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: rise 280ms ease both;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.result-card > div {
  min-width: 0;
}

.result-card:hover {
  transform: translateY(-1px);
  border-color: #9db7d8;
  box-shadow: var(--shadow-sm);
}

.result-card img,
.shopping-item img {
  width: 66px;
  height: 66px;
  border-radius: 10px;
  object-fit: cover;
  background: #e5ebf3;
}

.result-card h3 {
  font-size: 0.92rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-card p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.79rem;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.result-meta {
  color: #115e59;
  font-weight: 600;
}

.result-actions {
  align-self: center;
}

.group-card .group-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  justify-content: center;
  align-self: start;
  width: 100%;
}

.group-card .group-actions .btn {
  width: 100%;
  min-width: 34px;
  max-width: none;
  white-space: nowrap;
  text-align: center;
}

.variant-count {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.74rem;
}

.group-card .variant-panel {
  grid-column: 1 / -1;
  border-top: 1px dashed #cad6e6;
  margin-top: 2px;
  padding-top: 8px;
}

.group-card .variant-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.group-card .variant-panel li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
}

.group-card .variant-panel li span {
  color: var(--ink);
}

.group-price-heading {
  margin-bottom: 6px;
  color: #334f76;
  font-size: 0.76rem;
  font-weight: 700;
}

.group-price-panel {
  grid-column: 1 / -1;
  border: 1px dashed #c9d7ea;
  border-radius: 12px;
  background: #f8fbff;
  padding: 8px;
}

.group-price-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.group-price-panel li {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #fff;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr auto;
  gap: 10px;
  align-items: center;
  padding: 7px 8px;
}

.group-price-panel li span {
  font-size: 0.82rem;
  font-weight: 600;
}

.group-price-panel li small {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.group-price-value {
  text-align: right;
}

.group-price-value strong {
  color: #0f4c81;
}

.list-head,
.list-actions,
.analysis-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
}

.shopping-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
  max-height: 62vh;
  overflow: auto;
}

.shopping-item {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 10px;
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: #fff;
  padding: 9px;
}

.shopping-item img {
  width: 56px;
  height: 56px;
}

.shopping-item h4 {
  font-size: 0.9rem;
}

.shopping-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.79rem;
}

.shopping-item > button[data-remove-item] {
  align-self: center;
  justify-self: end;
  white-space: nowrap;
  padding: 7px 10px;
  font-size: 0.8rem;
  line-height: 1.15;
}

.qty-row {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-row span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.summary-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-card {
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 10px;
}

.summary-card h4 {
  color: var(--muted);
  font-size: 0.78rem;
  margin-bottom: 6px;
}

.summary-card p {
  font-size: 1.04rem;
  font-weight: 700;
}

.analysis-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.item-best-list,
.basket-stores {
  margin-top: 9px;
  display: grid;
  gap: 9px;
  max-height: 390px;
  overflow: auto;
}

.analysis-item,
.basket-store {
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  padding: 11px;
}

.analysis-item p,
.basket-store p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
}

.basket-store-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.basket-store-metrics {
  margin-top: 7px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.debug-panel {
  margin-top: 16px;
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: #ffffff;
  padding: 11px;
}

.debug-panel summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e3a63;
}

.debug-toolbar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.debug-toolbar .hint {
  margin: 0;
}

.debug-copy-btn {
  white-space: nowrap;
}

.debug-summary {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.debug-card {
  border: 1px solid #d8e2ef;
  border-radius: 10px;
  background: #f8fbff;
  padding: 8px;
}

.debug-card h4 {
  margin: 0 0 4px;
  font-size: 0.8rem;
  color: #334f76;
}

.debug-card p {
  margin-top: 3px;
  font-size: 0.78rem;
  color: #41584b;
}

.debug-json {
  margin-top: 10px;
  border: 1px dashed #c9d7ea;
  border-radius: 10px;
  background: #f4f8ff;
  color: #1e293b;
  padding: 10px;
  font-size: 0.74rem;
  line-height: 1.4;
  max-height: 240px;
  overflow: auto;
}

.reveal {
  animation: rise 420ms ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translateY(-5px) scale(1);
  }
  to {
    transform: translateY(8px) scale(1.05);
  }
}

@media (max-width: 1120px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-metrics {
    justify-self: start;
    width: min(440px, 100%);
  }

  .topbar {
    border-radius: 16px;
  }

  .dashboard {
    grid-template-columns: 1fr;
  }

  .panel--full {
    grid-column: auto;
  }

  .summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .grid-2,
  .grid-3,
  .analysis-grid,
  .summary-grid,
  .basket-store-metrics {
    grid-template-columns: 1fr;
  }

  .selection-panels,
  .selection-board-items {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    flex-direction: column;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topbar-links {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topbar-link {
    text-align: center;
  }

  .shopping-layout {
    grid-template-columns: 1fr;
  }

  .offers-section {
    padding: 18px;
  }

  .offers-grid {
    grid-template-columns: 1fr;
  }

  .offers-filters-panel {
    padding: 12px;
  }

  .offers-filters-top {
    grid-template-columns: 1fr;
  }

  .offers-search-field {
    max-width: none;
    justify-self: stretch;
  }

  .shopping-cart-panel {
    margin-top: 8px;
    min-height: auto;
  }

  .result-card {
    grid-template-columns: 56px 1fr;
  }

  .offer-card {
    grid-template-columns: 56px 1fr;
  }

  .offer-card--spotlight {
    grid-column: auto;
    grid-template-columns: 56px 1fr;
  }

  .offer-card__media img,
  .offer-card--spotlight .offer-card__media img {
    width: 56px;
    height: 56px;
  }

  .offer-filter-chip {
    min-height: 34px;
    padding: 6px 10px;
  }

  .result-actions {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .offer-actions {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .offer-add-btn,
  .offer-actions .text-link {
    width: 100%;
    justify-content: center;
  }

  .group-card .group-actions {
    grid-column: 1 / -1;
    flex-direction: row;
    justify-content: flex-end;
  }

  .group-card .group-actions .btn {
    width: auto;
    max-width: max-content;
  }

  .group-price-panel li {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .group-price-value {
    text-align: left;
  }

  .shopping-item {
    grid-template-columns: 50px 1fr;
  }

  .shopping-item > button[data-remove-item] {
    grid-column: 1 / -1;
    justify-self: start;
    align-self: start;
  }

  .offers-jump-overlay {
    left: 16px;
    right: 16px;
    bottom: 14px;
  }

  .offers-jump-button {
    width: 100%;
    justify-content: center;
  }
}

/* Shared cards + stores page */
.results {
  display: grid;
  gap: 8px;
  max-height: 64vh;
  overflow: auto;
  margin-top: 10px;
}

.card {
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: #fff;
  padding: 9px;
  display: grid;
  gap: 10px;
  grid-template-columns: 56px 1fr;
  text-align: left;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.card:hover {
  transform: translateY(-1px);
  border-color: #9db7d8;
  box-shadow: var(--shadow-sm);
}

.card.active {
  border-color: #79a8d9;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.14);
}

.card img {
  width: 56px;
  height: 56px;
  border-radius: 11px;
  object-fit: cover;
  background: #ebf0f8;
}

.card h3 {
  font-size: 0.92rem;
}

.card p {
  color: var(--muted);
  font-size: 0.8rem;
  margin-top: 3px;
}

.price-pill {
  color: #0f4c81;
  font-weight: 700;
}

.meta {
  color: var(--muted);
  font-size: 0.82rem;
}

.stores-dashboard {
  width: min(1220px, 94vw);
  margin: 16px auto 44px;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(360px, 1.1fr);
}

.stores-sidebar {
  align-self: start;
  grid-column: 1 / -1;
}

.stores-dashboard > section.panel.reveal {
  grid-column: 1 / -1;
}

.store-browser-results {
  max-height: 640px;
}

.store-selector-head {
  margin-top: 0;
  justify-content: flex-start;
}

.store-selector-title-block {
  display: grid;
  gap: 4px;
}

.store-selector-title-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.store-selector-title-row h2 {
  margin: 0;
}

.stores-locality-head {
  margin-top: 0;
  margin-bottom: 10px;
  gap: 4px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
}

.stores-locality-head h2 {
  margin: 0;
}

.stores-locality-summary {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.locality-chip {
  cursor: pointer;
}

.stores-locality-content.is-collapsed {
  display: none;
}

.compare-sidebar-head {
  margin-top: 0;
  margin-bottom: 10px;
}

.compare-sidebar-head h2 {
  margin: 0;
}

.compare-sidebar-content.is-collapsed {
  display: none;
}

.store-selector-toggle {
  white-space: nowrap;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 0.8rem;
}

.store-selector-toggle--with-icon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.store-selector-toggle .toggle-icon {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex: 0 0 auto;
}

.store-selector-content.is-collapsed {
  display: none;
}

.store-browser-row {
  display: grid;
  gap: 9px;
  grid-template-columns: 30px minmax(0, 1fr) minmax(118px, 150px);
  align-items: start;
}

.store-browser-row .store-check {
  padding-top: 8px;
}

.store-browser-card {
  width: 100%;
  cursor: pointer;
  min-width: 0;
}

.store-browser-card > div {
  min-width: 0;
}

.store-browser-card h3,
.store-browser-card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.store-browser-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  justify-content: center;
  min-width: 118px;
}

.store-browser-links .btn,
.store-browser-links .text-link {
  width: 100%;
  text-align: center;
}

#store-items .card {
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: start;
}

#store-items .card > div {
  min-width: 0;
}

#store-items .card h3,
#store-items .card p {
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 980px) {
  .stores-dashboard {
    grid-template-columns: 1fr;
  }
}

/* Dedicated store catalog page */
.catalog-shell {
  width: min(1220px, 94vw);
  margin: 16px auto 44px;
}

.catalog-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 240px);
  align-items: end;
}

.catalog-controls select {
  width: 100%;
  border-radius: 13px;
}

.catalog-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  margin-top: 12px;
}

.catalog-card {
  border: 1px solid rgba(182, 196, 216, 0.75);
  border-radius: 14px;
  background: #fff;
  padding: 10px;
  display: grid;
  gap: 10px;
  grid-template-columns: 84px 1fr;
  align-items: start;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.catalog-card:hover {
  transform: translateY(-1px);
  border-color: #9db7d8;
  box-shadow: var(--shadow-sm);
}

.catalog-thumb {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: #ebf0f8;
}

.catalog-thumb--empty {
  border: 1px dashed #c9d7ea;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #c9d7ea, #b4c6de);
  border-radius: 999px;
  border: 2px solid #f4f8ff;
}

::-webkit-scrollbar-track {
  background: rgba(222, 231, 242, 0.5);
  border-radius: 999px;
}

.catalog-card-body h3 {
  font-size: 0.93rem;
  margin: 0;
}

.catalog-card-body p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .catalog-controls {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }
}
