/* ==========================================================================
   Meniul Ofertei — Styles
   Aesthetic: Chalkboard background, receipt/paper cards, torn edges
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Core palette */
  --chalk: #1C2A22;
  --chalk-light: #263830;
  --paper: #EFE6D0;
  --paper-dark: #E2D6BB;
  --ink: #2C2C2C;
  --ink-light: #555;

  /* Accent colors */
  --paprika: #C4432B;
  --mustard: #D9A72E;
  --leaf: #7A9B5C;
  --plum: #9C6B98;

  /* Store tag colors */
  --lidl-bg: #0050AA;
  --lidl-text: #FFF;
  --kaufland-bg: #E3000F;
  --kaufland-text: #FFF;
  --mega-bg: #D4145A;
  --mega-text: #FFF;
  --penny-bg: #CD1414;
  --penny-text: #FFF;
  --auchan-bg: #83B81A;
  --auchan-text: #FFF;
  --carrefour-bg: #004E9A;
  --carrefour-text: #FFF;

  /* Typography */
  --font-heading: 'Fraunces', serif;
  --font-body: 'Space Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 5rem;

  /* Layout */
  --container-max: 1200px;
  --header-height: 64px;
  --radius: 4px;
  --radius-lg: 8px;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure [hidden] always wins over display rules */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + var(--space-lg));
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--paper);
  background-color: var(--chalk);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(122, 155, 92, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(156, 107, 152, 0.04) 0%, transparent 50%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Screen reader only */
.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;
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--mustard);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ---------- Sticky Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--chalk);
  border-bottom: 1px solid rgba(239, 230, 208, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  color: var(--paper);
}

.logo-icon {
  font-size: 1.5rem;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.powered-by {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: rgba(239, 230, 208, 0.7);
  padding-left: 2.25rem;
  letter-spacing: 0.02em;
}

.powered-by strong {
  color: var(--mustard);
  font-weight: 500;
}

.header-right {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.social-links {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: rgba(239, 230, 208, 0.6);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}

.social-link:hover {
  color: var(--paper);
  background: rgba(239, 230, 208, 0.1);
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(239, 230, 208, 0.7);
  text-decoration: none;
  margin-left: var(--space-md);
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--paper);
}

/* ---------- Hero Section ---------- */
.hero {
  padding: var(--space-2xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 140%;
  height: 200%;
  background: radial-gradient(ellipse at center, rgba(122, 155, 92, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
}

.hero-headline {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--paper);
  margin-bottom: var(--space-lg);
}

.hero-highlight {
  color: var(--mustard);
  font-style: italic;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(239, 230, 208, 0.7);
  max-width: 580px;
  margin: 0 auto var(--space-xl);
  line-height: 1.7;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.85rem 2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.btn-primary {
  background: var(--paprika);
  color: #fff;
}

.btn-secondary-hero {
  background: transparent;
  color: var(--paper);
  border: 2px solid rgba(239, 230, 208, 0.4);
}

.btn-secondary-hero:hover {
  border-color: var(--paper);
  background: rgba(239, 230, 208, 0.08);
}

.hero-buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-disclaimer {
  margin-top: var(--space-lg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(239, 230, 208, 0.65);
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

/* ---------- Flyer Strip ---------- */
.flyer-strip {
  padding: var(--space-lg) 0;
  overflow: hidden;
}

.generate-cta {
  text-align: center;
  margin-top: var(--space-lg);
}

/* Dietary Filters */
.dietary-filters {
  margin-top: var(--space-lg);
  text-align: center;
}

.dietary-title {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--paper);
  margin-bottom: var(--space-sm);
}

.dietary-optional {
  font-weight: 400;
  font-size: 0.75rem;
  color: rgba(239, 230, 208, 0.65);
}

.dietary-options {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
}

.dietary-chip {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.dietary-checkbox {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.dietary-chip-label {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: var(--space-xs) var(--space-md);
  border-radius: 20px;
  border: 1px solid rgba(239, 230, 208, 0.25);
  color: rgba(239, 230, 208, 0.7);
  transition: all 0.2s ease;
  user-select: none;
}

.dietary-chip-label:hover {
  border-color: var(--mustard);
  color: var(--paper);
}

.dietary-checkbox:checked + .dietary-chip-label {
  background: var(--mustard);
  border-color: var(--mustard);
  color: var(--chalk);
  font-weight: 600;
}

.btn-generate {
  font-size: 1.1rem;
  padding: 1rem 2.5rem;
}

.generate-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: rgba(239, 230, 208, 0.7);
  margin-top: var(--space-sm);
}

.flyer-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.flyer-card {
  background: var(--paper);
  color: var(--ink);
  padding: var(--space-sm);
  border-radius: var(--radius-lg);
  text-align: center;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, outline 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  user-select: none;
  overflow: hidden;
}

.flyer-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.flyer-card--active:hover {
  transform: none;
}

.flyer-card--active {
  transform: none !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  outline: 3px solid var(--mustard);
  outline-offset: -3px;
}

.flyer-card--active .flyer-tagline {
  color: var(--ink);
  font-weight: 500;
}

.flyer-logo {
  height: 40px;
  width: 100%;
  max-width: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.flyer-store-name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
}

.flyer-tagline {
  font-size: 0.75rem;
  color: var(--ink-light);
  font-family: var(--font-mono);
}

.flyer-lidl .flyer-store-name { color: var(--lidl-bg); }
.flyer-kaufland .flyer-store-name { color: var(--kaufland-bg); }
.flyer-carrefour .flyer-store-name { color: var(--carrefour-bg); }
.flyer-mega .flyer-store-name { color: var(--mega-bg); }
.flyer-penny .flyer-store-name { color: var(--penny-bg); }
.flyer-auchan .flyer-store-name { color: var(--auchan-bg); }

/* ---------- Recipes Section ---------- */
.recipes-section {
  padding: var(--space-xl) 0;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--space-sm);
  color: var(--paper);
}

.section-subtitle {
  text-align: center;
  color: rgba(239, 230, 208, 0.6);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin-bottom: var(--space-sm);
}

.section-cta {
  text-align: center;
  color: var(--mustard);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: var(--space-xl);
}

/* Loading State */
.recipe-loading {
  text-align: center;
  padding: var(--space-xl);
  color: rgba(239, 230, 208, 0.6);
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(239, 230, 208, 0.2);
  border-top-color: var(--mustard);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto var(--space-md);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Empty State */
.recipe-empty {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
}

.empty-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-md);
}

.empty-text {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--paper);
}

.empty-subtext {
  color: rgba(239, 230, 208, 0.6);
  font-size: 0.95rem;
}

/* ---------- Recipe Grid ---------- */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-xl);
}

/* ---------- Recipe Card (Receipt Style) ---------- */
.recipe-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius);
  padding: var(--space-lg);
  padding-top: calc(var(--space-lg) + 12px);
  position: relative;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

