/* ============================================
   PlanComida — Estilos principales
   Mobile-first, tonos verdes y tierra
   ============================================ */

/* ---------- Variables ---------- */
:root {
  --primary:        #2d6a4f;
  --primary-dark:   #1b4332;
  --primary-light:  #52b788;
  --accent:         #95d5b2;
  --warm:           #a17c5b;
  --warm-light:     #d4a373;
  --warm-pale:      #fdebd0;
  --bg:             #f7f3ee;
  --bg-card:        #ffffff;
  --bg-subtle:      #f0ebe3;
  --text:           #1e1e1e;
  --text-muted:     #6b6b6b;
  --text-light:     #9a9a9a;
  --border:         #e0d8cc;
  --shadow-sm:      0 2px 8px rgba(45, 106, 79, 0.08);
  --shadow-md:      0 4px 20px rgba(45, 106, 79, 0.12);
  --shadow-lg:      0 8px 40px rgba(45, 106, 79, 0.16);
  --radius-sm:      8px;
  --radius-md:      14px;
  --radius-lg:      20px;
  --radius-xl:      28px;
  --transition:     0.25s ease;
  --font-head:      'Playfair Display', Georgia, serif;
  --font-body:      'Nunito', system-ui, sans-serif;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(161,124,91,0.12) 1px, transparent 0);
  background-size: 28px 28px;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; }

h1 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 4vw, 2rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }

/* ---------- Layout ---------- */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1rem;
}

.hidden { display: none !important; }

/* ---------- Header ---------- */
.site-header {
  background: var(--primary-dark);
  padding: 0.9rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: white;
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.logo-sub {
  font-size: 0.65rem;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  line-height: 1;
}

.header-badge {
  background: rgba(255,255,255,0.12);
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  white-space: nowrap;
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(135deg, rgba(27,67,50,0.91) 0%, rgba(45,106,79,0.80) 50%, rgba(27,67,50,0.88) 100%),
    url('https://images.unsplash.com/photo-1504674900247-0877df9cc836?w=1920&q=80') center/cover no-repeat;
  background-color: var(--primary-dark); /* fallback mientras carga la imagen */
  color: white;
  padding: 3rem 0 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0,0,0,0.28) 100%);
  pointer-events: none;
}

.hero .container { position: relative; }

.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.2);
  margin-bottom: 1rem;
}

.hero h1 {
  color: white;
  margin-bottom: 1rem;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero h1 span {
  color: var(--accent);
}

.hero-desc {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  font-family: var(--font-head);
  color: var(--accent);
}

.hero-stat span {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- AdSense Slots ---------- */
.adsense-slot {
  width: 100%;
  min-height: 90px;
  background: rgba(0,0,0,0.02);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.75rem;
  margin: 1.5rem 0;
}

/* ---------- Form Section ---------- */
.form-section {
  padding: 2.5rem 0 2rem;
}

.form-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 2rem 1.5rem;
  border: 1px solid var(--border);
}

.form-card h2 {
  color: var(--primary-dark);
  margin-bottom: 0.4rem;
}

.form-card .form-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}

.form-grid {
  display: grid;
  gap: 1.4rem;
}

.form-group { display: flex; flex-direction: column; gap: 0.5rem; }

.form-label {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--primary-dark);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.form-label .label-icon { font-size: 1rem; }

/* Budget Slider */
.slider-wrapper {
  position: relative;
  padding: 0.5rem 0;
}

.slider-display {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.slider-value {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.slider-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-light);
  margin-top: 0.3rem;
}

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--primary-light) 0%, var(--primary-light) var(--slider-pct, 30%), var(--border) var(--slider-pct, 30%), var(--border) 100%);
  outline: none;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45,106,79,0.4);
  border: 3px solid white;
  transition: transform var(--transition), box-shadow var(--transition);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(45,106,79,0.5);
}

input[type="range"]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(45,106,79,0.4);
  border: 3px solid white;
}

/* Number Input */
.people-input-wrap {
  display: flex;
  align-items: center;
  gap: 0;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  width: fit-content;
}

