:root {
  --bg: #f1f5f2;
  --bg-2: #e9f0ec;
  --panel: #ffffff;
  --panel-2: #f2f7f3;
  --border: #d6e1da;
  --text: #16231c;
  --muted: #5f6d66;
  --primary: #158b4d;
  --primary-2: #0f6f3c;
  /* Woolworths Green */
  --primary-light: rgba(21, 139, 77, 0.14);
  --accent: #f08a3c;
  --accent-2: #2fb16d;
  --accent-3: #f4c065;
  --accent-4: #34b6e4;
  --card: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(242, 247, 243, 0.95));
  --card-glow: linear-gradient(135deg, rgba(21, 139, 77, 0.18), rgba(240, 138, 60, 0.16), rgba(52, 182, 228, 0.16));
  --shadow: 0 12px 26px rgba(17, 41, 30, 0.08);
  --shadow-hover: 0 18px 36px rgba(17, 41, 30, 0.14);
  --border-hover: rgba(21, 139, 77, 0.4);
  --ring: 0 0 0 3px rgba(21, 139, 77, 0.18);
  --grid-line: rgba(15, 30, 23, 0.06);
  --bg-glow: radial-gradient(circle at 12% 10%, rgba(21, 139, 77, 0.14), transparent 38%),
    radial-gradient(circle at 85% 0%, rgba(240, 138, 60, 0.16), transparent 42%),
    radial-gradient(circle at 5% 75%, rgba(52, 182, 228, 0.16), transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(47, 177, 109, 0.14), transparent 45%),
    linear-gradient(180deg, #f5f8f6 0%, #eef3f0 45%, #f1f5f2 100%);
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.7);
  --tile-bg: rgba(255, 255, 255, 0.82);
  --tile-border: rgba(21, 139, 77, 0.35);
  --tile-shadow: 0 12px 22px rgba(15, 30, 23, 0.14);
  --tile-sheen: rgba(255, 255, 255, 0.45);
  --sheen-max: 0.4;
  --tile-blip: rgba(21, 139, 77, 0.9);
  --tile-blip-glow: rgba(21, 139, 77, 0.35);
  --offer-bg: rgba(21, 139, 77, 0.12);
  --offer-border: rgba(21, 139, 77, 0.35);
  --offer-text: var(--primary);
  --offer-shadow: 0 10px 18px rgba(15, 30, 23, 0.12);
  --halo-1: rgba(255, 255, 255, 0.4);
  --halo-2: rgba(255, 255, 255, 0.25);
  --halo-3: rgba(255, 255, 255, 0.2);
  --input-bg: rgba(255, 255, 255, 0.85);
  --input-shadow: 0 8px 18px rgba(15, 30, 23, 0.08);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-glow);
  color: var(--text);
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.35s ease;
}

body::before {
  content: "";
  position: fixed;
  inset: -12%;
  background: radial-gradient(circle at 18% 12%, var(--halo-1), transparent 38%),
    radial-gradient(circle at 82% 8%, var(--halo-2), transparent 36%),
    radial-gradient(circle at 85% 70%, var(--halo-3), transparent 40%);
  opacity: 0.45;
  pointer-events: none;
  z-index: 0;
  animation: haze 18s ease-in-out infinite;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background-image: linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 140px 140px;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.page-shell {
  max-width: 1300px;
  margin: 0 auto;
  padding: 32px 18px calc(64px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.02em;
  color: var(--text);
}

p {
  margin: 0;
  color: var(--muted);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  column-gap: 24px;
  align-items: center;
  margin-bottom: 22px;
  min-height: 360px;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.52));
  box-shadow: var(--shadow);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, rgba(255, 255, 255, 0.9) 30%, rgba(255, 255, 255, 0.18) 62%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
  opacity: 0.4;
  z-index: 3;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 420px;
  min-width: 0;
  max-width: 720px;
}

