:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-2: #eef4ec;
  --ink: #17211b;
  --muted: #68746d;
  --line: #d9dfd7;
  --green: #1d7a46;
  --green-dark: #10552f;
  --yellow: #f4c430;
  --red: #c6402d;
  --blue: #2f6f9f;
  --shadow: 0 10px 24px rgba(26, 42, 31, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 5;
}

.topbar-inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding: 18px clamp(14px, 3vw, 34px);
  width: 100%;
}

.eyebrow {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.15;
}

.topbar-title {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.top-nav a {
  align-items: center;
  background: #eef2ea;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 5px;
  min-height: 34px;
  padding: 7px 11px;
  text-decoration: none;
}

.top-nav a:hover {
  background: #e5eee0;
}

.top-nav a.is-active {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.top-nav span {
  font-size: 0.88em;
  opacity: 0.72;
}

.refresh-link,
.submit-button,
.select-offer-button,
.clear-list-button {
  background: var(--green);
  border: 0;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
  padding: 11px 16px;
  text-decoration: none;
  white-space: nowrap;
}

.refresh-link span,
.submit-button span,
.select-offer-button span,
.clear-list-button span,
.shopping-item-actions span,
.ko {
  color: inherit;
  font-size: 0.82em;
  font-weight: 600;
  opacity: 0.72;
}

h1 .ko,
h2 .ko,
.section-heading .ko,
.metric-label .ko {
  margin-left: 6px;
}

.refresh-link:hover,
.submit-button:hover,
.select-offer-button:hover,
.clear-list-button:hover {
  background: var(--green-dark);
}

.layout {
  display: grid;
  gap: 14px;
  margin: 0 auto;
  max-width: 1440px;
  padding: 18px clamp(14px, 3vw, 34px) 48px;
}

.notice {
  background: #fff7df;
  border: 1px solid #ead082;
  border-radius: 8px;
  color: #5d4810;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.notice summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
}

.notice summary::-webkit-details-marker {
  display: none;
}

.notice summary strong {
  font-size: 14px;
}

.notice summary > span {
  align-items: center;
  background: rgba(93, 72, 16, 0.12);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-width: 28px;
  padding: 4px 8px;
}

.notice p {
  line-height: 1.45;
  margin-top: 8px;
}

.stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  padding: 12px 14px;
}

.metric-label {
  color: var(--muted);
  display: block;
  font-size: 13px;
  margin-bottom: 5px;
}

.metric strong {
  font-size: 23px;
  line-height: 1;
}

.metric span:last-child {
  color: var(--muted);
  margin-left: 4px;
}

.filters {
  align-items: end;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px 12px;
  grid-template-areas:
    "zip search category sort submit"
    "toggles retailers retailers retailers retailers";
  grid-template-columns: minmax(104px, 0.65fr) minmax(220px, 1.6fr) minmax(148px, 0.8fr) minmax(148px, 0.8fr) auto;
  padding: 12px;
}

.filters label,
.filters fieldset {
  min-width: 0;
}

.filters > label:nth-of-type(1) {
  grid-area: zip;
}

.filters > label:nth-of-type(2) {
  grid-area: search;
}

.filters > label:nth-of-type(3) {
  grid-area: category;
}

.filters > label:nth-of-type(4) {
  grid-area: sort;
}

.filters > .submit-button {
  grid-area: submit;
  min-height: 40px;
}

.filters > .filter-toggles {
  align-self: center;
  grid-area: toggles;
}

.filters label span,
.filters legend {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 5px;
}

input,
select {
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 40px;
  padding: 0 11px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--green);
  outline: 3px solid rgba(29, 122, 70, 0.16);
}

.filter-toggles {
  display: grid;
  gap: 7px;
}

.filter-toggle {
  align-items: center;
  background: #f3f7ef;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 9px;
  min-height: 40px;
  padding: 7px 10px;
}

.filter-toggle input {
  accent-color: var(--green);
  flex: 0 0 auto;
  min-height: 0;
  width: auto;
}

