/* =========================================
   VARIABILI GLOBALI (Palette Tenuta Zaccone)
   ========================================= */
:root {
  --main-color: #2e7d32;           /* Verde vegetale brillante */
  --dark-green: #1b4332;          /* Verde foresta scuro */
  --light-sage: #9bd1af;          /* Salvia chiaro botanico */
  --background-color: #1a2238;    /* Navy profondo elegante */
  --bg-crema: #f7f5f0;            /* Crema panna naturale caldo */
  --text-dark: #1f2937;           /* Testo scuro ad alto contrasto */
  --text-light: #ffffff;          /* Bianco ottico */
}

/* =========================================
   REGOLE DI BASE HTML/BODY
   ========================================= */
body {
  font-family: "SUSE", sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-dark);
  background-color: #0f141f;
  -webkit-font-smoothing: antialiased;
}

/* =========================================================
   SFONDI PAGINE: ADDIO TERRA RIPETITIVA, BENVENUTA ELEGANZA
   ========================================================= */
/* Sfondo base per le sezioni Microgreens: profondo, organico, sfumato */
.effetto-stampa-totale { 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100vw; 
  height: 100vh; 
  z-index: -1; 
  pointer-events: none; 
}

/* Sfondo moderno con vignettatura morbida che fa brillare il verde delle piante */
.sfondo-main-microgreens {
  background: radial-gradient(circle at 50% 15%, #1d2d24 0%, #0d1611 65%, #070c09 100%);
}

/* Sfondo per la pagina di dettaglio vaschette */
.sfondo-box-detail-microgreens {
  background-color: #ffffff;
}

/* =========================================
   BARRA DI NAVIGAZIONE (STRUTTURA COMUNE)
   ========================================= */
.navbar { 
  display: flex; 
  justify-content: center; 
  align-items: center; 
  position: fixed; 
  top: 0; 
  left: 0; 
  width: 100%; 
  z-index: 999; 
  padding: 12px 0px; 
  box-shadow: 0 4px 18px rgba(0,0,0,0.22); 
  transition: background-color 0.3s ease;
}

/* RIEMPIMENTI MENU PERSONALIZZATI IN BASE ALLA PAGINA */
/* 1. Menu Microgreens: verde fresco */
.navbar.menu-theme-microgreens {
  background-color: #2d6a4f;
  background-image: linear-gradient(135deg, #2d6a4f 0%, #1b4332 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* 2. Menu Home: Navy elegante istituzionale */
.navbar.menu-theme-home {
  background-color: #1a2238;
  background-image: linear-gradient(135deg, #202b47 0%, #131929 100%);
  border-bottom: 1px solid rgba(155, 209, 175, 0.25);
}

/* 3. Menu Ricette: crema gourmet caldo con testo a contrasto scuro */
.navbar.menu-theme-ricette {
  background-color: #ede7dc;
  background-image: linear-gradient(135deg, #f4efe6 0%, #e5ddd0 100%);
  border-bottom: 1px solid #d4c9b8;
}

/* Link di navigazione universali */
.menu { 
  list-style: none; 
  display: flex; 
  gap: 12px; 
  margin: 0; 
  padding: 0; 
  align-items: center;
}

.menu li a { 
  color: #ffffff; 
  text-decoration: none; 
  padding: 8px 18px; 
  font-size: 1.05em; 
  border-radius: 20px;
  transition: all 0.25s ease; 
  display: block; 
  font-weight: 600;
}

/* Voci del menu per tema Ricette (testo scuro) */
.menu-theme-ricette .menu li a {
  color: #2b332b;
}

/* Hover universale */
.menu li a:hover:not(.active) { 
  background-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.menu-theme-ricette .menu li a:hover:not(.active) {
  background-color: rgba(0, 0, 0, 0.08);
}

/* PILLOLA ATTIVA UNIVERSALE */
.menu li a.active {
  background-color: rgba(255, 255, 255, 0.32);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18), inset 0 0 6px rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.menu-theme-ricette .menu li a.active {
  background-color: #2d6a4f;
  color: #ffffff;
  border-color: #2d6a4f;
  box-shadow: 0 3px 10px rgba(45, 106, 79, 0.25);
}

.menu-toggle { 
  display: none; 
  font-size: 25px; 
  color: white; 
  position: absolute; 
  right: 25px; 
  top: 50%; 
  transform: translateY(-50%); 
  z-index: 1001; 
  border: none; 
  padding: 10px; 
  cursor: pointer; 
}

.menu-theme-ricette .menu-toggle {
  color: #2b332b;
}

/* =========================================
   HEADER & SOTTOTITOLO
   ========================================= */
header { 
  background-color: transparent; 
  color: var(--light-sage); 
  padding: 15px 20px 25px 20px; 
  text-align: center; 
  font-weight: 700; 
}

header h2 {
  font-size: 1.4em;
  font-weight: 600;
  letter-spacing: 1px;
  color: #a7d7b5;
  margin: 15px 0 0 0;
  text-transform: uppercase;
}

.container { 
  padding: 20px; 
  max-width: 1100px; 
  margin: 0 auto; 
}

.section { 
  margin-bottom: 55px; 
  margin-top: 20px; 
}

.section-title { 
  font-size: 2.2em; 
  margin-bottom: 18px; 
  color: #ffffff; 
  text-align: center; 
  font-weight: 800; 
  letter-spacing: -0.5px;
}

/* Intro testuale con contrasto migliorato */
.intro-microgreens p {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 22px 28px;
}

/* =========================================
   GRIGLIA SCHEDE PRODOTTO GOURMET
   ========================================= */
.products-wrapper { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 25px; 
  justify-content: center; 
}

a.product { 
  text-decoration: none; 
  color: inherit; 
  cursor: pointer; 
}

.product { 
  position: relative; 
  border-radius: 16px; 
  overflow: hidden; 
  width: 240px; 
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35); 
  transition: transform 0.3s ease, box-shadow 0.3s ease; 
  background-color: #ffffff; 
  display: flex; 
  flex-direction: column; 
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.product:hover { 
  transform: translateY(-7px); 
  box-shadow: 0 16px 32px rgba(46, 125, 50, 0.25); 
}

.product img { 
  width: 100%; 
  height: 200px; 
  object-fit: cover; 
  display: block; 
}

.product-details { 
  padding: 16px 14px; 
  background-color: #ffffff; 
  color: var(--text-dark); 
  display: flex; 
  flex-direction: column; 
  flex-grow: 1; 
  text-align: left;
}

.product-title { 
  font-size: 1.2em; 
  margin: 0; 
  color: #1b4332; 
  font-weight: 800; 
}

.product-variety { 
  font-size: 0.95em; 
  font-weight: 700; 
  margin-top: 6px; 
  margin-bottom: 0;
}

/* =========================================
   PULSANTI GENERALI (Call to Action)
   ========================================= */
.buy-button { 
  display: inline-block; 
  padding: 12px 24px; 
  font-size: 1em; 
  font-weight: bold; 
  color: #ffffff; 
  background-color: #2d6a4f; 
  text-decoration: none; 
  border-radius: 30px; 
  text-align: center; 
  transition: all 0.25s ease; 
  box-shadow: 0 4px 12px rgba(45, 106, 79, 0.3);
}

.buy-button:hover { 
  background-color: #1b4332; 
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(45, 106, 79, 0.45);
}

/* =========================================
   PAGINA DI DETTAGLIO VASCHETTA PRODOTTO
   ========================================= */
.product-detail-container { 
  display: flex; 
  flex-wrap: wrap; 
  gap: 40px; 
  max-width: 1000px; 
  margin: 0 auto; 
  padding: 40px 30px; 
  background-color: #ffffff;
  border-radius: 18px; 
  box-shadow: 0 12px 35px rgba(0,0,0,0.18); 
}

.product-gallery { 
  flex: 1; 
  min-width: 300px; 
  position: relative; 
  overflow: hidden; 
}

.product-info { 
  flex: 1; 
  min-width: 300px; 
  display: flex; 
  flex-direction: column; 
  justify-content: center; 
}

.product-info h2 { 
  color: #1b4332; 
  margin-top: 0; 
  font-size: 2em;
}

.product-info h3 { 
  color: #2d6a4f; 
  margin-top: -10px; 
  margin-bottom: 20px; 
}

.formats-list { 
  list-style-type: none; 
  padding: 0; 
  display: flex; 
  flex-wrap: wrap; 
  gap: 10px; 
  margin-top: 15px; 
}

.format-badge { 
  background-color: #ffffff; 
  border: 1.5px solid #1b4332; 
  color: #1b4332; 
  padding: 8px 16px; 
  border-radius: 20px; 
  font-weight: bold; 
  font-size: 0.9em; 
  cursor: pointer;
  transition: all 0.2s ease;
}

.format-badge.selected {
  background-color: #1b4332;
  color: #ffffff;
  border-color: #1b4332;
}

.format-badge.preventivo { 
  background: rgba(255, 255, 255, 0.7); 
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  color: #1b4332; 
  position: relative;
  overflow: hidden; 
  border: 1.5px solid #1b4332;
}

.format-badge.preventivo::before {
  content: "";
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg); 
  animation: shimmer 3s infinite; 
}

@keyframes shimmer {
  0% { left: -150%; }
  50% { left: 200%; }
  100% { left: 200%; } 
}

.carousel-track { 
  display: flex; 
  width: 100%; 
  transition: transform 0.8s ease-in-out; 
}

.carousel-slide { 
  min-width: 100%; 
  padding: 15px; 
  box-sizing: border-box; 
}

.carousel-slide img { 
  width: 100%; 
  aspect-ratio: 1 / 1; 
  object-fit: cover; 
  display: block; 
  border-radius: 50%; 
  box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
}

/* =========================================================
   SEZIONE RICETTE IN MINIATURA & SCORRIMENTO INFINITO
   ========================================================= */
.recipes-ticker-section {
  margin-top: 45px;
  margin-bottom: 25px;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 18px;
  padding: 30px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  border: 2px solid #2d6a4f;
  text-align: center;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.recipes-ticker-header {
  margin-bottom: 20px;
  padding: 0 20px;
}

.recipes-ticker-header h3 {
  font-size: 1.6em;
  color: #1b4332;
  margin: 0 0 6px 0;
  font-weight: 800;
}

.recipes-ticker-header p {
  color: #555;
  margin: 0;
  font-size: 0.95em;
}

.infinite-ticker-viewport {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  overflow: hidden;
  padding: 15px 0;
  mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 6%, black 94%, transparent 100%);
}

.infinite-ticker-track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
  animation: scrollRecipesLinear 36s linear infinite;
}

.infinite-ticker-track:hover {
  animation-play-state: paused;
}

@keyframes scrollRecipesLinear {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ticker-group {
  display: flex;
  align-items: center;
  gap: 25px;
  padding-right: 25px;
  flex-shrink: 0;
}

.mini-recipe-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  width: 160px;
  flex-shrink: 0;
  transition: transform 0.25s ease;
}

.mini-recipe-card:hover {
  transform: translateY(-4px);
}

.mini-recipe-thumb {
  width: 105px;
  height: 105px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.16);
  border: 3px solid #ffffff;
  outline: 2px solid #2d6a4f;
  background-color: #f5f5f5;
  margin-bottom: 10px;
}

.mini-recipe-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mini-recipe-title {
  font-size: 0.86em;
  font-weight: 700;
  color: #1b4332;
  line-height: 1.25;
  text-align: center;
  margin: 0;
  padding: 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.all-recipes-btn {
  display: inline-block;
  margin-top: 25px;
  background-color: #1b4332;
  color: #ffffff;
  padding: 11px 26px;
  border-radius: 30px;
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.all-recipes-btn:hover {
  background-color: #2d6a4f;
  transform: translateY(-2px);
}

/* =========================================
   MEDIA QUERIES (Smartphone & Tablet)
   ========================================= */
@media screen and (max-width: 768px) { 
  .navbar {
    padding: 16px 0; 
  }

  .menu {
    display: none; 
    flex-direction: column; 
    background-color: #1b4332; 
    position: fixed; 
    top: 60px; 
    left: 0; 
    width: 100%; 
    align-items: center; 
    padding: 20px 0; 
  }

  .menu-theme-ricette .menu {
    background-color: #ede7dc;
  }

  .menu li {
    width: 80%;
    text-align: center;
    margin: 4px 0;
  }

  .menu li a {
    padding: 12px 20px;
    font-size: 1.1em;
  }

  .container {
    padding: 2% 3%; 
    max-width: 96vw; 
  }

  .menu-toggle {
    display: block; 
  }

  .menu-active {
    display: flex; 
  }

  /* Griglia prodotti su mobile: 2 colonne leggibili */
  .products-wrapper {
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 12px; 
  }

  .product {
    width: 100%; 
  }

  .product img {
    height: 140px; 
  }

  .product-details {
    padding: 10px 8px; 
  }

  .product-title {
    font-size: 0.95em; 
  }

  .product-variety {
    font-size: 0.8em; 
  }

  .recipes-ticker-section {
    padding: 22px 0;
    margin-top: 30px;
  }

  .ticker-group {
    gap: 15px;
    padding-right: 15px;
  }

  .infinite-ticker-track {
    animation-duration: 26s;
  }

  .mini-recipe-card {
    width: 120px;
  }

  .mini-recipe-thumb {
    width: 82px;
    height: 82px;
  }
  
}