@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  --bg-color: #FDFBF7;
  --card-bg: #FFFFFF;
  --text-main: #2F3E46;
  --text-muted: #6B7C85;
  --primary: #E07A5F;
  --primary-hover: #C55E44;
  --primary-light: #FDF0EC;
  --accent: #81B29A;
  --accent-light: #EBF4F0;
  --border-color: #EAE5DC;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --shadow-sm: 0 2px 8px rgba(224, 122, 95, 0.06);
  --shadow-md: 0 10px 30px rgba(47, 62, 70, 0.05);
  --shadow-lg: 0 20px 50px rgba(224, 122, 95, 0.12);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  padding-bottom: 60px;
}

/* =============================================
   JUMP TO RECIPE BUTTON
   ============================================= */
.jump-recipe-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(129,178,154,0.4);
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  align-self: flex-start;
  transition: all 0.2s ease;
}
.jump-recipe-btn:hover {
  background: var(--accent);
  color: white;
  transform: translateY(-1px);
}

/* =============================================
   AD SLOTS
   ============================================= */
.ad-slot-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  text-align: center;
  display: block;
  margin-bottom: 4px;
}

.ad-slot-box {
  background: var(--bg-color);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 8px;
}

/* Full-width leaderboard */
.ad-slot-fw {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ad-728x90 { width: 100%; max-width: 728px; height: 90px; }

/* In-content (inside recipe story) */
.ad-slot-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.ad-inline-box { width: 100%; max-width: 468px; height: 60px; }

/* In recipe card */
.ad-slot-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 20px;
}
.ad-300x250 { width: 100%; max-width: 300px; height: 120px; }

/* =============================================
   PRINT BUTTON
   ============================================= */
.card-header-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.print-recipe-btn {
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.print-recipe-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* =============================================
   SHOP THIS RECIPE
   ============================================= */
.shop-intro {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.shop-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  transition: border-color 0.2s, transform 0.2s;
}
.shop-item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
}

.shop-emoji {
  font-size: 32px;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shop-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.shop-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.shop-link {
  font-size: 12px;
  font-weight: 700;
  color: #E07040;
  text-decoration: none;
  margin-top: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.shop-link:hover { text-decoration: underline; }

.shop-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
  font-style: italic;
}

/* =============================================
   AUTHOR BIO
   ============================================= */
.author-bio-inner {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.author-avatar {
  font-size: 56px;
  width: 88px;
  height: 88px;
  background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 3px solid var(--primary-light);
  overflow: hidden;
}

/* When you add a real photo — it auto-fits the circle */
.author-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--primary-light);
  flex-shrink: 0;
}

.author-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.author-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.author-name {
  font-family: var(--font-heading);
  font-size: 22px;
  color: var(--text-main);
  margin: 0;
}

.author-role {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin: 0;
}

.author-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 4px 0 0;
}

.author-social-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.author-social-btn {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  transition: all 0.2s ease;
}
.author-social-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =============================================
   RELATED RECIPES SECTION
   ============================================= */
.related-section {
  grid-column: 1 / -1;
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.related-header {
  margin-bottom: 24px;
}

.related-title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.related-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.related-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.related-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.related-img-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border-color);
}
.related-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.related-card:hover .related-img { transform: scale(1.06); }

.related-cat {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  z-index: 2;
}