.filter-toggle span {
  color: var(--ink);
  display: grid;
  gap: 2px;
  line-height: 1.1;
  margin: 0;
}

.filter-toggle strong,
.filter-toggle small {
  display: block;
  font-size: 12px;
}

.filter-toggle small {
  color: var(--muted);
  font-weight: 700;
}

.retailer-filter {
  border: 0;
  border-top: 1px solid #edf1ea;
  display: grid;
  gap: 7px;
  grid-area: retailers;
  margin: 0;
  padding: 9px 0 0;
}

.retailer-filter legend {
  margin: 0;
}

.retailer-options {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

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

.filter-actions button {
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  min-height: 30px;
  padding: 5px 9px;
}

.filter-actions button:hover {
  background: #e5eee0;
}

.filter-actions span {
  color: inherit;
  display: inline;
  font-size: 0.88em;
  margin: 0;
  opacity: 0.72;
}

.retailer-theme {
  --retailer-accent: var(--green);
  --retailer-accent-2: var(--green-dark);
  --retailer-soft: #eef2ea;
  --retailer-ink: var(--green-dark);
  --retailer-border: #cbd7c8;
  --retailer-selected-bg: var(--retailer-accent);
  --retailer-selected-border: var(--retailer-selected-bg);
  --retailer-selected-ink: #fff;
  --retailer-selected-count-bg: rgba(255, 255, 255, 0.2);
}

.retailer-aldi-nord {
  --retailer-accent: #0050a4;
  --retailer-accent-2: #f28c00;
  --retailer-soft: #e7f1fc;
  --retailer-ink: #073f79;
  --retailer-border: #9fc5ee;
}

.retailer-edeka {
  --retailer-accent: #f7c800;
  --retailer-accent-2: #1f4e99;
  --retailer-soft: #fff3a3;
  --retailer-ink: #1f4e99;
  --retailer-border: #d7ad00;
  --retailer-selected-bg: #f7c800;
  --retailer-selected-border: #c99f00;
  --retailer-selected-ink: #173b73;
  --retailer-selected-count-bg: rgba(23, 59, 115, 0.16);
}

.retailer-rewe {
  --retailer-accent: #d71920;
  --retailer-accent-2: #9f1016;
  --retailer-soft: #fde7e8;
  --retailer-ink: #8d1117;
  --retailer-border: #f1a8ac;
}

.retailer-lidl {
  --retailer-accent: #ffde00;
  --retailer-accent-2: #0050aa;
  --retailer-soft: #fff5bf;
  --retailer-ink: #0050aa;
  --retailer-border: #d71920;
  --retailer-selected-bg: #ffde00;
  --retailer-selected-border: #d71920;
  --retailer-selected-ink: #0050aa;
  --retailer-selected-count-bg: rgba(215, 25, 32, 0.16);
}

.retailer-netto-marken-discount {
  --retailer-accent: #e30613;
  --retailer-accent-2: #ffd400;
  --retailer-soft: #fff2d1;
  --retailer-ink: #9a0b13;
  --retailer-border: #efc25c;
}

.retailer-penny {
  --retailer-accent: #c8102e;
  --retailer-accent-2: #ffcc00;
  --retailer-soft: #fde7eb;
  --retailer-ink: #8d1027;
  --retailer-border: #eea4b2;
}

.retailer-nahkauf {
  --retailer-accent: #e30613;
  --retailer-accent-2: #6f9f2f;
  --retailer-soft: #fde8e9;
  --retailer-ink: #8f1118;
  --retailer-border: #f0a3a8;
}

.retailer-kaufland {
  --retailer-accent: #e30613;
  --retailer-accent-2: #111111;
  --retailer-soft: #fde8e9;
  --retailer-ink: #8f1118;
  --retailer-border: #f0a3a8;
}

.retailer-dm-drogerie-markt {
  --retailer-accent: #009ee3;
  --retailer-accent-2: #f6c400;
  --retailer-soft: #e5f5fc;
  --retailer-ink: #075d82;
  --retailer-border: #95d3ed;
  --retailer-selected-bg: #007bb6;
}

.retailer-rossmann {
  --retailer-accent: #e30613;
  --retailer-accent-2: #ffffff;
  --retailer-soft: #fde8e9;
  --retailer-ink: #8f1118;
  --retailer-border: #f0a3a8;
}

.retailer-budnikowsky {
  --retailer-accent: #00529b;
  --retailer-accent-2: #ffd500;
  --retailer-soft: #e8f1fb;
  --retailer-ink: #073c70;
  --retailer-border: #9fc4e8;
}

.check-pill {
  align-items: center;
  display: inline-flex;
}

.check-pill input {
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  position: absolute;
}

.check-pill .check-pill-ui {
  align-items: center;
  background: var(--retailer-soft);
  border: 1px solid var(--retailer-border);
  border-radius: 999px;
  color: var(--retailer-ink);
  cursor: pointer;
  display: inline-flex;
  gap: 6px;
  margin: 0;
  padding: 7px 10px;
}

.check-pill input:checked + .check-pill-ui {
  background: var(--retailer-selected-bg);
  border-color: var(--retailer-selected-border);
  color: var(--retailer-selected-ink);
}

.check-pill .check-pill-label,
.check-pill .check-pill-count {
  color: inherit;
  display: inline-flex;
  font-size: 13px;
  line-height: 1;
  margin: 0;
}

.check-pill .check-pill-count {
  align-items: center;
  background: rgba(23, 33, 27, 0.08);
  border-radius: 999px;
  justify-content: center;
  min-width: 24px;
  padding: 4px 7px;
}

.check-pill input:checked + .check-pill-ui .check-pill-count {
  background: var(--retailer-selected-count-bg);
}

.week-switch {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 6px;
}

.week-tab {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--muted);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 40px;
  padding: 8px 10px;
  text-decoration: none;
}

