/* Il Pontecorvese - CSS Moderno con Identità Territoriale */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Inter:wght@300;400;500;600&display=swap');

/* CSS Variables - Palette Ispirata ai Loghi */
:root {
  --peperone-red: #c62d1f;
  --peperone-red-light: #e63946;
  --verde-oliva: #4a7c59;
  --verde-scuro: #2d5016;
  --oro: #daa520;
  --oro-light: #f4d03f;
  --crema: #f4f1e8;
  --bianco-caldo: #fefdfb;
  --grigio-soft: #8b8680;
  --grigio-scuro: #2c2c2c;

  /* Typography */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;

  /* Spacing */
  --container-max: 1200px;
  --section-padding: 5rem 0;
  --border-radius: 12px;
  --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 12px 48px rgba(0, 0, 0, 0.15);
}

/* Reset e Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  background: var(--bianco-caldo);
  color: var(--grigio-scuro);
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
}

/* Container System */
.container {
  width: 90%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header Moderno */
header {
  background: linear-gradient(135deg, var(--peperone-red) 0%, var(--peperone-red-light) 100%);
  color: white;
  padding: 1.2rem 0;
  position: relative;
  box-shadow: var(--shadow-soft);
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--oro) 0%, var(--verde-oliva) 50%, var(--oro) 100%);
}

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

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-img {
  height: 50px;
  width: auto;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.2));
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Navigation Moderna */

nav a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem;
  border-radius: 6px;

  /* allineamento verticale + icona+testo */
  display: inline-flex;
  align-items: center;
  line-height: 1;
  gap: 0.35rem;
}

/* Normalizza l'allineamento dell'icona carrello nel link */
.nav-cart svg {
  width: 20px;
  height: 20px;
  display: block;
  /* elimina la discesa di linea sotto l'svg */
  flex: 0 0 auto;
}

nav a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--oro);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

nav a:hover::after {
  width: 80%;
}

/* Hero Section Spettacolare */
.hero {
  background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('img/hero.jpg') center/cover no-repeat;
  color: white;
  padding: clamp(2.5rem, 6vw, 4rem) 1rem;
  text-align: center;
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: linear-gradient(45deg, rgba(196, 45, 31, 0.3) 0%, rgba(74, 124, 89, 0.3) 100%);
  z-index: 1;
}

.hero .container {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  line-height: 1.2;
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  max-width: 600px;
  margin: 0 auto;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  font-weight: 300;
}

.hero .cta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  /* distanza tra i bottoni */
  margin-top: 1.25rem;
  /* piccolo respiro sotto il testo */
  flex-wrap: wrap;
  /* va a capo su schermi piccoli */
}

/* 3) Stile base coerente per entrambi i bottoni */
.hero .cta .btn {
  display: inline-block;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

/* Variante primaria */
.hero .cta .btn-primary {
  background: var(--peperone-red);
  color: #fff;
  border: 2px solid transparent;
}

.hero .cta .btn-primary:hover {
  background: var(--peperone-red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(198, 45, 31, .25);
}

/* Variante outline (coerente per dimensioni e peso) */
.hero .cta .btn-outline {
  background: transparent;
  color: var(--peperone-red);
  border: 2px solid var(--peperone-red);
}

.hero .cta .btn-outline:hover {
  background: var(--peperone-red);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(198, 45, 31, .25);
}

/* Focus accessibile (per tastiera) */
.hero .cta .btn:focus-visible {
  outline: 2px solid var(--peperone-red);
  outline-offset: 3px;
}

/* === Homepage hero media/content layout (nuova struttura) === */
.hero-media {
  position: relative;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.hero-media img {
  display: block;
  width: 100%;
  height: clamp(280px, 60vh, 520px);
  object-fit: cover;
}

.hero-content {
  position: relative;
  max-width: 980px;
  margin: -18vh auto 0;
  /* sovrappone leggermente all'immagine hero */
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.65));
  backdrop-filter: blur(4px);
  border-radius: 16px;
  padding: 1rem 1.25rem 1.25rem;
  color: var(--grigio-scuro);
  box-shadow: var(--shadow-soft);
}

.hero-content .lead {
  color: #333;
}

@media (max-width: 768px) {
  .hero-content {
    margin: -8vh auto 0;
    padding: .9rem 1rem 1.1rem;
  }
}


/* Sezioni Principali */
.about,
.highlight,
.contact,

/* Sezione DOP dedicata */
.dop-highlight {
  background: linear-gradient(135deg, #fff7f4 0%, #fff 100%);
}

.dop-highlight p {
  color: #444;
}

.gallery {
  padding: var(--section-padding);
  position: relative;
  background: var(--bianco-caldo);
}

.about {
  background: var(--crema);
}

.highlight {
  background: var(--bianco-caldo);
}

.contact {
  background: var(--crema);
}

/* ===== Pagine legali (Privacy e Cookie) ===== */
.legal-page {
  max-width: 900px;
  margin: 2rem auto;
  padding: 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  line-height: 1.7;
  font-size: 1rem;
  color: #333;
}

.legal-page h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--peperone-red);
  border-bottom: 2px solid var(--peperone-red);
  padding-bottom: .5rem;
}