.related-info {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-name {
  font-family: var(--font-heading);
  font-size: 16px;
  color: var(--text-main);
  line-height: 1.3;
  margin: 0;
  transition: color 0.2s;
}
.related-card:hover .related-name { color: var(--primary); }

.related-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.related-stars { color: #F4A261; margin-left: auto; }

/* =============================================
   PRINT STYLES
   ============================================= */
@media print {
  header, .recipe-story, .hero-section, .sidebar-backdrop,
  .recipe-box-sidebar, .cook-mode-overlay, .timer-overlay,
  .meal-planner-overlay, .fridge-search-overlay, .toast,
  .theme-panel, .theme-toggle-btn, .admin-mode-badge,
  .ad-slot-fw, .ad-slot-card, .related-section,
  .actions-row, .recipe-box-btn, .print-recipe-btn,
  .cook-mode-overlay, .add-recipe-backdrop { display: none !important; }

  body { background: white !important; font-size: 12pt; }
  main { display: block !important; padding: 0 !important; margin: 0 !important; }
  .recipe-card-sticky { position: static !important; }
  .recipe-card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    page-break-inside: avoid;
  }
  .recipe-stats-grid, .scaler-container { break-inside: avoid; }
  .directions-list { break-inside: avoid; }
  a { text-decoration: none; color: black; }
}

/* =============================================
   RESPONSIVE — new sections
   ============================================= */
@media (max-width: 900px) {
  /* Remove sticky on mobile — causes overlap with related section */
  .recipe-card-sticky {
    position: static !important;
  }
}

@media (max-width: 768px) {
  .shop-grid { grid-template-columns: 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  .author-bio-inner { flex-direction: column; align-items: center; text-align: center; }
  .author-social-links { justify-content: center; }
  .card-header-top { align-items: center; }

  /* Related section full-width on mobile */
  .related-section {
    padding: 20px 16px;
  }
  .related-title { font-size: 20px; }
}

/* Header & Navigation */
header {
  background-color: rgba(253, 251, 247, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.recipe-box-btn {
  background-color: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.recipe-box-btn:hover {
  background-color: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.recipe-box-counter {
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.recipe-box-btn:hover .recipe-box-counter {
  background-color: white;
  color: var(--primary);
}

/* Layout Main */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

@media (min-width: 900px) {
  main {
    grid-template-columns: 7fr 5fr;
  }
}

/* Hero Section */
.hero-section {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .hero-section {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }
}

.hero-image-container {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/5;
  background: var(--border-color);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-container:hover .hero-image {
  transform: scale(1.05);
}

.pinterest-btn {
  position: absolute;
  top: 16px;
  left: 16px;
  background-color: #E60023;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(230, 0, 35, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
  z-index: 10;
}

.pinterest-btn:hover {
  transform: scale(1.05);
  background-color: #ad001a;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.category-tag {
  align-self: flex-start;
  background-color: var(--accent-light);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 4vw, 44px);
  color: var(--text-main);
  line-height: 1.2;
}

.recipe-meta-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
}

.rating-display {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #F4A261;
  font-weight: 600;
}

.rating-count {
  color: var(--text-muted);
  font-weight: 400;
}

.recipe-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.actions-row {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}

.primary-btn {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(224, 122, 95, 0.3);
}

.primary-btn:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(224, 122, 95, 0.4);
}

.secondary-btn {
  background-color: transparent;
  color: var(--text-main);
  border: 2px solid var(--border-color);
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s ease;
}

.secondary-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
}

/* Article / Main Content */
.recipe-story {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.section-card {
  background-color: var(--card-bg);
  border-radius: var(--radius-md);
  padding: 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 26px;
  color: var(--text-main);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 24px;
  background-color: var(--primary);
  border-radius: 2px;
}

.table-of-contents {
  background-color: var(--accent-light);
  border: 1px solid rgba(129, 178, 154, 0.3);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.toc-header {
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toc-list {
  list-style: none;
  margin-top: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc-list a {
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
}

.toc-list a:hover {
  color: var(--primary);
}

.intro-text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
}

.intro-text p {
  margin-bottom: 16px;
}

/* Interactive Recipe Card (Sidebar or Right Column) */
.recipe-card-sticky {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.recipe-card {
  background-color: var(--card-bg);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.recipe-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.card-header-main {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.recipe-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  text-align: center;
  background-color: var(--bg-color);
  padding: 16px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}

.stat-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-value {
  font-weight: 700;
  font-size: 16px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Scaler */
.scaler-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--primary-light);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  border: 1px dashed var(--primary);
}

.scaler-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--primary);
}

.scaler-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scaler-btn {
  background-color: white;
  border: 1px solid var(--primary);
  color: var(--primary);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

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

.scaler-count {
  font-weight: 700;
  font-size: 16px;
  width: 24px;
  text-align: center;
}

/* Ingredients List */
.ingredients-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 28px;
}

.ingredient-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  padding: 6px 0;
}

.ingredient-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ingredient-checkbox:checked {
  background-color: var(--accent);
  border-color: var(--accent);
}

.ingredient-checkbox:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 3px;
  color: white;
  font-size: 13px;
  font-weight: bold;
}

.ingredient-text {
  font-size: 15px;
  transition: all 0.2s ease;
}

.ingredient-checkbox:checked ~ .ingredient-text {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.7;
}

/* Directions List */
.directions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.direction-step {
  display: flex;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.direction-step:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.step-num {
  background-color: var(--primary-light);
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.step-title {
  font-weight: 600;
  font-size: 16px;
}

.step-text {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.step-checkbox {
  display: none;
}

.timer-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(129, 178, 154, 0.3);
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 6px;
  align-self: flex-start;
  transition: all 0.2s ease;
}

.timer-tag:hover {
  background-color: var(--accent);
  color: white;
  transform: translateY(-1px);
}

/* Floating Sidebar for Saved Recipes */
.recipe-box-sidebar {
  position: fixed;
  top: 0;
  right: -400px;
  width: 100%;
  max-width: 380px;
  height: 100%;
  background-color: var(--card-bg);
  box-shadow: -10px 0 30px rgba(47, 62, 70, 0.15);
  z-index: 200;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 30px;
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.recipe-box-sidebar.active {
  right: 0;
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 20px;
  margin-bottom: 24px;
}

.sidebar-title {
  font-family: var(--font-heading);
  font-size: 22px;
}

.close-sidebar-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
}

.close-sidebar-btn:hover {
  color: var(--primary);
}

.saved-recipes-container {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  margin-top: 50px;
  font-size: 14px;
}

.saved-recipe-item {
  display: flex;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-color);
  position: relative;
}

.saved-recipe-thumb {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
}

.saved-recipe-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.saved-recipe-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-main);
  text-decoration: none;
}

.saved-recipe-name:hover {
  color: var(--primary);
}

.saved-recipe-time {
  font-size: 11px;
  color: var(--text-muted);
}

.delete-saved-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
}

.delete-saved-btn:hover {
  color: #cf2e2e;
}

/* Sidebar Backdrop */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(47, 62, 70, 0.4);
  backdrop-filter: blur(4px);
  z-index: 150;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.sidebar-backdrop.active {
  opacity: 1;
  pointer-events: all;
}

/* Cook Mode (Full Screen) */
.cook-mode-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-color);
  z-index: 300;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: flex;
  flex-direction: column;
}