.people-btn {
  width: 44px;
  height: 44px;
  border: none;
  background: var(--bg-subtle);
  color: var(--primary);
  font-size: 1.3rem;
  cursor: pointer;
  font-weight: 700;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.people-btn:hover { background: var(--accent); }

.people-value {
  min-width: 52px;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary-dark);
  padding: 0 0.5rem;
  font-family: var(--font-head);
}

/* Checkboxes */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.checkbox-pill {
  position: relative;
}

.checkbox-pill input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.checkbox-pill label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-card);
  transition: all var(--transition);
  user-select: none;
}

.checkbox-pill label:hover {
  border-color: var(--primary-light);
  color: var(--primary);
  background: rgba(82,183,136,0.08);
}

.checkbox-pill input:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* API Key */
.api-key-wrap {
  position: relative;
}

.api-key-input {
  width: 100%;
  padding: 0.8rem 3rem 0.8rem 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.api-key-input:focus {
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(82,183,136,0.15);
}

.api-key-input::placeholder { color: var(--text-light); font-size: 0.85rem; }

.api-key-toggle {
  position: absolute;
  right: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.2rem;
  font-size: 1rem;
}

.api-key-hint {
  font-size: 0.75rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.3rem;
}

/* Generate Button */
.btn-generate {
  width: 100%;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(45,106,79,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  letter-spacing: 0.01em;
}

.btn-generate:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(45,106,79,0.45);
}

.btn-generate:active { transform: translateY(0); }

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

.btn-icon { font-size: 1.2rem; }

/* ---------- Loading Section ---------- */
.loading-section {
  padding: 3rem 0;
  text-align: center;
}

.loading-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 3rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.loading-animation {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
}

.loading-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid transparent;
  animation: spin 1.2s linear infinite;
}

.loading-ring:nth-child(1) {
  border-top-color: var(--primary);
  animation-duration: 1.2s;
}

.loading-ring:nth-child(2) {
  border-right-color: var(--primary-light);
  animation-duration: 1.6s;
  animation-direction: reverse;
  inset: 8px;
}

.loading-ring:nth-child(3) {
  border-bottom-color: var(--warm-light);
  animation-duration: 2s;
  inset: 16px;
}

.loading-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  animation: pulse-icon 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse-icon {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.loading-title {
  font-family: var(--font-head);
  font-size: 1.3rem;
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.loading-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 1rem auto;
  max-width: 300px;
}

.loading-step {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  opacity: 0.4;
  transition: opacity 0.5s;
}

.loading-step.active {
  opacity: 1;
  color: var(--primary);
  font-weight: 600;
}

.loading-step.done {
  opacity: 0.7;
  color: var(--primary-light);
}

.loading-step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.loading-step.active .loading-step-dot {
  animation: pulse-dot 0.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.6; }
}

/* ---------- Results Section ---------- */
.results-section { padding: 2rem 0 3rem; }

.results-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.results-title { color: var(--primary-dark); }

.results-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.cost-badge {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
  padding: 0.5rem 1.1rem;
  border-radius: 20px;
  font-family: var(--font-head);
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  color: var(--primary);
  border: 2px solid var(--primary);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--primary);
  color: white;
}

/* ---------- Calendar Tabs ---------- */
.calendar-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.day-tabs-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.day-tabs-wrapper::-webkit-scrollbar { display: none; }

.day-tabs {
  display: flex;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  min-width: max-content;
}

.day-tab {
  flex: 1;
  min-width: 70px;
  padding: 0.8rem 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
}

.day-tab:hover { color: var(--primary); background: rgba(82,183,136,0.08); }

.day-tab.active {
  color: var(--primary-dark);
  background: var(--bg-card);
}

.day-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-light);
  border-radius: 2px 2px 0 0;
}

.day-tab .tab-day { font-size: 0.7rem; display: block; }
.day-tab .tab-label { font-size: 0.85rem; font-family: var(--font-head); }

/* ---------- Day Content ---------- */
.day-panel { padding: 1.5rem; display: none; }
.day-panel.active { display: block; }