.legal-page h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  color: var(--verde-oliva);
}

.legal-page p {
  margin-bottom: 1rem;
}

.legal-page ul {
  padding-left: 1.2rem;
  margin-bottom: 1rem;
}

.legal-page li {
  margin-bottom: .5rem;
}

.legal-page a {
  color: var(--peperone-red);
  text-decoration: underline;
}

.legal-page a:hover {
  text-decoration: none;
}

/* Typography delle Sezioni */
section h2 {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--peperone-red);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
}

section h2::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--oro) 0%, var(--verde-oliva) 100%);
  transform: translateX(-50%);
  border-radius: 2px;
}

section p {
  font-size: 1.1rem;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  color: var(--grigio-scuro);
}

/* Sezione Highlight con Stile Speciale */
.highlight {
  background: linear-gradient(135deg, var(--verde-oliva) 0%, var(--verde-scuro) 100%);
  color: white;
  position: relative;
  overflow: hidden;
}

.highlight::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 200px;
  height: 200px;
  background: var(--oro);
  opacity: 0.1;
  border-radius: 50%;
  z-index: 1;
}

.highlight .container {
  position: relative;
  z-index: 2;
}

.highlight h2 {
  color: white;
}

.highlight h2::after {
  background: var(--oro);
}

.highlight p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.95);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: all 0.3s ease;
}

.gallery-grid img:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Footer Elegante */
footer {
  background: linear-gradient(135deg, var(--grigio-scuro) 0%, #1a1a1a 100%);
  color: #ccc;
  text-align: center;
  padding: 3rem 0 2rem;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--oro) 0%, var(--verde-oliva) 50%, var(--oro) 100%);
}

footer p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-flex {
    flex-direction: column;
    text-align: center;
  }

  .logo {
    font-size: 1.5rem;
  }

  nav ul {
    gap: 1rem;
  }

  nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 6rem 0;
    min-height: 500px;
  }

  :root {
    --section-padding: 3rem 0;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    width: 95%;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* Animazioni Sottili */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

section {
  animation: fadeInUp 0.8s ease-out;
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-oro {
  color: var(--oro);
}

.text-peperone {
  color: var(--peperone-red);
}

.bg-crema {
  background: var(--crema);
}

/* Miglioramenti per l'Accessibilità */
a:focus,
button:focus {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
}

/* Scroll Behavior */
html {
  scroll-behavior: smooth;
}


/* Styles locali e leggeri per la sola homepage */
body.home {
  --accent: #c3342b;
  --bg: #fff7f4;
  --text: #1f1f1f;
}

.home .hero {
  padding: 6rem 0 5rem;
  background: radial-gradient(1200px 400px at 10% -10%, #ffe7e3, transparent), radial-gradient(1200px 400px at 90% -20%, #fff2ef, transparent);
  position: relative;
  overflow: hidden;
}

.home .hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(800px 200px at 50% -10%, rgba(0, 0, 0, .06), transparent);
}

.home .hero h1 {
  font-size: clamp(2rem, 3vw + 1rem, 3.1rem);
  line-height: 1.1;
  margin: .75rem 0 .5rem;
}

.home .hero .lead {
  max-width: 65ch;
  font-size: clamp(1rem, .6vw + .9rem, 1.2rem);
  opacity: .95;
}

.home .badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #ffe7e3;
  color: var(--accent);
  font-weight: 700;
  border-radius: 999px;
  padding: .35rem .8rem;
  font-size: .9rem;
  box-shadow: 0 6px 18px rgba(195, 52, 43, .15);
}

.home .badge::before {
  content: "🌶️";
}

.home .cta {
  display: flex;
  gap: .8rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.home .btn {
  display: inline-block;
  padding: .9rem 1.15rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: .2px;
}

.home .btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 26px rgba(195, 52, 43, .25);
}

.home .btn-outline {
  border: 2px solid var(--accent);
  color: var(--accent);
  background: transparent;
}

.home .section {
  padding: 3.5rem 0;
}

.home .section h2 {
  font-size: clamp(1.6rem, 1.4vw + 1rem, 2.1rem);
  margin: 0 0 1rem;
}

.home .usp-list {
  display: grid;
  gap: .9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: 1rem;
}

.home .usp {
  background: #fff;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .06);
}

.home .product-grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top: .5rem;
}