.cook-mode-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.cook-mode-header {
  padding: 16px 40px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--card-bg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cook-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.cook-mode-title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.close-cook-btn {
  background-color: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}

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

.cook-mode-content {
  flex-grow: 1;
  display: grid;
  grid-template-columns: 1fr;
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
  padding: 40px;
  overflow-y: auto;
  align-content: start; /* Prevents top content from being cut off on scroll */
}

.cook-step-card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
  position: relative;
}

.cook-step-num {
  align-self: center;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cook-step-title {
  font-family: var(--font-heading);
  font-size: 32px;
}

.cook-step-desc {
  font-size: 20px;
  line-height: 1.8;
  color: var(--text-main);
  padding: 0 10px;
}

.cook-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  gap: 20px;
}

.cook-nav-btn {
  background-color: var(--card-bg);
  border: 2px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 30px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  flex: 1;
}

.cook-nav-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.cook-nav-btn.primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: white;
}

.cook-nav-btn.primary:hover {
  background-color: var(--primary-hover);
}

.cook-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.cook-progress-bar-container {
  width: 100%;
  height: 6px;
  background-color: var(--border-color);
  position: absolute;
  bottom: 0;
  left: 0;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  overflow: hidden;
}

.cook-progress-bar {
  height: 100%;
  background-color: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}