.day-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.day-panel-title {
  font-family: var(--font-head);
  font-size: 1.2rem;
  color: var(--primary-dark);
}

.btn-regen-day {
  padding: 0.4rem 0.85rem;
  background: var(--bg-subtle);
  color: var(--warm);
  border: 1.5px solid var(--warm-light);
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-regen-day:hover { background: var(--warm-pale); }

.meals-grid {
  display: grid;
  gap: 0.9rem;
}

/* Meal Cards */
.meal-card {
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  border-left: 4px solid transparent;
  position: relative;
  animation: slide-in 0.3s ease;
}

@keyframes slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.meal-card--desayuno {
  background: linear-gradient(135deg, #fff9f0, #fef3e2);
  border-left-color: var(--warm-light);
}

.meal-card--comida {
  background: linear-gradient(135deg, #f0faf5, #e8f5ef);
  border-left-color: var(--primary-light);
}

.meal-card--cena {
  background: linear-gradient(135deg, #f5f0ff, #ede8f5);
  border-left-color: #9d7fd4;
}

.meal-type {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.meal-card--desayuno .meal-type { color: #b06a1a; }
.meal-card--comida   .meal-type { color: var(--primary); }
.meal-card--cena     .meal-type { color: #6a4d9d; }

.meal-name {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
}

.meal-ingredients {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.ingredient-tag {
  font-size: 0.72rem;
  background: rgba(255,255,255,0.7);
  color: var(--text-muted);
  padding: 0.18rem 0.5rem;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.08);
}

/* ---------- Shopping List ---------- */
.shopping-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 1.5rem;
}

.shopping-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  color: white;
}

.shopping-header h3 {
  color: white;
  font-size: 1.1rem;
}

.shopping-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-copy {
  padding: 0.4rem 0.9rem;
  background: rgba(255,255,255,0.15);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.btn-copy:hover { background: rgba(255,255,255,0.25); }

.shopping-body { padding: 1.2rem 1.5rem; }

.shopping-category {
  margin-bottom: 1.2rem;
}

.shopping-category:last-child { margin-bottom: 0; }

.category-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-icon { font-size: 0.9rem; }

.shopping-items { display: flex; flex-direction: column; gap: 0.4rem; }

.shopping-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.7rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
  cursor: pointer;
  border: 1px solid transparent;
}

.shopping-item:hover { background: var(--bg-subtle); border-color: var(--border); }

.shopping-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 4px;
}

.item-info { flex: 1; display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }

.item-name {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 500;
  transition: all var(--transition);
}

.item-details { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }

.item-qty {
  font-size: 0.78rem;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 0.15rem 0.45rem;
  border-radius: 10px;
}

.item-price {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  min-width: 40px;
  text-align: right;
}

.shopping-item.checked .item-name {
  text-decoration: line-through;
  color: var(--text-light);
}

.shopping-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.shopping-total-label { font-weight: 700; color: var(--text-muted); font-size: 0.9rem; }

.shopping-total-amount {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary-dark);
}

/* ---------- Tips ---------- */
.tips-card {
  background: linear-gradient(135deg, var(--warm-pale), #fef9f4);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  border: 1px solid rgba(212,163,115,0.3);
  margin-bottom: 1.5rem;
}

.tips-card h3 {
  color: var(--warm);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tips-list { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }

.tip-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.5;
}

.tip-bullet {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--warm-light);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--primary-dark);
  color: white;
  padding: 0.7rem 1.5rem;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  z-index: 1000;
  transition: transform 0.3s ease;
  pointer-events: none;
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* ---------- Error ---------- */
.error-card {
  background: #fff5f5;
  border: 1px solid #fecaca;
  border-radius: var(--radius-md);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.error-icon { font-size: 1.3rem; flex-shrink: 0; }
.error-title { font-weight: 700; color: #dc2626; margin-bottom: 0.2rem; }
.error-text { font-size: 0.88rem; color: #6b7280; }

/* ---------- FAQ ---------- */
.faq-section { padding: 2.5rem 0; }

.faq-section h2 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.faq-subtitle {
  color: var(--text-muted);
  margin-bottom: 1.8rem;
  font-size: 0.95rem;
}

.faq-list { display: flex; flex-direction: column; gap: 0.8rem; }

.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.faq-question {
  width: 100%;
  padding: 1rem 1.2rem;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
  transition: background var(--transition);
}

.faq-question:hover { background: var(--bg-subtle); }

.faq-arrow {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  flex-shrink: 0;
  transition: transform var(--transition), background var(--transition);
  color: var(--primary);
  font-weight: 900;
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
  background: var(--primary);
  color: white;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer { max-height: 400px; }

.faq-answer-inner {
  padding: 0 1.2rem 1.1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 1.8rem 0;
  text-align: center;
  font-size: 0.85rem;
}

.footer-content { display: flex; flex-direction: column; gap: 0.5rem; align-items: center; }

.footer-logo {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: white;
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.footer-links {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.8rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--accent); text-decoration: none; }

.footer-divider { color: rgba(255,255,255,0.2); }

/* ---------- Regen Overlay ---------- */
.day-panel { position: relative; }

.regen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  backdrop-filter: blur(2px);
  z-index: 10;
  flex-direction: column;
  gap: 0.5rem;
}

.regen-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.regen-text { font-size: 0.85rem; color: var(--primary); font-weight: 600; }

/* ---------- Photo Strip ---------- */
.photo-strip {
  overflow: hidden;
  background: var(--primary-dark);
  line-height: 0; /* elimina espacio bajo imágenes */
}

.photo-strip-track {
  display: flex;
  gap: 3px;
  height: 160px;
}

.photo-strip-item {
  flex: 1;
  min-width: 0;
  position: relative;
  overflow: hidden;
  background-color: var(--primary-dark);
}

.photo-strip-item:nth-child(1) { background-color: #1b4332; }
.photo-strip-item:nth-child(2) { background-color: #2d6a4f; }
.photo-strip-item:nth-child(3) { background-color: #52b788; }
.photo-strip-item:nth-child(4) { background-color: #a17c5b; }

.photo-strip-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
  filter: brightness(0.82) saturate(1.1);
}

.photo-strip-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.92) saturate(1.2);
}

.photo-strip-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.4rem 0.7rem 0.55rem;
  background: linear-gradient(to top, rgba(0,0,0,0.62) 0%, transparent 100%);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.3;
}

/* ---------- Calendar Photo Banner ---------- */
.calendar-photo-banner {
  position: relative;
  height: 140px;
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background-color: var(--primary); /* fallback */
}

.calendar-photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.75) saturate(1.15);
}

.calendar-photo-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(27,67,50,0.15) 0%,
    rgba(27,67,50,0.55) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 1rem 1.4rem;
}

.calendar-photo-banner-text {
  color: white;
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  text-shadow: 0 1px 6px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.calendar-photo-banner-text span {
  font-size: 1.1rem;
}

/* ---------- Responsive ---------- */
@media (min-width: 480px) {
  .photo-strip-track { height: 180px; }
  .photo-strip-caption { font-size: 0.78rem; padding: 1.6rem 0.9rem 0.65rem; }
}

@media (min-width: 600px) {
  .form-card { padding: 2.5rem 2rem; }
  .meals-grid { grid-template-columns: repeat(3, 1fr); }
  .day-panel { padding: 2rem; }
  .shopping-body { padding: 1.5rem 2rem; }
  .tips-card { padding: 2rem; }
  .photo-strip-track { height: 200px; }
  .calendar-photo-banner { height: 160px; }
}

@media (min-width: 768px) {
  .form-card { padding: 2.5rem 2.5rem; }
  .hero { padding: 4rem 0 3rem; }
  .day-tab { min-width: 90px; padding: 1rem 0.8rem; }
  .day-tab .tab-label { font-size: 0.9rem; }
}

@media (min-width: 900px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-group--full { grid-column: 1 / -1; }
}