.home .card {
  background: #fff;
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .06);
  transition: transform .18s ease, box-shadow .18s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.home .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .10);
}

.home .card figure {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  margin: 0 0 .75rem;
  background: #fff0ec;
  display: flex;
  align-items: center;
  justify-content: center;
}

.home .card figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home .card figcaption {
  font-weight: 700;
  margin: .35rem 0 0;
}

.home .card p {
  margin: .35rem 0 1rem;
}

.home .card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.home .faq details {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .05);
}

.home .faq details+details {
  margin-top: .8rem;
}

.home .faq summary {
  cursor: pointer;
  font-weight: 700;
}

/* Cart badge nell'header */
.nav-cart a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}

.nav-cart .cart-badge {
  position: absolute;
  top: -6px;
  right: -10px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent, #c3342b);
  color: #fff;
  font-size: .75rem;
  line-height: 20px;
  text-align: center;
  font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
  /* stacca sul background */
}

.nav-cart .nav-cart-label {
  /* se vuoi solo icona su mobile, nascondi la label */
}

@media (max-width: 640px) {
  .nav-cart .nav-cart-label {
    display: none;
  }
}

/* ===== Cart layout ===== */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
}

@media (max-width: 960px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }
}

/* Empty state */
.cart-empty {
  display: grid;
  gap: 1rem;
  place-items: center;
  padding: 3rem 1rem;
  border: 1px dashed #ddd;
  border-radius: 16px;
}

/* Items list */
.cart-items {
  display: grid;
  gap: 1rem;
}

.cart-item {
  display: grid;
  grid-template-columns: 96px 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  transition: transform .12s ease, box-shadow .12s ease;
}

.cart-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .08);
}

@media (max-width: 720px) {
  .cart-item {
    grid-template-columns: 80px 1fr auto;
    grid-template-areas:
      "img info remove"
      "img total total";
    align-items: start;
  }

  .cart-item-img {
    grid-area: img;
  }

  .cart-item-info {
    grid-area: info;
  }

  .cart-item-total {
    grid-area: total;
    justify-self: end;
  }

  .cart-item-remove {
    grid-area: remove;
    justify-self: end;
  }
}

/* Image */
.cart-item-img {
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  background: #fafafa;
  display: grid;
  place-items: center;
}

.cart-item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Info */
.cart-item-name {
  margin: 0 0 .25rem;
  font-size: 1rem;
  line-height: 1.25;
}

.cart-item-price {
  margin: 0;
  color: #555;
  font-weight: 600;
}

/* Qty controls */
.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: .5rem;
  background: #f6f6f6;
  padding: .25rem;
  border-radius: 999px;
}

.qty-btn {
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  font-size: 18px;
  line-height: 32px;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease;
}

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

.qty-value {
  min-width: 24px;
  text-align: center;
  font-weight: 600;
}

/* Totale riga */
.cart-item-total {
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
}

/* Remove */
.remove-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: #f9e8e8;
  color: #b02a2a;
  font-size: 22px;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease;
}

.remove-btn:hover {
  background: #f5d9d9;
  transform: translateY(-1px);
}

/* ===== Summary ===== */
.cart-summary {
  position: sticky;
  top: 1rem;
  align-self: start;
  background: #fff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
  display: grid;
  gap: .75rem;
}

.cart-summary h2 {
  margin: .25rem 0 .5rem;
  font-size: 1.1rem;
}

.summary-row {
  display: flex;
  justify-content: space-between;
}

.summary-total {
  font-weight: 800;
  font-size: 1.05rem;
  padding-top: .25rem;
}