.hero-visual {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-visual::before {
  display: none;
}

.hero-visual::after {
  display: none;
}

.hero-visual picture {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-illustration {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
  filter: saturate(1.04);
  animation: none;
  position: relative;
  z-index: 0;
}

.dark-mode .hero-illustration {
  filter: saturate(0.9) brightness(0.58);
}

.hero-chip {
  position: absolute;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  box-shadow: 0 10px 18px rgba(15, 30, 23, 0.12);
  backdrop-filter: blur(6px);
  z-index: 2;
}

.hero-chip.chip-one {
  top: 28px;
  right: 32px;
  animation: chip-float 7s ease-in-out infinite;
}

.hero-chip.chip-two {
  bottom: 34px;
  right: 310px;
  animation: chip-float 8s ease-in-out infinite;
}

.hero-chip.chip-three {
  top: 54%;
  right: 42px;
  animation: chip-float 6.5s ease-in-out infinite;
}

.brand {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.title-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.heading-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 30px;
  border-radius: 999px;
  background: var(--tile-bg);
  border: 1px solid var(--glass-border);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: var(--tile-shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.tile::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--tile-blip);
  box-shadow: 0 0 0 6px var(--tile-blip-glow);
  transform: translateY(-50%);
  animation: blip 2.8s ease-in-out infinite;
  z-index: 1;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, var(--tile-sheen), transparent 70%);
  animation: sheen 8s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.tile > * {
  position: relative;
  z-index: 2;
}

.tile.alt {
  color: var(--primary);
  border-color: var(--tile-border);
}

.tile.alt::before {
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-light);
  animation-delay: 0.6s;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  align-self: flex-start;
  justify-content: flex-start;
  margin-top: 10px;
}

.dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 0 0 8px var(--primary-light);
  position: relative;
  animation: float 7s ease-in-out infinite;
  margin-top: 6px;
}

.dot::after {
  content: "";
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(21, 139, 77, 0.35), transparent 70%);
  filter: blur(2px);
  opacity: 0.8;
}

.eyebrow {
  font-weight: 700;
  color: var(--accent);
  margin: 0;
}

h1 {
  font-size: 38px;
  letter-spacing: -0.03em;
}

.hero-title {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--tile-bg), rgba(255, 255, 255, 0.55));
  border: 1px solid var(--tile-border);
  box-shadow: var(--tile-shadow);
  line-height: 1.05;
  overflow: hidden;
  isolation: isolate;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-title::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 15%, var(--tile-sheen), transparent 70%);
  animation: sheen 9s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.hero-title > * {
  position: relative;
  z-index: 1;
}

.dark-mode .hero-title {
  background: linear-gradient(135deg, var(--tile-bg), rgba(12, 30, 43, 0.65));
  border-color: var(--tile-border);
}

.dark-mode .hero {
  background: linear-gradient(110deg, rgba(12, 30, 43, 0.92), rgba(12, 30, 43, 0.58));
}

.dark-mode .hero::before {
  background: linear-gradient(90deg, var(--bg) 0%, rgba(10, 24, 36, 0.92) 34%, rgba(10, 24, 36, 0.28) 68%, transparent 100%);
}

.pill {
  padding: 10px 16px;
  border-radius: 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(15, 30, 23, 0.08);
  backdrop-filter: blur(8px);
  position: relative;
}

.pill.active {
  background: var(--primary-light);
  border-color: rgba(21, 139, 77, 0.35);
  color: var(--primary);
}

.pill.loading {
  padding-left: 36px;
  overflow: hidden;
}

.pill.loading::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  border-top-color: transparent;
  margin-top: -6px;
  animation: spin 0.9s linear infinite;
}

.pill.loading::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
  opacity: 0.35;
  transform: translateX(-100%);
  animation: shimmer 1.8s ease-in-out infinite;
  pointer-events: none;
}

.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.pill-row .pill {
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-row .pill:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

.pill-row .pill:active {
  transform: translateY(0);
}

.data-source {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  margin: 10px 0 24px 0;
  background: linear-gradient(135deg, var(--glass), var(--panel-2));
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  position: relative;
  overflow: hidden;
}

.data-source::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(21, 139, 77, 0.08), rgba(240, 138, 60, 0.08), rgba(52, 182, 228, 0.08));
  opacity: 0.6;
  pointer-events: none;
}