/* Perforated top edge */
.recipe-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 12px;
  background-image: radial-gradient(circle at 10px 0, transparent 8px, var(--paper) 8px);
  background-size: 20px 12px;
  background-position: 0 0;
  background-repeat: repeat-x;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Torn bottom edge */
.recipe-card::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  right: 0;
  height: 8px;
  background: linear-gradient(135deg, var(--paper) 33.33%, transparent 33.33%) 0 0,
              linear-gradient(225deg, var(--paper) 33.33%, transparent 33.33%) 0 0;
  background-size: 12px 8px;
  background-repeat: repeat-x;
}

/* Store Tag */
.recipe-tag {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: 3px;
  line-height: 1;
}

.recipe-card-badges {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}

.recipe-meal-badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 3px;
  line-height: 1;
  height: auto;
}

.meal-breakfast {
  background: #FFF3CD;
  color: #856404;
}

.meal-lunch-dinner {
  background: #D4EDDA;
  color: #155724;
}

/* Dietary Badges on Cards */
.recipe-dietary-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  padding: 2px 4px;
  border-radius: 3px;
  line-height: 1;
}

.diet-vegetarian { background: #E8F5E9; }
.diet-gluten-free { background: #FFF8E1; }
.diet-lactose-free { background: #E3F2FD; }
.diet-nut-free { background: #FBE9E7; }

/* Savings Badge */
.recipe-savings {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #E8F5E9;
  border: 1px solid #A5D6A7;
  border-radius: var(--radius);
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-md);
}

/* Portions Info */
.recipe-portions-info {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: 0.8rem;
  color: var(--ink-light);
  margin-bottom: var(--space-sm);
  padding: var(--space-xs) 0;
}

.portions-icon {
  font-size: 0.9rem;
}

.portions-text strong {
  color: var(--ink);
}

.savings-amount {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: #2E7D32;
}

.savings-percent {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  color: #1B5E20;
  background: #C8E6C9;
  padding: 2px 6px;
  border-radius: 3px;
}

.tag-lidl { background: var(--lidl-bg); color: var(--lidl-text); }
.tag-kaufland { background: var(--kaufland-bg); color: var(--kaufland-text); }
.tag-carrefour { background: var(--carrefour-bg); color: var(--carrefour-text); }
.tag-mega { background: var(--mega-bg); color: var(--mega-text); }
.tag-penny { background: var(--penny-bg); color: var(--penny-text); }
.tag-auchan { background: var(--auchan-bg); color: var(--auchan-text); }

/* Card Photo Area */
.recipe-photo {
  font-size: 2.5rem;
  text-align: center;
  padding: var(--space-md) 0;
  background: rgba(28, 42, 34, 0.04);
  border-radius: var(--radius);
  margin-bottom: var(--space-md);
}

/* Card Title */
.recipe-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

/* Card Meta (prep time, servings, cost) */
.recipe-meta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px dashed rgba(44, 44, 44, 0.2);
}

.recipe-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Ingredients List */
.recipe-ingredients {
  list-style: none;
  margin-bottom: var(--space-md);
  font-size: 0.85rem;
}

.recipe-ingredients li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 4px 0;
  border-bottom: 1px dotted rgba(44, 44, 44, 0.15);
}

.recipe-ingredients li:last-child {
  border-bottom: none;
}

.ingredient-name {
  flex: 1;
}

.ingredient-price-old {
  text-decoration: line-through;
  color: var(--ink-light);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  margin-right: var(--space-sm);
}

.ingredient-price-new {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--paprika);
}