/* ── Cook Mode Ingredients Panel ────────────── */
.cook-ingr-panel {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: slideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cook-ingr-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cook-ingr-icon {
  font-size: 44px;
  line-height: 1;
}

.cook-ingr-title {
  font-family: var(--font-heading);
  font-size: 28px;
  color: var(--text-main);
  margin: 0;
}

.cook-ingr-sub {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0;
}

.cook-ingr-meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4px;
}

.cook-meta-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid rgba(224,122,95,0.2);
}

.cook-ingr-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cook-col-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 14px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.cook-ingr-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cook-ingr-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.cook-ingr-check {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  margin-top: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.cook-ingr-check:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.cook-ingr-check:checked::after {
  content: '✓';
  position: absolute;
  top: -1px;
  left: 3px;
  color: white;
  font-size: 13px;
  font-weight: 700;
}

.cook-ingr-item label {
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  line-height: 1.5;
  transition: all 0.2s ease;
}

.cook-ingr-check:checked ~ label {
  text-decoration: line-through;
  color: var(--text-muted);
  opacity: 0.6;
}

.ci-note {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 400;
}

.cook-ingr-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
}

.cook-ingr-tip {
  font-size: 13px;
  color: var(--text-muted);
  background: var(--accent-light);
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  width: 100%;
  margin: 0;
}

.cook-ingr-tip strong { color: var(--text-main); }

.cook-start-btn {
  font-size: 16px;
  padding: 16px 40px;
  border-radius: var(--radius-sm);
  box-shadow: 0 6px 20px rgba(224,122,95,0.35);
}

@media (max-width: 600px) {
  .cook-ingr-panel { padding: 24px 20px; }
  .cook-ingr-columns { grid-template-columns: 1fr; }
  .cook-ingr-title { font-size: 22px; }
}

/* Countdown Timer Overlay */
.timer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(47, 62, 70, 0.85);
  backdrop-filter: blur(10px);
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.timer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.timer-container {
  background-color: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 350px;
}

.timer-title {
  font-weight: 600;
  font-size: 18px;
}

.timer-display {
  font-size: 48px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--primary);
  width: 180px;
  height: 180px;
  border: 6px solid var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.timer-btn-row {
  display: flex;
  gap: 12px;
  width: 100%;
}

.timer-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: white;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.timer-btn.stop {
  background-color: #cf2e2e;
  border-color: #cf2e2e;
  color: white;
}

.timer-btn.pause {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background-color: var(--text-main);
  color: white;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast.active {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent);
}

/* Cook Mode Ad Slot (Revenue Safety Container) */
.cook-mode-ad-slot {
  margin-top: 30px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.ad-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.ad-box {
  background-color: var(--primary-light);
  border: 1px dashed var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 24px;
  width: 100%;
  max-width: 600px;
  text-align: center;
  font-size: 14px;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
  cursor: pointer;
}

.ad-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(224, 122, 95, 0.1);
}

/* Weekly Meal Planner */
.weekly-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
  width: 100%;
}

.day-card {
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 120px;
}

.day-name {
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 4px;
}