.data-source > * {
  position: relative;
  z-index: 1;
}

.data-source:hover {
  transform: translateY(-1px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.tabs {
  display: flex;
  gap: 12px;
  margin: 24px 0 22px;
  padding-bottom: 8px;
  border-bottom: none;
  position: relative;
}

.tabs::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--accent), var(--accent-4), transparent);
  opacity: 0.55;
}

.tab {
  padding: 12px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--muted);
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  top: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  isolation: isolate;
}

.tab::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 10%, var(--tile-sheen), transparent 70%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 0;
}

.tab > * {
  position: relative;
  z-index: 1;
}

.tab:hover {
  color: var(--primary);
  background: var(--panel-2);
}

.tab:hover::after {
  opacity: 0.6;
  animation: sheen 1.4s ease;
}

.tab.active {
  color: var(--primary);
  background: linear-gradient(135deg, rgba(21, 139, 77, 0.12), rgba(52, 182, 228, 0.12), var(--panel));
  border-color: var(--border-hover);
  box-shadow: var(--shadow);
}

.tab.active::after {
  opacity: 0.55;
  animation: sheen 5s ease-in-out infinite;
}

.tab:active {
  transform: translateY(1px);
}

.tab-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.75;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.tab:hover .tab-icon {
  transform: translateY(-1px);
  opacity: 1;
}

.tab.active .tab-icon {
  opacity: 1;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.reveal {
  animation: fade-up 0.6s ease both;
}

.reveal.delay-1 {
  animation-delay: 0.06s;
}

.reveal.delay-2 {
  animation-delay: 0.12s;
}

.reveal.delay-3 {
  animation-delay: 0.18s;
}

.summary-grid.reveal .card {
  animation: fade-up 0.6s ease both;
}

.summary-grid.reveal .card:nth-child(2) {
  animation-delay: 0.08s;
}

.summary-grid.reveal .card:nth-child(3) {
  animation-delay: 0.14s;
}

.summary-grid.reveal .card:nth-child(4) {
  animation-delay: 0.2s;
}

.card {
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(6px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--card-glow);
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 10%, var(--tile-sheen), transparent 70%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 0;
}

.card > * {
  position: relative;
  z-index: 1;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.card:hover::before {
  opacity: 0.6;
}

.card:hover::after {
  opacity: 0.6;
  animation: sheen 1.6s ease;
}

.card.accent {
  background: linear-gradient(135deg, rgba(21, 139, 77, 0.16), rgba(52, 182, 228, 0.18), rgba(255, 255, 255, 0.98));
  border-color: rgba(21, 139, 77, 0.2);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.summary-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  color: var(--primary);
  background: linear-gradient(145deg, rgba(21, 139, 77, 0.14), rgba(52, 182, 228, 0.12));
  border: 1px solid rgba(21, 139, 77, 0.22);
  flex: 0 0 auto;
}

.summary-icon svg {
  width: 21px;
  height: 21px;
}

.card .label {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 8px;
}

.card .value {
  font-size: 32px;
  font-weight: 800;
  color: var(--text);
}

.card .hint {
  font-size: 14px;
}

.panel {
  display: none;
  background: transparent;
  border: none;
  padding: 0;
}

.panel.active {
  display: block;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.panel-head h2 {
  font-size: 28px;
  position: relative;
  padding: 8px 16px;
  border-radius: 14px;
  background: var(--tile-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--tile-shadow);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  isolation: isolate;
}

.panel-head h2::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 6px var(--primary-light);
  animation: blip-inline 3.2s ease-in-out infinite;
  flex: 0 0 auto;
  z-index: 1;
}

.panel-head h2::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 10%, var(--tile-sheen), transparent 70%);
  animation: sheen 10s ease-in-out infinite;
  pointer-events: none;
  z-index: 0;
}

