/* ==========================================================================
   CONFEITARIA SAUDÁVEL - DESIGN SYSTEM & STYLESHEET
   Harmonious gourmet palette, glassmorphism, responsive, dark/light mode
   ========================================================================== */

:root {
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Light Theme (Warm Gourmet Pastry) */
  --bg-page: #FBF8F4;
  --bg-surface: #FFFFFF;
  --bg-surface-elevated: #FFFFFF;
  --bg-surface-subtle: #F5EFE6;
  --border-subtle: #E8DFD5;
  --border-focus: #C25E2E;
  
  --text-main: #2C2420;
  --text-muted: #6E6259;
  --text-faint: #A3968B;
  
  --primary: #C25E2E;
  --primary-hover: #AA4E22;
  --primary-light: #FCEFE9;
  --primary-glow: rgba(194, 94, 46, 0.25);
  
  --accent-gold: #D99B26;
  --accent-gold-light: #FDF6E2;
  --accent-green: #2E8540;
  --accent-green-light: #EBF8EE;
  --accent-chocolate: #4A2810;
  
  --shadow-sm: 0 2px 8px rgba(44, 36, 32, 0.05);
  --shadow-md: 0 8px 24px rgba(44, 36, 32, 0.08);
  --shadow-lg: 0 16px 40px rgba(44, 36, 32, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --glass-bg: rgba(255, 255, 255, 0.85);
  --glass-border: rgba(232, 223, 213, 0.7);
}

[data-theme="dark"] {
  --bg-page: #13100E;
  --bg-surface: #1E1815;
  --bg-surface-elevated: #26201C;
  --bg-surface-subtle: #2D2521;
  --border-subtle: #382E29;
  --border-focus: #DF7943;
  
  --text-main: #F5ECE5;
  --text-muted: #B8A99E;
  --text-faint: #75675E;
  
  --primary: #DF7943;
  --primary-hover: #EE8852;
  --primary-light: #362218;
  --primary-glow: rgba(223, 121, 67, 0.3);
  
  --accent-gold: #E5AC3C;
  --accent-gold-light: #332712;
  --accent-green: #48BB78;
  --accent-green-light: #162E20;
  --accent-chocolate: #B3866A;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.7);
  
  --glass-bg: rgba(30, 24, 21, 0.88);
  --glass-border: rgba(56, 46, 41, 0.8);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-page);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-faint);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

.header-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--primary), var(--accent-gold));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.brand-text h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-main);
  line-height: 1.2;
  white-space: nowrap;
}

.brand-text span {
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  display: block;
}

.search-wrapper {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.search-icon {
  position: absolute;
  left: 0.9rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
  font-size: 1.05rem;
  pointer-events: none;
}

.clear-search {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px;
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Celular: busca desce para uma linha inteira abaixo da marca */
@media (max-width: 560px) {
  .header-container {
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    padding: 0.75rem 1rem;
  }

  .search-wrapper {
    order: 3;
    flex-basis: 100%;
    max-width: none;
  }
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.15rem;
  transition: all 0.2s ease;
}

.btn-icon:hover {
  background: var(--bg-surface-subtle);
  transform: translateY(-1px);
}

/* ==========================================================================
   NAVIGATION CATEGORY PILLS
   ========================================================================== */
.categories-nav {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.categories-nav::-webkit-scrollbar {
  display: none;
}

.categories-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.65rem 1.5rem;
  display: flex;
  gap: 0.6rem;
}

.cat-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.cat-btn:hover {
  color: var(--text-main);
  background: var(--border-subtle);
}

.cat-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 12px var(--primary-glow);
}

.cat-count {
  font-size: 0.75rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.cat-btn.active .cat-count {
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
}

/* ==========================================================================
   MAIN HERO BANNER
   ========================================================================== */
.hero-banner {
  background: linear-gradient(135deg, var(--bg-surface-subtle) 0%, var(--bg-page) 100%);
  border-bottom: 1px solid var(--border-subtle);
  padding: 2.2rem 1.5rem;
}

.hero-content {
  max-width: 1320px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.hero-text h2 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.hero-text p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 1.5rem;
}

.stat-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

/* ==========================================================================
   RECIPES GRID
   ========================================================================== */
.main-layout {
  max-width: 1320px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
}

.recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 1.75rem;
}

/* RECIPE CARD */
.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  cursor: pointer;
}

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