.week-tab:hover {
  background: #f1f5ee;
}

.week-tab.is-active {
  background: var(--green);
  color: #fff;
}

.week-tab strong {
  align-items: center;
  background: rgba(23, 33, 27, 0.08);
  border-radius: 999px;
  display: inline-flex;
  font-size: 13px;
  justify-content: center;
  min-width: 32px;
  padding: 5px 8px;
}

.week-tab.is-active strong {
  background: rgba(255, 255, 255, 0.2);
}

.availability-note {
  background: #eef5f1;
  border: 1px solid #cbded2;
  border-radius: 8px;
  color: #25382b;
  display: grid;
  gap: 6px;
  padding: 12px 14px;
}

.availability-note p {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin: 0;
}

.availability-note strong {
  min-width: 190px;
}

.availability-note span {
  min-width: 0;
}

.availability-note .ko {
  color: var(--muted);
}

.basket-advisor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 14px;
}

.basket-form {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.basket-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  grid-column: 1 / -1;
}

.basket-template-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  grid-column: 1 / -1;
}

.basket-template-row button {
  background: #f6f9f2;
  border: 1px solid #cbd7c8;
  border-radius: 999px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  min-height: 34px;
  padding: 7px 10px;
}

.basket-template-row button:hover {
  background: #eaf2e5;
}

.basket-template-row span {
  font-size: 0.88em;
  opacity: 0.72;
}

.basket-form textarea {
  background: #fbfcf8;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font: inherit;
  min-height: 82px;
  padding: 11px;
  resize: vertical;
  width: 100%;
}

.basket-form textarea:focus {
  border-color: var(--green);
  outline: 3px solid rgba(29, 122, 70, 0.16);
}

.basket-form .submit-button {
  min-height: 42px;
}

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

.basket-results-modal {
  grid-template-columns: 1fr;
}