/* Card Total */
.recipe-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-sm) 0;
  margin-top: var(--space-sm);
  border-top: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
}

.recipe-total-label {
  font-size: 0.85rem;
}

.recipe-total-amount {
  font-size: 1.1rem;
  color: var(--paprika);
  font-weight: 700;
}

/* Card Link */
.recipe-link {
  display: block;
  text-align: center;
  margin-top: var(--space-md);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--chalk);
  background: var(--leaf);
  color: #fff;
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.recipe-link:hover {
  background: #6a8a4f;
  transform: translateY(-1px);
}

/* ---------- How It Works Section ---------- */
.how-section {
  padding: var(--space-2xl) 0;
  background: var(--chalk-light);
  position: relative;
}

.how-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(239, 230, 208, 0.15), transparent);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-xl);
}

.step-card {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  text-align: left;
  padding: var(--space-md) var(--space-lg);
  position: relative;
  border: 1px solid rgba(239, 230, 208, 0.1);
  border-radius: var(--radius-lg);
  transition: border-color 0.3s ease;
}

.step-card:hover {
  border-color: rgba(239, 230, 208, 0.25);
}

.step-number {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--paper);
  min-width: 32px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 230, 208, 0.12);
  border-radius: 50%;
  flex-shrink: 0;
}

.step-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-md);
}

.step-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--paper);
}

.step-desc {
  font-size: 0.9rem;
  color: rgba(239, 230, 208, 0.7);
  line-height: 1.6;
}

/* ---------- Grocery List Modal ---------- */
.grocery-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: fadeIn 0.2s ease;
}

.grocery-modal-overlay.grocery-modal--open {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.grocery-modal {
  background: var(--paper);
  color: var(--ink);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.25s ease;
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.grocery-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px dashed rgba(44, 44, 44, 0.2);
}

.grocery-modal-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: var(--space-xs);
}

.grocery-modal-subtitle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.grocery-modal-close {
  background: none;
  border: none;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--ink-light);
  cursor: pointer;
  padding: 0 var(--space-xs);
  transition: color 0.2s ease;
}

.grocery-modal-close:hover {
  color: var(--paprika);
}

.grocery-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-md) var(--space-lg);
}

.grocery-list {
  list-style: none;
}

.grocery-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px dotted rgba(44, 44, 44, 0.12);
  transition: opacity 0.2s ease;
}

.grocery-item:last-child {
  border-bottom: none;
}

.grocery-item--checked {
  opacity: 0.5;
}

.grocery-item--checked .grocery-item-name {
  text-decoration: line-through;
}

.grocery-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid var(--ink-light);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.grocery-checkbox:checked {
  background: var(--leaf);
  border-color: var(--leaf);
}