.day-recipe-slot {
  flex-grow: 1;
  border-radius: 4px;
  padding: 8px;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.day-recipe-slot.empty {
  border: 1px dashed var(--border-color);
  color: var(--text-muted);
  background-color: white;
}

.day-recipe-slot.empty:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.day-recipe-slot.assigned {
  background-color: var(--accent-light);
  border: 1px solid rgba(129, 178, 154, 0.4);
  color: var(--text-main);
  font-weight: 600;
  position: relative;
}

.day-recipe-slot.assigned:hover {
  transform: translateY(-1px);
}

.remove-day-recipe {
  position: absolute;
  top: 2px;
  right: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
}

.remove-day-recipe:hover {
  color: #cf2e2e;
}

.day-recipe-title {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.generated-shopping-list {
  background-color: #FAF6EE;
  border: 1px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-top: 10px;
  animation: slideDown 0.3s ease-out;
}

.shopping-aisles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.aisle-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.aisle-title {
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 2px solid var(--primary-light);
  padding-bottom: 4px;
  letter-spacing: 0.5px;
}

/* "What's in my Fridge?" Search */
.fridge-tag {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.fridge-tag:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.fridge-tag.active {
  background-color: var(--accent);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 4px 10px rgba(129, 178, 154, 0.3);
}

.fridge-results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.fridge-recipe-result {
  display: flex;
  gap: 16px;
  padding: 16px;
  background-color: var(--bg-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.fridge-recipe-result:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
  border-color: var(--accent);
}

.fridge-recipe-thumb {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background-color: var(--border-color);
}

.fridge-recipe-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.fridge-recipe-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  color: var(--text-main);
  text-decoration: none;
}

.fridge-recipe-title:hover {
  color: var(--primary);
}

.fridge-match-badge {
  font-size: 11px;
  color: var(--accent);
  background-color: var(--accent-light);
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  align-self: flex-start;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- MOBILE RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
  /* Navigation */
  .nav-container {
    flex-direction: column;
    gap: 12px;
    padding: 12px 16px;
    text-align: center;
  }
  
  .logo {
    font-size: 22px;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    width: 100%;
  }

  .nav-links a {
    font-size: 14px;
  }

  .recipe-box-btn {
    padding: 8px 14px;
    font-size: 13px;
    width: 100%;
    justify-content: center;
  }

  /* Hero Section */
  .hero-section {
    padding: 16px;
    border-radius: var(--radius-md);
    gap: 24px;
  }

  .hero-image-container {
    aspect-ratio: 16/9; /* Elegant landscape ratio for mobile headers */
  }

  .recipe-title {
    font-size: 28px;
    text-align: center;
  }

  .recipe-meta-quick {
    justify-content: center;
    gap: 12px;
    font-size: 13px;
  }

  .recipe-desc {
    font-size: 14px;
    text-align: center;
  }

  .actions-row {
    flex-direction: column;
    width: 100%;
    gap: 12px;
  }

  .primary-btn, .secondary-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Section Cards */
  .section-card {
    padding: 20px;
  }

  .section-title {
    font-size: 22px;
  }

  .intro-text {
    font-size: 14px;
  }

  /* Recipe Card */
  .recipe-card {
    padding: 20px;
  }

  .recipe-stats-grid {
    padding: 12px;
    gap: 10px;
  }

  .stat-value {
    font-size: 14px;
  }

  .stat-label {
    font-size: 10px;
  }

  /* Cook Mode — mobile header */
  .cook-mode-header {
    padding: 12px 16px;
    gap: 10px;
  }

  .cook-mode-title {
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .cook-step-counter {
    font-size: 11px !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
  }

  .close-cook-btn {
    padding: 8px 14px;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .cook-mode-content {
    padding: 16px;
  }

  .cook-step-card {
    padding: 24px 20px;
    gap: 16px;
  }

  .cook-step-title {
    font-size: 22px;
  }

  .cook-step-desc {
    font-size: 16px;
  }

  .cook-navigation {
    flex-direction: column-reverse;
    gap: 12px;
    margin-top: 15px;
  }

  .cook-nav-btn {
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Mobile Calendar Grid */
  .weekly-calendar-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .day-card {
    min-height: auto;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
  }

  .day-name {
    border-bottom: none;
    padding-bottom: 0;
    min-width: 100px;
    text-align: left;
  }

  .day-recipe-slot {
    width: 60%;
    margin-top: 0;
  }

  /* Mobile Shopping Aisle Grid */
  .shopping-aisles-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Mobile Fridge Results Grid */
  .fridge-results-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* =============================================
   FAQ ACCORDION
   ============================================= */

.faq-card { padding: 32px; }

.faq-list {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-top: 4px;
}

.faq-item {
  border-bottom: 1px solid var(--border-color);
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  background: var(--card-bg);
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  gap: 16px;
  transition: background 0.2s ease, color 0.2s ease;
}

.faq-question:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.faq-question[aria-expanded="true"] {
  background: var(--primary-light);
  color: var(--primary);
}

.faq-icon {
  font-size: 24px;
  font-weight: 300;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform 0.3s ease;
  line-height: 1;
  width: 24px;
  text-align: center;
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.faq-answer-inner {
  padding: 16px 22px 20px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.75;
  border-top: 1px solid var(--border-color);
  background: var(--bg-color);
}

.faq-answer-inner strong {
  color: var(--text-main);
  font-weight: 600;
}

/* =============================================
   RECIPES GALLERY GRID
   ============================================= */

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 24px;
  width: 100%;
  align-content: start;
}

.recipe-card-item {
  background: var(--card-bg);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.recipe-card-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.recipe-card-item.featured-card {
  grid-column: 1 / -1;
  flex-direction: row;
}

.rci-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--border-color);
  flex-shrink: 0;
}

.featured-card .rci-image-wrap {
  aspect-ratio: auto;
  width: 42%;
}

.rci-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.recipe-card-item:hover .rci-image {
  transform: scale(1.06);
}

.rci-cat-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  z-index: 2;
}

.rci-featured-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--primary);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 12px;
  z-index: 2;
}

.rci-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
}

.featured-card .rci-info {
  padding: 36px;
  justify-content: center;
}

.rci-title {
  font-family: var(--font-heading);
  font-size: 18px;
  color: var(--text-main);
  line-height: 1.3;
}

.featured-card .rci-title {
  font-size: 28px;
}

.rci-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.rci-actions {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 10px;
}

.rci-view-btn {
  background: var(--primary-light);
  color: var(--primary);
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.rci-delete-btn {
  background: none;
  border: 1px solid #f0d0d0;
  color: #cf2e2e;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rci-delete-btn:hover {
  background: #cf2e2e;
  color: white;
  border-color: #cf2e2e;
}

/* Add Recipe Modal */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(47, 62, 70, 0.65);
  backdrop-filter: blur(6px);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.add-recipe-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.add-recipe-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-color);
}

.add-recipe-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ar-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ar-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.ar-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.ar-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}