.controls {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 12px 20px rgba(21, 139, 77, 0.22);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0;
  transform: translateX(-60%);
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.btn-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(21, 139, 77, 0.28);
}

.btn:hover::after {
  opacity: 1;
  transform: translateX(60%);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 10px 18px rgba(21, 139, 77, 0.22);
}

.btn.spark::before {
  content: "";
  position: absolute;
  inset: -70%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.5), transparent 60%);
  opacity: 0;
  transform: translate(-30%, -30%);
  transition: opacity 0.3s ease, transform 0.6s ease;
  pointer-events: none;
}

.btn.spark:hover::before {
  opacity: 0.9;
  transform: translate(20%, 20%);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.7);
  color: var(--primary);
  border: 1px solid rgba(21, 139, 77, 0.25);
  box-shadow: 0 8px 16px rgba(15, 30, 23, 0.08);
}

.btn.ghost:hover {
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.btn.ghost:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(15, 30, 23, 0.12);
}

body.is-loading #refresh-dataset .btn-icon {
  animation: spin 1s linear infinite;
}

.btn.tiny {
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: none;
}

input[type="search"],
input[type="text"],
select,
textarea {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 12px 16px;
  font-size: 15px;
  box-shadow: var(--input-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  text-align: left;
  color: var(--text);
}

.section-spacer {
  margin-top: 24px;
}

input[type="search"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input[type="search"]:hover,
input[type="text"]:hover,
select:hover,
textarea:hover {
  border-color: var(--border-hover);
  box-shadow: 0 10px 18px rgba(15, 30, 23, 0.14);
}

select {
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

#match-list.grid {
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
}

.list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.list-footer .hint {
  margin: 0;
}

.product-card {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(4px);
  transition: all 0.2s ease;
  position: relative;
  content-visibility: auto;
  contain-intrinsic-size: 260px 220px;
}

.product-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--card-glow);
  opacity: 0;
  transition: opacity 0.25s ease;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.product-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(120deg, transparent 10%, var(--tile-sheen), transparent 70%);
  opacity: 0;
  transform: translateX(-120%);
  pointer-events: none;
  z-index: 0;
}

.product-card > * {
  position: relative;
  z-index: 1;
}

.product-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.product-card:hover::before {
  opacity: 0.6;
}

.product-card:hover::after {
  opacity: 0.5;
  animation: sheen 1.6s ease;
}

.unavailable {
  color: var(--accent);
  font-weight: 800;
}

.match-card .match-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.match-card .match-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.match-card .match-gap {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.match-card .match-reasons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.reason-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--muted);
}

.reason-chip.ok {
  color: var(--primary-2);
  border-color: rgba(21, 139, 77, 0.35);
  background: rgba(21, 139, 77, 0.12);
}

.reason-chip.warn {
  color: #9c4f20;
  border-color: rgba(240, 138, 60, 0.35);
  background: rgba(240, 138, 60, 0.14);
}

.match-card .match-sides {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.match-card .match-side {
  padding: 12px;
  background: linear-gradient(160deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  min-width: 0;
}

.match-card .match-side .row {
  align-items: flex-start;
  min-width: 0;
}

.match-card .match-side-text {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.match-card .match-side-text strong {
  display: block;
  line-height: 1.28;
  letter-spacing: -0.01em;
}

.match-card .descriptor {
  margin: 4px 0 3px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--primary-2);
  font-weight: 600;
}

.match-card .match-side p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.match-card .unit-price {
  font-size: 13px;
  margin-top: 4px;
}

@media (max-width: 720px) {
  .match-card .match-sides {
    grid-template-columns: 1fr;
  }
}

.product-card .row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(230, 240, 236, 0.9));
  border: 1px solid var(--border);
  object-fit: contain;
  padding: 4px;
  box-shadow: 0 6px 16px rgba(15, 30, 23, 0.12);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.badge.warning {
  background: rgba(253, 126, 20, 0.1);
  border-color: rgba(253, 126, 20, 0.2);
  color: var(--accent);
}

.price-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.price-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.price-row span:first-child {
  flex: 1;
  min-width: 0;
  overflow: visible;
  text-overflow: unset;
  white-space: normal;
}

.price-row span:last-child {
  white-space: nowrap;
}

.tag {
  padding: 5px 10px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
}

.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.offer-link,
.offer-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--offer-bg);
  border: 1px solid var(--offer-border);
  color: var(--offer-text);
  font-weight: 700;
  font-size: 12px;
  text-decoration: none;
  box-shadow: var(--offer-shadow);
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.offer-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}