.card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  min-height: 220px;
  background: var(--bg-surface-subtle);
  overflow: hidden;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%; /* Foco na mesa, potes de farinha, garrafas e pratos */
  transition: transform 0.4s ease;
}

.card-media.focus-bottom .card-img {
  object-position: center 80%; /* Foco extra baixo para tigelas de farinhas */
}

.card-media.focus-bottle .card-img {
  object-position: center 46%; /* Perfeito para garrafas de leites vegetais mostrando rolha, rótulo e potinho */
}

.card-media.focus-center .card-img {
  object-position: center center;
}

.recipe-card:hover .card-img {
  transform: scale(1.04);
}

.card-overlay-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  z-index: 3;
}

.card-visual-sub {
  position: absolute;
  bottom: 0.65rem;
  left: 0.75rem;
  right: 0.75rem;
  background: rgba(18, 14, 12, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.74rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  z-index: 2;
  letter-spacing: 0.01em;
}

.card-fav-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #B8A99E;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 2;
}

.card-fav-btn:hover {
  transform: scale(1.15);
}

.card-fav-btn.active {
  color: #FF4757;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 0.6rem;
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 1rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.badge-chip {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  color: var(--text-muted);
  font-weight: 500;
}

.badge-chip.sem-gluten {
  background: var(--accent-green-light);
  color: var(--accent-green);
}

.badge-chip.vegano {
  background: #E8F4FD;
  color: #1E88E5;
}

.badge-chip.low-carb {
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.82rem;
  color: var(--text-muted);
}

.card-stat {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.btn-card-open {
  background: none;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

/* ==========================================================================
   RECIPE DETAIL MODAL
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 14, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-backdrop.open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  padding: 1.25rem 1.75rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-surface-elevated);
}

.modal-title-group h2 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.modal-title-group .modal-subtitle {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.btn-close {
  background: var(--bg-surface-subtle);
  border: none;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.btn-close:hover {
  background: var(--border-subtle);
  color: var(--text-main);
}

.modal-scrollable {
  padding: 1.75rem;
  overflow-y: auto;
  flex: 1;
}

/* RECIPE HERO BANNER */
.modal-hero-image {
  width: 100%;
  height: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
}

.modal-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

.modal-hero-image:hover .modal-banner-img {
  transform: scale(1.02);
}

/* QUICK METRICS BAR */
.recipe-metrics-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.85rem;
  background: var(--bg-surface-subtle);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.75rem;
  border: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.metric-val {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

/* PORTION SCALER */
.scaler-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  background: var(--primary-light);
  border: 1px solid rgba(194, 94, 46, 0.2);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.25rem;
  margin-bottom: 1.75rem;
}

.scaler-info {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.92rem;
}

.scaler-buttons {
  display: flex;
  gap: 0.4rem;
}

.btn-scale {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

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

.btn-scale.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* DETAIL TWO-COLUMN GRID */
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 2rem;
}

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

.detail-section-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* INGREDIENTS LIST */
.ingredients-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ingredient-row {
  display: flex;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: var(--bg-surface-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.ingredient-row:hover {
  background: var(--bg-surface);
  border-color: var(--border-focus);
}

.ingredient-row.checked {
  background: var(--bg-surface-subtle);
  opacity: 0.6;
  text-decoration: line-through;
}

.ing-checkbox {
  margin-right: 0.75rem;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.ing-amount {
  font-weight: 700;
  color: var(--primary);
  margin-right: 0.4rem;
  min-width: 50px;
}

.ing-name {
  color: var(--text-main);
  flex: 1;
}

/* INSTRUCTIONS LIST */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-surface-subtle);
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.step-num {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-text {
  font-size: 0.95rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* CHEF TIPS & SECRETS */
.tips-box {
  background: var(--accent-gold-light);
  border: 1px solid rgba(217, 155, 38, 0.3);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
}

.tips-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.tips-box ul {
  padding-left: 1.25rem;
  color: var(--text-main);
  font-size: 0.92rem;
  line-height: 1.6;
}

/* USER NOTES BOX */
.notes-section {
  margin-top: 1.5rem;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.notes-header {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notes-textarea {
  width: 100%;
  min-height: 80px;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 0.9rem;
  resize: vertical;
  outline: none;
}

.notes-textarea:focus {
  border-color: var(--border-focus);
}

/* KITCHEN TIMER FLOATING / MODAL WIDGET */
.timer-widget {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  margin-top: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.timer-header h4 {
  font-size: 0.95rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.timer-display {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
  letter-spacing: 0.05em;
  margin: 0.5rem 0;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.btn-timer {
  padding: 0.45rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-timer.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-timer:hover {
  transform: translateY(-1px);
}

.timer-presets {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.preset-chip {
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.preset-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ==========================================================================
   ORIGINAL SCANNED CARD MODAL (VIEWER)
   ========================================================================== */
.card-viewer-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 7, 0.92);
  backdrop-filter: blur(12px);
  z-index: 300;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.card-viewer-modal.open {
  opacity: 1;
  visibility: visible;
}

.card-viewer-header {
  padding: 1rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-viewer-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
}

.card-viewer-body {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.card-viewer-img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
  transition: transform 0.2s ease;
}

/* ==========================================================================
   TECHNICAL GUIDES TAB
   ========================================================================== */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.75rem;
}

.guide-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.guide-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.guide-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}

.guide-card-cat {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 0.35rem;
}

.guide-card-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.65rem;
  color: var(--text-main);
}

.guide-card-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.btn-read-guide {
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid rgba(194, 94, 46, 0.2);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.btn-read-guide:hover {
  background: var(--primary);
  color: #fff;
}

/* GUIDE DETAIL EXPANDED CONTENT */
.guide-content-wrapper {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.95rem;
  line-height: 1.7;
}

.guide-content-wrapper h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin: 1.25rem 0 0.5rem;
  color: var(--primary);
}

.guide-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.guide-card-mini {
  background: var(--bg-surface-subtle);
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.guide-card-mini h4 {
  font-size: 0.92rem;
  color: var(--text-main);
  margin-bottom: 0.25rem;
}

.guide-steps {
  padding-left: 1.25rem;
  margin: 0.75rem 0;
}

.guide-steps li {
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   EMPTY STATE & NOTIFICATIONS
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 4rem 1.5rem;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.6;
}

.empty-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--text-main);
  color: var(--bg-page);
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 500;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   PRINT STYLESHEET
   ========================================================================== */
@media print {
  body {
    background: #fff !important;
    color: #000 !important;
  }
  
  .site-header, .categories-nav, .hero-banner, .modal-backdrop, .btn-timer, .scaler-container, .notes-section, .timer-widget {
    display: none !important;
  }
  
  .modal-container {
    box-shadow: none !important;
    border: none !important;
    max-height: none !important;
  }
}

/* Ficha original escaneada: só no uso interno (ver app.js) */
body:not(.interno) .so-interno {
  display: none !important;
}

/* Receita sem foto própria */
.card-img-vazia {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  background: var(--bg-surface-subtle);
}

/* Sub-receita dentro da lista de ingredientes (ex.: Recheio, Cobertura) */
.ing-group {
  list-style: none;
  margin: 0.9rem 0 0.3rem;
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.uses-link {
  color: var(--primary);
}
