:root {
  --primary: #1976D2;
  --primary-dark: #115293;
  --primary-soft: #E8F1FC;
  --price: #D32F2F;
  --coles: #E01A22;
  --coles-soft: #FDECEC;
  --woolworths: #125C36;
  --woolworths-soft: #E8F5EE;
  --rare-bg: #FEF3C7;
  --rare-fg: #92400E;
  --bg: #F8F9FF;
  --surface: #FFFFFF;
  --surface-alt: #F2F4F8;
  --text: #191C20;
  --text-muted: #4A515B;
  --border: #DCE1EB;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
  --max-width: 1120px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding-bottom: 84px;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  line-height: 1.25;
  margin-top: 0;
}

p, li {
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible, button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  background: var(--primary);
  color: #FFFFFF;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 60px;
  padding: 8px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.site-nav a {
  color: #FFFFFF;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.18);
  text-decoration: none;
}

.site-nav a.nav-cta {
  background: #FFFFFF;
  color: var(--primary);
}

.site-nav a.nav-cta:hover {
  background: #EEF4FF;
}

/* Notice banner */
.nsw-notice {
  background: var(--primary-soft);
  border-bottom: 1px solid var(--border);
  color: #0D3B66;
  font-size: 0.875rem;
  padding: 8px 0;
}

.nsw-notice-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* Hero */
.hero {
  padding: 28px 0 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.625rem, 4vw, 2.25rem);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 1.025rem;
  max-width: 68ch;
  margin: 0 0 20px;
}

/* Buttons */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
}

.btn-coles {
  background: var(--coles);
  color: #FFFFFF;
}

.btn-woolworths {
  background: var(--woolworths);
  color: #FFFFFF;
}

/* Store navigation cards */
.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}

.store-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  color: var(--text);
}

.store-card:hover {
  text-decoration: none;
  border-color: var(--primary);
}

.store-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
}

.store-pill.coles {
  background: var(--coles-soft);
  color: var(--coles);
}

.store-pill.woolworths {
  background: var(--woolworths-soft);
  color: var(--woolworths);
}

.store-count {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Category chips */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin: 28px 0 14px;
}

.section-header h2 {
  font-size: 1.35rem;
  margin: 0;
}

.section-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}

.category-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
}

.category-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  text-decoration: none;
}

.category-chip[aria-current="page"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #FFFFFF;
}

.category-chip .chip-count {
  font-weight: 500;
  opacity: 0.75;
  font-size: 0.8125rem;
}

/* Product grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.product-grid-deferred {
  content-visibility: auto;
  contain-intrinsic-size: auto none auto 640px;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #FFFFFF;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 8px;
}

.product-media img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.product-badges {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.rare-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--rare-bg);
  color: var(--rare-fg);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 700;
}

.rarity-note {
  display: inline-flex;
  align-items: center;
  background: var(--surface-alt);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.75rem;
  font-weight: 600;
}

.product-title {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-size {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin: 0;
}

.product-pricing {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.price-now {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--price);
}

.price-was {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.price-save {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--price);
  background: #FEE2E2;
  padding: 2px 6px;
  border-radius: 6px;
}

/* App feature callout (anti-cannibalisation) */
.app-callout {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}

.app-callout h2 {
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
  margin: 12px 0 18px;
}

.feature-list li {
  background: var(--surface-alt);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.9rem;
}

.feature-list strong {
  display: block;
  margin-bottom: 2px;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  padding: 14px 0 0;
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.breadcrumb li + li::before {
  content: "/";
  margin-right: 6px;
  color: var(--border);
}

/* Landing page (/get) */
.landing-card {
  max-width: 560px;
  margin: 32px auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.landing-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  margin: 0 auto 14px;
  display: block;
  box-shadow: var(--shadow);
}

.landing-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 14px;
}

.landing-actions .btn {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
}

.landing-alt {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 8px 0 0;
}

/* Empty state */
.empty-state {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  margin: 20px 0;
}

/* Sticky bottom CTA bar */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: #102A43;
  color: #FFFFFF;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 16px;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
}

.sticky-cta-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticky-cta-copy {
  font-size: 0.875rem;
  line-height: 1.35;
}

.sticky-cta-copy strong {
  display: block;
  font-size: 0.9375rem;
}

.sticky-cta .btn {
  padding: 9px 16px;
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0 32px;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .product-card {
    padding: 10px;
  }

  .price-now {
    font-size: 1.1rem;
  }

  .sticky-cta-copy span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