.grocery-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.grocery-item-name {
  flex: 1;
  font-size: 0.9rem;
  color: var(--ink);
}

.grocery-item-price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--paprika);
  white-space: nowrap;
}

.grocery-modal-footer {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  border-top: 2px solid var(--ink);
}

.grocery-modal-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-md);
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.grocery-modal-savings {
  flex-basis: 100%;
  margin-top: var(--space-sm);
}

.grocery-total-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}

.grocery-total-amount {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--paprika);
}

.grocery-modal-actions {
  display: flex;
  gap: var(--space-sm);
}

.grocery-modal-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  padding: 0.7rem var(--space-md);
}

.btn-secondary {
  background: transparent;
  color: var(--paper);
  border: 1px solid rgba(239, 230, 208, 0.4);
}

.btn-secondary:hover {
  background: rgba(239, 230, 208, 0.08);
  border-color: var(--paper);
}

/* Override for secondary buttons inside light-background modals */
.grocery-modal .btn-secondary {
  color: var(--ink);
  border: 1px solid rgba(44, 44, 44, 0.3);
}

.grocery-modal .btn-secondary:hover {
  background: rgba(44, 44, 44, 0.06);
  border-color: var(--ink);
}

/* Saved confirmation toast */
.grocery-toast {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 300;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  width: max-content;
  max-width: 88vw;
  text-align: center;
}

.grocery-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* Recipe Picker Items */
.picker-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.picker-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid rgba(44, 44, 44, 0.1);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  text-align: left;
  width: 100%;
  font-family: var(--font-body);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.picker-item:hover {
  background: rgba(122, 155, 92, 0.08);
  border-color: var(--leaf);
}

.picker-item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

.picker-item--disabled:hover {
  background: transparent;
  border-color: rgba(44, 44, 44, 0.1);
}

.picker-item-emoji {
  font-size: 1.5rem;
  min-width: 36px;
  text-align: center;
}

.picker-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.picker-item-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink);
}

.picker-item-meta {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-light);
}

/* Recipe card clickable state */
.recipe-card {
  cursor: default;
}

/* Recipe Card Action Buttons */
.recipe-card-actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.btn-card {
  flex: 1;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  padding: var(--space-sm) var(--space-sm);
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-card:hover {
  transform: translateY(-1px);
}

.btn-card-grocery {
  background: var(--leaf);
  color: #fff;
}

.btn-card-grocery:hover {
  background: #6a8a4f;
}

.btn-card-prep {
  background: var(--mustard);
  color: #fff;
}

.btn-card-prep:hover {
  background: #c4961f;
}

/* Preparation Steps */
.prep-steps {
  list-style: none;
  counter-reset: prep-counter;
}

.prep-step {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  border-bottom: 1px dotted rgba(44, 44, 44, 0.12);
  align-items: flex-start;
}

.prep-step:last-child {
  border-bottom: none;
}

.prep-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  background: var(--mustard);
  color: #fff;
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
}

.prep-step-text {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.5;
  padding-top: 2px;
}

.prep-empty {
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  color: var(--ink-light);
}

.prep-empty .empty-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: var(--space-md);
}

/* ---------- Weekly Meal Planner ---------- */
.planner-section {
  padding: var(--space-xl) 0;
  background: var(--chalk-light);
  position: relative;
}

.planner-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(239, 230, 208, 0.15), transparent);
}

/* Locked state */
.planner-locked {
  text-align: center;
  padding: var(--space-2xl) var(--space-lg);
  border: 2px dashed rgba(239, 230, 208, 0.2);
  border-radius: var(--radius-lg);
  margin-top: var(--space-lg);
}

.planner-locked-content {
  max-width: 400px;
  margin: 0 auto;
}

.planner-locked-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: var(--space-md);
}

.planner-locked-content h3 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: var(--space-sm);
}