/* Admin mode indicator badge */
.admin-mode-badge {
  position: fixed;
  top: 80px;
  right: 16px;
  background: #1a1a2e;
  color: #e0e0e0;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 12px;
  z-index: 200;
  display: none;
  letter-spacing: 0.5px;
  pointer-events: none;
}

.admin-mode-badge.visible {
  display: block;
}

@media (max-width: 768px) {
  .recipes-grid {
    grid-template-columns: 1fr;
  }

  .recipe-card-item.featured-card {
    flex-direction: column;
  }

  .featured-card .rci-image-wrap {
    width: 100%;
    aspect-ratio: 16/9;
  }

  .ar-row {
    grid-template-columns: 1fr;
  }
}

/* =============================================
   THEME CUSTOMIZER PANEL
   ============================================= */

.theme-toggle-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  z-index: 450;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle-btn:hover {
  transform: scale(1.12) rotate(20deg);
  box-shadow: 0 8px 28px rgba(0,0,0,0.25);
}

.theme-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100%;
  background: var(--card-bg);
  border-left: 1px solid var(--border-color);
  box-shadow: -12px 0 40px rgba(47, 62, 70, 0.18);
  z-index: 600;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.theme-panel.active {
  right: 0;
}

.theme-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-color);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.theme-panel-body {
  overflow-y: auto;
  padding: 20px 24px 50px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.theme-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.theme-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
  margin: 0;
}

.theme-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.theme-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
}

.theme-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.theme-hint {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
}

.theme-color-input {
  width: 100%;
  height: 44px;
  padding: 4px 6px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: var(--card-bg);
}

.theme-color-input::-webkit-color-swatch-wrapper { padding: 0; }
.theme-color-input::-webkit-color-swatch { border: none; border-radius: 4px; }

.theme-text-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-main);
  background: var(--bg-color);
  transition: border-color 0.2s ease;
}

.theme-text-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.tc-reset-btn {
  background: none;
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  padding: 10px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 4px;
}

.tc-reset-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