.summary-note {
  margin: .25rem 0 0;
  font-size: .85rem;
  color: #666;
}

.btn-checkout {
  width: 100%;
  text-align: center;
  margin-top: .5rem;
}

/* ===== Harmony with existing theme ===== */
:root {
  --accent: #c3342b;
  /* usa il tuo accent se già definito */
}

.btn.btn-primary,
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  padding: .7rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  display: inline-block;
  text-decoration: none;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .12s ease, opacity .12s;
}

/* Variante outline globale coerente con la primaria */
.btn.btn-outline,
.btn-outline {
  background: transparent;
  color: var(--accent, var(--peperone-red));
  border: 2px solid var(--accent, var(--peperone-red));
}

.btn.btn-outline:hover,
.btn-outline:hover {
  background: var(--accent, var(--peperone-red));
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(195, 52, 43, .25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(195, 52, 43, .25);
}

/* === Catalog / Product grid === */
.catalog h1 {
  margin-bottom: 1.25rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1100px) {
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

.product-card {
  display: grid;
  grid-template-rows: 200px auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
  transition: transform .12s ease, box-shadow .12s ease;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.product-thumb {
  display: block;
  width: 100%;
  height: 200px;
  background: #fafafa;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.product-body {
  padding: .9rem 1rem 1rem;
  display: grid;
  gap: .5rem;
}

.product-name {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.25;
}

.product-name a {
  color: inherit;
  text-decoration: none;
}

.product-name a:hover {
  text-decoration: underline;
}

.product-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.product-price {
  font-weight: 800;
}

.product-cta {
  white-space: nowrap;
}

.badge {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1;
}

.badge-out {
  background: #f1d8d6;
  color: #a0322b;
  font-weight: 700;
}

/* ===== Product page ===== */
.product-page .product-wrap {
  display: grid;
  grid-template-columns: 520px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .product-page .product-wrap {
    grid-template-columns: 1fr;
  }
}

.product-gallery {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.product-gallery img {
  width: 100%;
  height: 100%;
  max-height: 540px;
  object-fit: cover;
  display: block;
}

.product-info {
  display: grid;
  gap: 1rem;
  background: #fff;
  border-radius: 18px;
  padding: 1.25rem 1.25rem 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.product-title {
  margin: 0;
  font-size: 1.6rem;
  line-height: 1.15;
}

.product-price {
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  gap: .5rem;
  align-items: center;
}

.product-desc {
  color: #444;
  line-height: 1.6;
}

.badge {
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .8rem;
  line-height: 1;
}

.badge-out {
  background: #f1d8d6;
  color: #a0322b;
  font-weight: 700;
}

.buy-box {
  display: grid;
  gap: .75rem;
}

.qty-label {
  font-size: .9rem;
  color: #666;
}

.qty-row {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: #f6f6f6;
  padding: .25rem;
  border-radius: 999px;
}

.qty-row input {
  width: 70px;
  text-align: center;
  padding: .4rem .5rem;
  border: 0;
  background: #fff;
  border-radius: 10px;
  font-weight: 600;
}

.qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: #fff;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(0, 0, 0, .06);
  font-size: 18px;
  line-height: 34px;
}

.add-btn {
  width: fit-content;
}

.link-back {
  color: inherit;
  text-decoration: none;
}

.link-back:hover {
  text-decoration: underline;
}

/* ===== Sticky footer fix (footer che non si stacca) ===== */
/* Applica layout a tutta la pagina: header + main (flessibile) + footer */
html,
body {
  height: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

/* spinge il footer in basso quando il contenuto è corto */

/* =========================================================
   GALLERIA (stili spostati da galleria.php -> style.css)
   ========================================================= */

/* Hero Galleria */
.gallery-hero {
  background: linear-gradient(135deg, var(--verde-oliva) 0%, var(--verde-scuro) 100%);
  color: white;
  padding: clamp(2rem, 6vw, 3rem) 0;
  text-align: center;
}

.gallery-hero h1 {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

.gallery-hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

/* Sezione Galleria principale */
.gallery-main {
  /* crea respiro tra hero verde e i pulsanti */
  padding-top: 0.75rem;
}

/* Filtri */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: clamp(0.75rem, 2.5vw, 1.25rem) 0 2rem;
  /* ↑ spazio extra sotto l'hero */
  flex-wrap: wrap;
}

.filter-btn {
  background: white;
  border: 2px solid var(--peperone-red);
  color: var(--peperone-red);
  padding: 0.8rem 1.5rem;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 0.95rem;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--peperone-red);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(198, 45, 31, 0.3);
}

/* Griglia Avanzata */
.gallery-grid-advanced {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.gallery-item {
  opacity: 1;
  transition: all 0.5s ease;
}

.gallery-item.hidden {
  opacity: 0;
  pointer-events: none;
  transform: scale(0.8);
}

.gallery-card {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease;
  aspect-ratio: 4 / 3;
  background: #fafafa;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  display: flex;
  align-items: flex-end;
  padding: 1rem 1rem 1.25rem;
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery-card:hover .gallery-overlay {
  opacity: 1;
}

.gallery-content {
  color: white;
  text-align: left;
}

.gallery-content h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.gallery-content p {
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
  opacity: 0.9;
}

.view-btn {
  background: var(--oro);
  color: var(--grigio-scuro);
  border: none;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}

.view-btn:hover {
  background: var(--oro-light);
  transform: translateY(-2px);
}

.view-btn:focus-visible {
  outline: 2px solid var(--oro);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(255, 203, 0, .25);
}

/* CTA finale */
.gallery-cta {
  text-align: center;
  background: var(--crema);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  /* ↑ spazio dal footer */
}

.gallery-cta h3 {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--peperone-red);
  margin-bottom: 1rem;
}

.gallery-cta p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: var(--grigio-scuro);
}

.cta-button {
  display: inline-block;
  background: var(--peperone-red);
  color: white;
  padding: 0.8rem 1.4rem;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.cta-button:hover {
  background: var(--peperone-red-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(198, 45, 31, 0.3);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  display: flex;
  flex-direction: column;
  background: white;
  border-radius: var(--border-radius);
  overflow: hidden;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lightbox-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.lightbox-info {
  padding: 1rem 1.25rem 1.25rem;
}

.lightbox-info h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--peperone-red);
  margin-bottom: 1rem;
}

.lightbox-info p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--grigio-scuro);
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-grid-advanced {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
  }

  .gallery-filters {
    gap: .5rem;
  }

  .filter-btn {
    padding: .6rem 1rem;
    font-size: .9rem;
  }

  .gallery-cta {
    padding: 2rem 1rem;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 95%;
  }

  #lightbox-img {
    height: 250px;
  }

  .lightbox-info {
    padding: 1rem;
  }
}

/* === Cookie Banner === */
.cc-banner {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 10000;
  background: #fff;
  color: #222;
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .25);
  max-width: 860px;
  margin: 0 auto;
}

.cc-inner {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.cc-text p {
  margin: .5rem 0 0;
  line-height: 1.45;
}

.cc-link {
  color: var(--peperone-red);
  text-decoration: underline;
}

.cc-controls {
  display: grid;
  gap: .75rem;
}

.cc-details summary {
  cursor: pointer;
  margin-bottom: .5rem;
  font-weight: 600;
}

.cc-check {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-right: 1rem;
}

.cc-buttons {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
}

.cc-buttons .btn {
  padding: .6rem 1rem;
  border-radius: 999px;
  background: #f2f2f2;
  border: 1px solid #ddd;
  cursor: pointer;
}

.cc-buttons .btn:hover {
  background: #eee;
}

.cc-buttons .btn.btn-primary {
  background: var(--peperone-red);
  color: #fff;
  border-color: transparent;
}

.cc-buttons .btn.btn-primary:hover {
  background: var(--peperone-red-light);
}

@media (min-width: 700px) {
  .cc-inner {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .cc-controls {
    justify-self: end;
    min-width: 340px;
  }
}

/* Normalizza la lista di navigazione (niente bullet, layout orizzontale su desktop) */
header nav ul,
nav ul,
#primary-menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

header nav li {
  list-style: none;
}

@media (min-width: 769px) {

  .nav-toggle,
  .nav-toggle * {
    display: none !important;
  }
}

.nav-toggle {
  display: none;
  /* nasconde il burger su desktop */
  line-height: 0;
  font-size: 0;
  border: 0;
  background: transparent;
}

/* Normalizza markers e nasconde qualunque barra burger di default */
#primary-menu > li::before,
#primary-menu > li::marker,
header nav ul > li::before,
header nav ul > li::marker,
nav a::before {
  content: none !important;
}

/* Nascondi sempre le barrette del burger finché non siamo sotto 768px */
.nav-toggle,
.nav-toggle-bar {
  display: none; /* su desktop non devono esistere */
}

/* === Mobile Navigation (burger) === */
.nav-toggle:focus {
  outline: 2px dashed var(--peperone-red);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 26px;
  height: 2px;
  background: currentColor;
  margin: 5px 0;
  border-radius: 2px;
}

@media (max-width: 768px) {
  .header-flex {
    align-items: center;
  }

  nav[role="navigation"] {
    position: relative;
    width: 100%;
  }

  .nav-toggle,
  .nav-toggle-bar {
    display: block !important;
    color: #fff;
  }

  /* Menu panel */
  nav[role="navigation"] ul#primary-menu {
    position: absolute;
    right: 0;
    left: 0;
    top: 100%;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
    padding: .5rem;
    margin: .5rem 0 0;
    display: none;
    flex-direction: column;
    gap: .25rem;
    z-index: 20;
  }

  nav[role="navigation"] ul#primary-menu[data-open="true"] {
    display: flex;
  }

  nav[role="navigation"] ul#primary-menu>li>a {
    display: block;
    padding: .75rem .75rem;
    border-radius: 8px;
    color: var(--grigio-scuro);
    /* migliora contrasto su sfondo bianco */
    background: transparent;
  }

  nav[role="navigation"] ul#primary-menu>li>a:hover {
    background: #faf7f6;
  }

  nav[role="navigation"] ul#primary-menu>li>a.active {
    background: #fff0ec;
  }

  /* Spazio per il carrello in mobile */
  .nav-cart {
    order: 99;
  }
}