.basket-result {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.basket-result-heading {
  align-items: start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.basket-result-heading h3 {
  font-size: 18px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.basket-result-heading p {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.basket-result-heading > span {
  align-items: center;
  background: #e7f0e3;
  border-radius: 999px;
  color: var(--green-dark);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  justify-content: center;
  min-width: 30px;
  padding: 5px 8px;
}

.basket-candidates {
  display: grid;
  gap: 9px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.basket-candidates li {
  background: linear-gradient(90deg, var(--retailer-soft), #fff 46%);
  border: 1px solid var(--retailer-border);
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--retailer-accent);
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  padding: 10px;
}

.basket-candidate-main {
  align-items: start;
  display: grid;
  gap: 10px;
  grid-template-columns: 72px minmax(0, 1fr);
  min-width: 0;
}

.basket-candidate-main.is-without-image {
  grid-template-columns: minmax(0, 1fr);
}

.basket-candidate-image {
  aspect-ratio: 1;
  background: #fff;
  border: 1px solid #e1e7df;
  border-radius: 8px;
  height: 72px;
  object-fit: contain;
  padding: 5px;
  width: 72px;
}

.basket-candidate-details {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.basket-candidates strong,
.basket-miss {
  overflow-wrap: anywhere;
}

.basket-candidates p {
  color: var(--muted);
  font-size: 13px;
}

.basket-price-details {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.basket-price-details span {
  color: var(--muted);
  font-size: 13px;
}

.basket-price-details strong {
  color: var(--green-dark);
  font-size: 13px;
}

.basket-discount {
  background: var(--red);
  border-radius: 999px;
  color: #fff !important;
  font-weight: 800;
  padding: 4px 7px;
}

.basket-estimate {
  align-content: start;
  display: grid;
  gap: 5px;
  justify-items: end;
  text-align: right;
}

.basket-estimate strong {
  color: var(--green-dark);
  font-size: 18px;
}

.basket-estimate span {
  color: var(--muted);
  font-size: 12px;
}

.basket-estimate a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.basket-miss {
  background: #f7f9f5;
  border: 1px dashed #cbd7c8;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  padding: 12px;
}

.basket-modal-backdrop {
  align-items: center;
  background: rgba(23, 33, 27, 0.42);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 22px;
  position: fixed;
  z-index: 20;
}

.basket-modal-backdrop[hidden] {
  display: none;
}

.basket-modal {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(23, 33, 27, 0.22);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto minmax(0, 1fr);
  max-height: min(760px, calc(100vh - 44px));
  max-width: 860px;
  min-width: 0;
  overflow: hidden;
  padding: 18px;
  width: min(860px, 100%);
}

.basket-modal-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.basket-modal-header h2 {
  font-size: 22px;
}

.basket-modal-actions {
  align-items: center;
  display: flex;
  gap: 8px;
}

.copy-button {
  align-items: center;
  background: var(--green);
  border: 1px solid var(--green-dark);
  border-radius: 8px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  gap: 6px;
  min-height: 38px;
  padding: 8px 14px;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.copy-button:hover {
  background: var(--green-dark);
}

.copy-button.is-disabled,
.copy-button:disabled {
  background: #cbd5cb;
  border-color: #cbd5cb;
  color: #718076;
  cursor: not-allowed;
  pointer-events: none;
}

.modal-close-button {
  align-items: center;
  background: #eef2ea;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-size: 24px;
  font-weight: 700;
  height: 38px;
  justify-content: center;
  line-height: 1;
  width: 38px;
}

.modal-close-button:hover {
  background: #e5eee0;
}

.basket-modal-status {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.basket-modal-body {
  min-height: 0;
  min-width: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 3px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.section-heading h2 {
  font-size: 20px;
}

.section-heading p {
  color: var(--muted);
  font-size: 14px;
}

.recommendations {
  background: var(--surface-2);
  border: 1px solid #d4e2d1;
  border-radius: 8px;
  display: grid;
  gap: 12px;
  padding: 16px;
}

.deal-strip {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-deal {
  background: var(--surface);
  border: 1px solid var(--retailer-border);
  border-radius: 8px;
  box-shadow: inset 0 4px 0 var(--retailer-accent);
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 12px;
}

.mini-deal strong,
.offer-card h3,
.description {
  overflow-wrap: anywhere;
}

.mini-deal span:last-child {
  color: var(--muted);
  font-size: 14px;
}

.mini-deal .ko {
  color: var(--muted);
  font-size: 13px;
}

.list-heading {
  margin-top: 6px;
}

.offer-workspace {
  display: block;
  width: 100%;
}

.offers-column {
  display: grid;
  gap: 14px;
  width: 100%;
}

.offer-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.offer-card {
  background: var(--surface);
  border: 1px solid var(--retailer-border);
  border-radius: 8px;
  box-shadow: inset 0 4px 0 var(--retailer-accent), var(--shadow);
  contain-intrinsic-size: 420px;
  content-visibility: auto;
  min-width: 0;
  overflow: hidden;
}

.image-wrap {
  aspect-ratio: 4 / 3;
  background: var(--retailer-soft);
  position: relative;
}

.image-wrap img {
  display: block;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  width: 100%;
}

.image-placeholder {
  align-items: center;
  color: var(--retailer-ink);
  display: flex;
  font-weight: 700;
  height: 100%;
  justify-content: center;
  padding: 16px;
  text-align: center;
}

.discount-badge {
  background: var(--red);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  padding: 6px 8px;
  position: absolute;
  right: 10px;
  top: 10px;
}

.card-body {
  display: grid;
  gap: 9px;
  padding: 14px;
}

.card-meta,
.valid-row {
  align-items: center;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 8px;
  justify-content: space-between;
}

.retailer-badge {
  background: var(--retailer-soft);
  border: 1px solid var(--retailer-border);
  border-radius: 999px;
  color: var(--retailer-ink);
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  max-width: 100%;
  padding: 4px 8px;
}

.offer-card h3 {
  font-size: 18px;
  line-height: 1.25;
}

.brand {
  color: var(--blue);
  font-size: 14px;
  font-weight: 700;
}

.translation {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.price-row {
  align-items: baseline;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.price-row strong {
  font-size: 24px;
}

.price-row s {
  color: var(--muted);
}

.card-actions {
  display: flex;
}

.view-deal-button {
  align-items: center;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  display: inline-flex;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  justify-content: center;
  min-height: 38px;
  padding: 8px 12px;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  width: 100%;
}

.view-deal-button:hover {
  background: var(--green);
  border-color: var(--green-dark);
  color: #ffffff;
}

.view-deal-button span {
  opacity: 0.8;
  font-size: 12px;
}

.unit-price {
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 700;
}

.description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
  min-height: 40px;
}

.description.translation {
  background: #f1f7ee;
  border-left: 3px solid var(--green);
  color: #31543b;
  min-height: 0;
  padding: 8px 10px;
}

.valid-row a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

.empty-state a {
  color: var(--blue);
  display: inline-flex;
  font-weight: 800;
  margin-top: 10px;
  text-decoration: none;
}

.shopping-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
  grid-template-rows: auto auto auto minmax(120px, 1fr) auto;
  max-height: calc(100vh - 118px);
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  position: sticky;
  top: 96px;
}

.shopping-panel-header {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.shopping-panel h2 {
  font-size: 20px;
}

.shopping-count {
  align-items: center;
  background: var(--green);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 34px;
  min-width: 34px;
  padding: 6px 9px;
}

.shopping-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.shopping-summary span {
  background: var(--retailer-soft);
  border: 1px solid var(--retailer-border);
  border-radius: 999px;
  color: var(--retailer-ink);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.shopping-empty {
  background: #f7f9f5;
  border: 1px dashed #cbd7c8;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  padding: 14px;
}

.shopping-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.shopping-list-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.shopping-item {
  background: linear-gradient(90deg, var(--retailer-soft), #fff 40%);
  border: 1px solid var(--retailer-border);
  border-radius: 8px;
  box-shadow: inset 4px 0 0 var(--retailer-accent);
  display: grid;
  gap: 10px;
  padding: 10px;
}

.shopping-item-main {
  display: grid;
  gap: 10px;
  grid-template-columns: 58px minmax(0, 1fr);
}

.shopping-item-main img,
.shopping-image-placeholder {
  background: var(--retailer-soft);
  border-radius: 8px;
  height: 58px;
  width: 58px;
}

.shopping-item-main img {
  object-fit: contain;
  padding: 5px;
}

.shopping-image-placeholder {
  align-items: center;
  color: var(--retailer-ink);
  display: flex;
  font-size: 18px;
  font-weight: 800;
  justify-content: center;
}

.shopping-item-main div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.shopping-item strong,
.shopping-translation,
.shopping-valid {
  overflow-wrap: anywhere;
}

.shopping-item p {
  color: var(--muted);
  font-size: 13px;
}

.shopping-item strong {
  font-size: 15px;
  line-height: 1.25;
}

.shopping-translation,
.shopping-unit {
  color: var(--green-dark) !important;
  font-weight: 700;
}

.shopping-valid {
  line-height: 1.35;
}

.shopping-item-actions {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
}

.shopping-item-actions a,
.shopping-item-actions button {
  background: #f1f5ee;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green-dark);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 10px;
  text-decoration: none;
}

.shopping-item-actions button:hover,
.shopping-item-actions a:hover {
  background: #e5eee0;
}

.shopping-panel-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.shopping-panel-actions .whatsapp-share-button {
  justify-content: center;
  min-width: 0;
}

.clear-list-button {
  background: #55625a;
  min-height: 40px;
  width: 100%;
}

.clear-list-button:hover {
  background: #3d4841;
}

.clear-list-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

@media (max-width: 1180px) {
  .filters {
    grid-template-areas:
      "zip search search category"
      "sort toggles retailers submit";
    grid-template-columns: minmax(96px, 0.7fr) minmax(160px, 1fr) minmax(160px, 1fr) auto;
  }

  .deal-strip,
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .basket-results {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .topbar {
    position: static;
  }

  .topbar-inner {
    align-items: flex-start;
    gap: 12px;
  }

  .stats,
  .deal-strip,
  .offer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters {
    grid-template-areas:
      "zip search"
      "category sort"
      "toggles toggles"
      "retailers retailers"
      "submit submit";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .offer-workspace {
    grid-template-columns: 1fr;
  }

  .shopping-panel {
    max-height: none;
    overflow: visible;
    position: static;
  }

  .shopping-list-scroll {
    overflow: visible;
  }
}

@media (max-width: 620px) {
  .topbar-inner,
  .section-heading {
    flex-direction: column;
  }

  .topbar-inner {
    align-items: stretch;
    gap: 12px;
    padding: 16px 10px;
  }

  .top-nav a {
    flex: 1;
    justify-content: center;
  }

  .layout {
    gap: 14px;
    padding: 14px 10px 34px;
  }

  .refresh-link,
  .submit-button {
    text-align: center;
    width: 100%;
  }

  .filters,
  .stats,
  .deal-strip,
  .week-switch,
  .basket-form,
  .basket-candidates li,
  .offer-grid {
    grid-template-columns: 1fr;
  }

  .metric,
  .filters,
  .basket-advisor,
  .recommendations,
  .shopping-panel {
    padding: 12px;
  }

  .filters {
    grid-template-areas:
      "zip"
      "search"
      "category"
      "sort"
      "toggles"
      "retailers"
      "submit";
  }

  .metric strong {
    font-size: 22px;
  }

  .check-pill .check-pill-ui {
    font-size: 13px;
    padding: 9px 10px;
  }

  .week-tab {
    min-height: 48px;
  }

  .basket-form textarea {
    min-height: 112px;
  }

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

  .basket-modal-backdrop {
    align-items: stretch;
    padding: 8px;
  }

  .basket-modal {
    max-height: calc(100dvh - 16px);
    padding: 14px;
  }

  .basket-modal-header {
    align-items: start;
  }

  .basket-candidate-main {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .basket-candidate-image {
    height: 64px;
    width: 64px;
  }

  .basket-estimate {
    grid-template-columns: minmax(0, 1fr) auto;
    justify-items: start;
    text-align: left;
  }

  .basket-estimate a {
    justify-self: end;
  }

  .offer-card {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .image-wrap {
    aspect-ratio: auto;
    height: 100%;
    min-height: 138px;
  }

  .image-wrap img {
    padding: 8px;
  }

  .discount-badge {
    font-size: 12px;
    padding: 5px 7px;
    right: 6px;
    top: 6px;
  }

  .card-body {
    gap: 6px;
    padding: 10px;
  }

  .card-meta,
  .valid-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .offer-card h3 {
    font-size: 15px;
  }

  .price-row strong {
    font-size: 20px;
  }

  .description {
    display: -webkit-box;
    min-height: 0;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .shopping-item-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .shopping-item-actions a,
  .shopping-item-actions button {
    text-align: center;
  }

  h1 {
    font-size: 24px;
  }
}

@media (max-width: 420px) {
  .basket-modal-header {
    flex-wrap: wrap;
  }

  .basket-modal-actions {
    width: 100%;
  }

  .whatsapp-share-button {
    flex: 1;
    justify-content: center;
  }

  .offer-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .image-wrap {
    min-height: 126px;
  }

  .basket-candidate-main,
  .shopping-item-main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .basket-candidate-image,
  .shopping-item-main img,
  .shopping-image-placeholder {
    height: 56px;
    width: 56px;
  }

  .basket-estimate {
    grid-template-columns: 1fr;
  }

  .basket-estimate a {
    justify-self: start;
  }
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.lang-toggle-button {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.lang-toggle-button:hover {
  background: var(--surface-2);
  border-color: var(--green);
}
@media (max-width: 620px) {
  .topbar-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .lang-toggle-button,
  .share-page-button {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
}

.share-page-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  gap: 5px;
  justify-content: center;
  padding: 10px 14px;
  transition: border-color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.share-page-button:hover {
  background: var(--surface-2);
  border-color: var(--green);
}

.share-page-button span {
  font-size: 12px;
  opacity: 0.8;
}

/* Google AdSense / Advertisement Container */
.ad-unit {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(26, 42, 31, 0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 12px 0;
  min-height: 100px;
  overflow: hidden;
  padding: 10px 14px;
  text-align: center;
  width: 100%;
}

.ad-unit ins.adsbygoogle {
  display: block;
  margin: 0 auto;
  min-height: 90px;
  width: 100%;
}

.ad-label {
  align-self: flex-end;
  color: var(--muted);
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.8px;
  line-height: 1;
  margin-bottom: 6px;
  opacity: 0.7;
  text-transform: uppercase;
}

.ad-unit-bottom {
  margin-top: 24px;
}

/* Floating Toast Notification */
.toast {
  background: rgba(23, 33, 27, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  bottom: 28px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  left: 50%;
  opacity: 0;
  padding: 12px 22px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 16px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 1000;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Floating Back to Top Button */
.back-to-top {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  bottom: 24px;
  box-shadow: var(--shadow);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  gap: 4px;
  opacity: 0;
  padding: 10px 16px;
  pointer-events: none;
  position: fixed;
  right: 24px;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease, border-color 0.15s ease;
  z-index: 90;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--surface-2);
  border-color: var(--green);
}

.back-to-top span {
  font-size: 12px;
  opacity: 0.8;
}

/* Site Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding: 36px clamp(14px, 3vw, 34px);
  width: 100%;
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
}

.footer-brand {
  display: grid;
  gap: 10px;
  max-width: 800px;
}

.footer-title {
  color: var(--ink);
  font-size: 16px;
  font-weight: 800;
}

.footer-disclaimer,
.footer-update {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.footer-links {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-links a {
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}