.offer-arrow {
  width: 7px;
  height: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
  flex: 0 0 auto;
}

.offer-link:hover {
  transform: translateY(-1px);
  border-color: var(--primary);
  box-shadow: 0 12px 22px rgba(15, 30, 23, 0.18);
}

.offer-link:hover .offer-arrow {
  transform: translate(2px, -1px) rotate(45deg);
}

.offer-link:active {
  transform: translateY(0);
}

.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
}

.link {
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 14px rgba(15, 30, 23, 0.08);
}

.link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  opacity: 0;
  transform: translateX(-60%);
  transition: transform 0.6s ease, opacity 0.4s ease;
}

.link:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
}

.link:hover::after {
  opacity: 1;
  transform: translateX(60%);
}

.link:active {
  transform: translateY(0);
  box-shadow: 0 6px 12px rgba(15, 30, 23, 0.12);
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.toggle input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.toggle:hover {
  color: var(--text);
}

.toggle input[type="checkbox"]:checked + span {
  color: var(--text);
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.stat-card h3 {
  margin: 0 0 12px 0;
  font-size: 18px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding: 6px 0;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.stat-row:last-child {
  border-bottom: none;
}

.list-builder {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "input results";
  gap: 20px;
  background: var(--panel);
  padding: 20px;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.list-builder:focus-within {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

.input-zone {
  grid-area: input;
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}

.input-zone textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  margin-top: 12px;
}

.results {
  grid-area: results;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  min-height: 220px;
}

.result-item {
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.result-item.section-header {
  cursor: default;
}

.result-item.checkable {
  cursor: pointer;
}

.check-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.tick {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--primary);
}

.check-content {
  flex: 1;
  min-width: 0;
}

.multibuy-cta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}

.multibuy-cta .hint {
  margin: 0;
}

.check-label {
  font-weight: 700;
  font-size: 16px;
  color: var(--text);
  margin-bottom: 6px;
}

.result-item.checked {
  opacity: 0.65;
}

.result-item.checked .price-row span:first-child,
.result-item.checked .check-label {
  text-decoration: line-through;
}

.result-item:last-child {
  border-bottom: none;
}

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
}

.overlay.active {
  display: flex;
}

.overlay-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  width: min(560px, 90vw);
  box-shadow: var(--shadow);
}

.overlay-list {
  display: grid;
  gap: 10px;
  margin: 12px 0;
}

.overlay-item {
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s ease;
}

.overlay-item:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hint {
  font-size: 14px;
  color: var(--muted);
}

.hint.warn {
  color: var(--accent);
  font-weight: 700;
}

@media (max-width: 980px) {
  .hero {
    align-items: flex-start;
    gap: 16px;
    grid-template-columns: 1fr;
    min-height: 420px;
    padding: 28px 22px;
  }

  .hero-copy {
    flex: 0 0 auto;
    width: 100%;
    max-width: 620px;
  }

  .hero-title {
    font-size: 34px;
    padding: 9px 16px;
  }

  .heading-tiles {
    gap: 8px;
  }

  .hero-visual {
    inset: 0;
  }

  .hero-illustration {
    object-position: 58% center;
  }

  .hero-chip {
    display: none;
  }

  .hero-meta {
    align-self: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 768px) {
  .page-shell {
    padding: 18px 14px calc(72px + env(safe-area-inset-bottom, 0px));
  }

  .hero-title {
    font-size: 30px;
    padding: 8px 14px;
  }

  .tile {
    font-size: 11px;
    padding: 5px 10px 5px 26px;
  }

  .hero {
    gap: 12px;
    min-height: 380px;
    padding: 24px 18px;
  }

  .hero::before {
    background: linear-gradient(180deg, rgba(245, 248, 246, 0.96) 0%, rgba(245, 248, 246, 0.82) 42%, rgba(245, 248, 246, 0.12) 100%);
  }

  .dark-mode .hero::before {
    background: linear-gradient(180deg, rgba(10, 24, 36, 0.96) 0%, rgba(10, 24, 36, 0.82) 45%, rgba(10, 24, 36, 0.28) 100%);
  }

  .hero-meta {
    justify-content: flex-start;
  }

  .data-source {
    flex-direction: column;
    align-items: stretch;
  }

  .data-source .controls {
    width: 100%;
    justify-content: flex-start;
  }

  .tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-bottom: none;
  }

  .tab {
    top: 0;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    background: var(--glass);
    padding: 12px 14px;
    text-align: center;
  }

  .tab.active {
    background: var(--panel);
    border-color: var(--border);
    box-shadow: var(--shadow);
  }

  .panel-head {
    flex-direction: column;
    align-items: stretch;
  }

  .controls {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .controls > * {
    width: 100%;
  }

  .controls .btn.ghost.icon-btn {
    border-radius: 12px;
  }

  #shopping .controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  #shopping #generate-list {
    grid-column: 1 / -1;
  }

  #shopping #download-list {
    grid-column: 1 / -1;
  }

  #shopping .panel-head p {
    display: none;
  }

  .list-builder {
    grid-template-columns: 1fr;
    grid-template-areas: "results" "input";
    padding: 14px;
  }

  .input-zone,
  .results {
    padding: 14px;
  }

  .price-row span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .price-row span:last-child {
    white-space: nowrap;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  #match-list.grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

.btn.ghost.icon-btn {
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.btn.ghost.icon-btn svg {
  transition: all 0.2s ease;
}

.btn:focus-visible,
.link:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes haze {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate3d(2%, -1%, 0) scale(1.02);
    opacity: 0.6;
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@keyframes chip-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  60%,
  100% {
    transform: translateX(100%);
  }
}

@keyframes sheen {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }
  20% {
    opacity: var(--sheen-max);
  }
  50% {
    opacity: var(--sheen-max);
  }
  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@keyframes blip {
  0%,
  100% {
    transform: translateY(-50%) scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: translateY(-50%) scale(1.15);
    opacity: 1;
  }
}

@keyframes blip-inline {
  0%,
  100% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.15);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.dark-mode .btn.ghost.icon-btn svg {
  stroke: var(--primary);
}

.dark-mode {
  --bg: #0a1824;
  --bg-2: #0c2231;
  --panel: #0f283a;
  --panel-2: #0c2231;
  --border: #1c3a50;
  --text: #e7f1f7;
  --muted: #8ba2b6;
  --primary: #f02e37;
  --primary-2: #d9282f;
  /* Coles Red */
  --primary-light: rgba(240, 46, 55, 0.2);
  --accent: #ff9b4a;
  --accent-2: #46d190;
  --accent-3: #f2c06a;
  --accent-4: #3bb4e4;
  --card: linear-gradient(170deg, rgba(16, 40, 56, 0.96), rgba(10, 28, 41, 0.98));
  --card-glow: linear-gradient(135deg, rgba(240, 46, 55, 0.22), rgba(255, 155, 74, 0.18), rgba(70, 209, 144, 0.16));
  --shadow: 0 16px 40px rgba(2, 10, 20, 0.55);
  --shadow-hover: 0 22px 52px rgba(2, 10, 20, 0.7);
  --border-hover: rgba(240, 46, 55, 0.55);
  --ring: 0 0 0 3px rgba(240, 46, 55, 0.25);
  --grid-line: rgba(255, 255, 255, 0.06);
  --bg-glow: radial-gradient(circle at 15% 15%, rgba(240, 46, 55, 0.12), transparent 35%),
    radial-gradient(circle at 85% 10%, rgba(255, 155, 74, 0.12), transparent 40%),
    radial-gradient(circle at 8% 70%, rgba(59, 180, 228, 0.12), transparent 40%),
    radial-gradient(circle at 90% 70%, rgba(70, 209, 144, 0.12), transparent 45%),
    linear-gradient(180deg, #0a1824 0%, #0a1f2c 55%, #0a1824 100%);
  --glass: rgba(12, 30, 43, 0.75);
  --glass-border: rgba(255, 255, 255, 0.06);
  --tile-bg: rgba(12, 30, 43, 0.86);
  --tile-border: rgba(240, 46, 55, 0.5);
  --tile-shadow: 0 14px 28px rgba(2, 10, 20, 0.65);
  --tile-sheen: rgba(255, 255, 255, 0.2);
  --sheen-max: 0.28;
  --tile-blip: rgba(240, 46, 55, 0.95);
  --tile-blip-glow: rgba(240, 46, 55, 0.35);
  --offer-bg: rgba(70, 209, 144, 0.16);
  --offer-border: rgba(70, 209, 144, 0.45);
  --offer-text: var(--accent-2);
  --offer-shadow: 0 12px 20px rgba(2, 10, 20, 0.55);
  --halo-1: rgba(255, 255, 255, 0.08);
  --halo-2: rgba(255, 255, 255, 0.06);
  --halo-3: rgba(255, 255, 255, 0.05);
  --input-bg: rgba(12, 30, 43, 0.7);
  --input-shadow: 0 10px 18px rgba(2, 10, 20, 0.45);
}

.dark-mode .dot::after {
  background: radial-gradient(circle, rgba(240, 46, 55, 0.35), transparent 70%);
}

.dark-mode .overlay {
  background: rgba(6, 15, 25, 0.8);
}

.dark-mode .btn {
  box-shadow: 0 12px 22px rgba(240, 46, 55, 0.35);
  color: #0b1012;
}

.dark-mode .btn:hover {
  box-shadow: 0 16px 30px rgba(240, 46, 55, 0.4);
}

.dark-mode .btn.ghost {
  background: rgba(12, 30, 43, 0.6);
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 18px rgba(2, 10, 20, 0.35);
}

.dark-mode .btn.ghost:hover {
  background: var(--primary-light);
  color: var(--text);
  border-color: var(--primary);
}

.dark-mode .pill.loading::after {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

.dark-mode input[type="search"]:focus,
.dark-mode input[type="text"]:focus,
.dark-mode select:focus,
.dark-mode textarea:focus {
  box-shadow: 0 0 0 3px var(--primary-light);
}

.dark-mode .badge {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.2);
}

.dark-mode .badge.warning {
  background: rgba(253, 126, 20, 0.1);
  border-color: rgba(253, 126, 20, 0.2);
  color: var(--accent);
}

@media (max-width: 480px) {
  .tabs {
    grid-template-columns: 1fr;
  }

  .btn.ghost.icon-btn {
    padding: 12px;
  }

  .tick {
    width: 22px;
    height: 22px;
  }
}

/* Autocomplete Suggestions */
.quick-add-wrapper {
  position: relative;
  z-index: 10;
}

.quick-add-bar {
  position: relative;
  display: flex;
  gap: 10px;
  align-items: center;
}

.quick-add-input {
  position: relative;
  flex: 1;
  min-width: 220px;
}

.quick-add-input input[type="text"] {
  width: 100%;
}

.suggestions-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
  z-index: 30;
  display: none;
  margin-top: 4px;
}

.suggestion-item {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover,
.suggestion-item.selected {
  background: var(--primary-light);
  color: var(--primary);
}

.suggestion-item .meta {
  font-size: 12px;
  color: var(--muted);
}

@media (max-width: 768px) {
  .quick-add-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .quick-add-input {
    min-width: 0;
  }

  .suggestions-dropdown {
    max-height: 40vh;
  }
}