.planner-locked-content p {
  color: rgba(239, 230, 208, 0.6);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.planner-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.planner-day {
  background: var(--chalk);
  border: 1px solid rgba(239, 230, 208, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  min-height: 180px;
  overflow: hidden;
}

.planner-day-name {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--paper);
  text-align: center;
  margin-bottom: var(--space-sm);
  padding-bottom: var(--space-xs);
  border-bottom: 1px solid rgba(239, 230, 208, 0.1);
}

.planner-slot {
  background: rgba(239, 230, 208, 0.05);
  border: 1px dashed rgba(239, 230, 208, 0.15);
  border-radius: var(--radius);
  padding: var(--space-xs) var(--space-sm);
  margin-bottom: var(--space-xs);
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  font-size: 0.7rem;
  overflow: hidden;
}

.planner-slot:hover {
  border-color: var(--mustard);
  background: rgba(217, 167, 46, 0.05);
}

.planner-slot.slot-filled {
  border-style: solid;
  border-color: rgba(239, 230, 208, 0.6);
  background: rgba(239, 230, 208, 0.08);
}

.slot-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(239, 230, 208, 0.7);
  white-space: nowrap;
  flex-shrink: 0;
}

.slot-empty {
  color: rgba(239, 230, 208, 0.55);
  font-size: 0.7rem;
}

.slot-recipe-name {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--paper);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
}

.planner-actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
}

/* ---------- Footer ---------- */
.site-footer {
  padding: var(--space-xl) 0;
  text-align: center;
  border-top: 1px solid rgba(239, 230, 208, 0.08);
}

.footer-brand {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--paper);
}

.footer-copy {
  font-size: 0.85rem;
  color: rgba(239, 230, 208, 0.7);
  margin-bottom: var(--space-xs);
}

.footer-author {
  font-size: 0.85rem;
  color: rgba(239, 230, 208, 0.7);
  margin-bottom: var(--space-xs);
}

.footer-author a {
  color: var(--mustard);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer-author a:hover {
  color: var(--paper);
  text-decoration: underline;
}

.footer-note {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: rgba(239, 230, 208, 0.65);
}

/* ---------- SEO Section ---------- */
.seo-section {
  padding: var(--space-xl) 0;
  border-top: 1px solid rgba(239, 230, 208, 0.06);
}

.seo-heading {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: rgba(239, 230, 208, 0.65);
  margin-bottom: var(--space-md);
  text-align: center;
}

.seo-text {
  font-size: 0.85rem;
  color: rgba(239, 230, 208, 0.6);
  line-height: 1.7;
  max-width: 720px;
  margin: 0 auto var(--space-md);
  text-align: center;
}

.seo-text:last-child {
  margin-bottom: 0;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .loading-spinner {
    animation: none;
    border-top-color: var(--mustard);
    opacity: 0.5;
  }

  .recipe-card:hover {
    transform: none;
  }

  .flyer-card {
    transform: none !important;
  }

  .flyer-card:hover {
    transform: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* ---------- Mobile Responsive ---------- */
@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .container {
    padding: 0 var(--space-md);
  }

  .hero {
    padding: var(--space-xl) 0;
  }

  .nav-link {
    margin-left: var(--space-md);
    font-size: 0.8rem;
  }

  .powered-by {
    padding-left: 2rem;
    font-size: 0.6rem;
  }

  .social-links {
    gap: var(--space-xs);
  }

  .social-link {
    width: 28px;
    height: 28px;
  }

  .social-link svg {
    width: 14px;
    height: 14px;
  }

  .flyer-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .flyer-card {
    min-width: unset;
    padding: var(--space-sm);
    height: 60px;
  }

  .flyer-logo {
    height: 32px;
  }

  .flyer-card:nth-child(n) {
    transform: none;
  }

  .flyer-store-name {
    font-size: 0.9rem;
  }

  .flyer-tagline {
    font-size: 0.65rem;
  }

  .recipe-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .planner-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-top: var(--space-md);
  }

  .how-section {
    padding: var(--space-lg) 0;
  }

  .step-card {
    padding: var(--space-sm) var(--space-md);
    gap: var(--space-sm);
  }

  .step-number {
    font-size: 1.1rem;
    width: 28px;
    height: 28px;
    min-width: 28px;
  }

  .step-desc {
    font-size: 0.8rem;
    line-height: 1.4;
  }

  .recipe-meta {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

@media (max-width: 480px) {
  .hero-headline {
    font-size: 1.75rem;
  }

  .hero-subtitle br {
    display: none;
  }

  .flyer-card {
    padding: var(--space-xs) var(--space-sm);
  }

  .flyer-store-name {
    font-size: 0.8rem;
  }

  .flyer-tagline {
    font-size: 0.6rem;
  }

  .header-right nav {
    display: none;
  }

  .powered-by {
    padding-left: 0;
  }

  .logo-icon {
    display: none;
  }
}