/* Riduci animazioni per utenti che preferiscono meno motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Burger: cintura e bretelle contro override */
@media (max-width: 768px) {
  nav[role="navigation"] ul#primary-menu {
    z-index: 1000;
  }

  /* Apertura menu: cintura e bretelle */
  nav[role="navigation"] ul#primary-menu { display: none !important; }
  nav[role="navigation"] ul#primary-menu[data-open="true"] { display: flex !important; }
  header.is-open nav[role="navigation"] ul#primary-menu { display: flex !important; }
}
/* === Desktop override: primary menu as horizontal bar === */
@media (min-width: 769px) {
  nav[role="navigation"] ul#primary-menu {
    position: static !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 1.2rem;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }

  /* Nascondi in modo assoluto il burger su desktop */
  .nav-toggle,
  .nav-toggle * { display: none !important; }
}

/* === Checkout page refinements === */
.checkout h1 { margin: .25rem 0 1rem; font-size: clamp(1.6rem, 2.4vw, 2.2rem); }

.checkout .grid.cols-2 { 
  display: grid; 
  grid-template-columns: 1.2fr .8fr; 
  gap: 1rem; 
}
@media (max-width: 980px) {
  .checkout .grid.cols-2 { grid-template-columns: 1fr; }
}

.checkout .card { 
  background: #fff; 
  border-radius: 16px; 
  box-shadow: 0 18px 40px rgba(0,0,0,.06); 
  padding: 1rem 1.1rem; 
}
.checkout h2 { font-size: 1.2rem; margin: 0 0 .75rem; }
.checkout h3 { font-size: 1.05rem; margin: .75rem 0 .5rem; }

/* Form grid and inputs */
.checkout .form-grid { display: grid; gap: .7rem; }
.checkout label { font-weight: 600; font-size: .96rem; color: #111; }
.checkout .input, .checkout input[type="text"], .checkout input[type="email"], .checkout input[type="password"],
.checkout input[type="tel"], .checkout input[type="number"], .checkout select, .checkout textarea {
  appearance: none;
  width: 100%;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: .65rem .8rem;
  font-size: 1rem;
  background: #fff;
}
.checkout input:focus, .checkout select:focus, .checkout textarea:focus {
  outline: none; 
  border-color: #c3342b; 
  box-shadow: 0 0 0 3px rgba(195,52,43,.12);
}

/* Shipping block hidden by default when "uguale a fatturazione" è spuntato */
.checkout #ship_block { display: grid; gap: .7rem; }

/* Sticky summary on desktop */
@media (min-width: 981px) {
  .checkout .grid.cols-2 > .card:last-child { position: sticky; top: 96px; }
}

/* Button spacing */
.checkout .btn.btn-primary { margin-top: .5rem; }