:root {
  --bg: #0b0b0b;
  --card: #141414;
  --muted: #bfbfbf;
  --text: #f2f2f2;
  --accent: #59ffa5;
  --ring: rgba(89,255,165,0.3);
  --radius: 18px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { overflow-x: hidden; } /* blocca scroll laterale */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Montserrat', system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* CONTAINER — bordi stabili */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 16px 48px; /* padding laterale fisso */
  flex: 1 0 auto;
  box-sizing: border-box;
}

/* HEADER */
header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 28px;
}

.logo {
  height: 300px; /* desktop */
  width: auto;
  display: block;
  filter: drop-shadow(0 0 12px rgba(255,255,255,0.05));
}

/* GRIGLIA PRODOTTI */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  /* niente margin qui; lo spazio lo diamo alla sezione */
}

/* 👉 Spazio SOTTO la sezione Prodotti (sicuro) */
section[aria-label="Prodotti"] {
  margin-bottom: 60px !important;  /* stacca dai “Chi siamo” */
}

/* CARD PRODOTTO */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  height: 520px; /* allinea le card */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(255,255,255,0.18);
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 0 6px var(--ring);
}

/* IMMAGINE PRODOTTO */
.media {
  aspect-ratio: 4/3;
  width: 100%;
  background: #0f0f0f;
  display: grid;
  place-items: center;
}

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

/* CONTENUTO CARD */
.content {
  padding: 16px 16px 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.title {
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 6px;
}

.meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
}

/* BOTTONE */
.cta {
  margin-top: 24px;
  margin-bottom: 8px; /* ~2mm */
  width: 100%;
  padding: 12px 14px;
  background: #1c1c1c;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
  letter-spacing: 0.2px;
  transition: background 150ms ease, border-color 150ms ease, transform 120ms ease;
}

.cta:hover { background: #232323; border-color: rgba(255,255,255,0.2); }
.cta:active { transform: translateY(1px); }

/* BIO (centrata) */
.bio {
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}

.bio h2 {
  margin: 0 0 10px 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.bio p {
  margin: 10px auto 0 auto;
  line-height: 1.6;
  color: var(--muted);
  font-size: 16px;
  max-width: 800px;
}

.bio a {
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255,255,255,0.35);
  transition: opacity .2s, border-color .2s;
}
.bio a:hover { opacity: 0.75; border-color: rgba(255,255,255,0.6); }

/* FOOTER */
footer {
  margin-top: auto;
  background: #0a0a0a;
  border-top: 1px solid rgba(255,255,255,0.08);
  text-align: center;
  padding: 25px 0;
  color: var(--muted);
  font-size: 14px;
}

.mail-footer {
  margin: 0 0 8px 0;
  font-size: 15px;
}

.mail-footer a {
  color: #ffffff;
  text-decoration: none;
  transition: opacity 0.2s;
}

.mail-footer a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

@media (max-width: 640px) {
  /* 🔹 Logo un po' più grande ma non invadente */
  .logo {
    height: 200px;
    width: auto;
    margin-top: 12px;
  }

  /* 🔹 Griglia più stretta */
  .grid {
    grid-template-columns: 1fr;
    gap: 10px; /* meno spazio tra le card */
  }

  /* 🔹 Card più piccole e compatte */
  .card {
    height: auto;
    border-radius: 10px;
    transform: scale(0.9);  /* 🔸 ridotte al 90% */
    transition: transform 0.2s ease;
  }

  .card:hover {
    transform: scale(0.93);
  }

  /* 🔹 Immagine proporzionata più bassa */
  .media {
    aspect-ratio: 4 / 3;
  }

  /* 🔹 Contenuto interno ridotto */
  .content {
    padding: 8px 10px 16px;
  }

  .title {
    font-size: 14px;
    margin-bottom: 4px;
  }

  .price {
    font-size: 15px;
  }

  .cta {
    margin-top: 10px;
    margin-bottom: 6px;
    padding: 7px 9px;
    font-size: 12.5px;
    letter-spacing: 0.3px;
  }

  /* 🔹 Distanza sotto la sezione prodotti */
  section[aria-label="Prodotti"] {
    margin-bottom: 35px !important;
  }

  /* 🔹 Bio */
  .bio {
    padding: 14px 12px;
    border-radius: 10px;
  }

  .bio h2 {
    font-size: 17px;
    margin-bottom: 6px;
  }

  .bio p {
    font-size: 13px;
    line-height: 1.5;
  }

  /* 🔹 Footer */
  footer {
    font-size: 12.5px;
    padding: 16px 0;
  }

  .mail-footer {
    font-size: 13px;
  }
}





/* Spazio sotto la sezione Prodotti */
section[aria-label="Prodotti"] {
  margin-bottom: 80px !important; /* aumenta lo spazio fra prodotti e bio */
}

/* Bio più compatta */
.bio {
  background: #0f0f0f;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 20px 18px; /* meno padding = box più basso */
  text-align: center;
  margin-bottom: 40px; /* un po’ d’aria sopra il footer */
}

.bio h2 {
  margin: 0 0 8px 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.bio p {
  margin: 6px auto 0 auto;
  line-height: 1.5;
  color: var(--muted);
  font-size: 15px;
  max-width: 750px;
}

@media (max-width: 640px) {
  section[aria-label="Prodotti"] {
    margin-bottom: 60px !important; /* un po’ meno su telefono */
  }

  .bio {
    padding: 16px 14px;
    border-radius: 10px;
  }
  .bio h2 {
    font-size: 18px;
  }
  .bio p {
    font-size: 13.5px;
  }
}

/* Scorrimento fluido per i link àncora */
html {
  scroll-behavior: smooth;
}
/* Barra superiore centrata */
.topbar {
  width: 100%;
  background: #0a0a0a;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 12px 16px;
  display: flex;
  justify-content: center;  /* 👉 centrata */
  position: sticky;
  top: 0;
  z-index: 1000;
}

.topbar a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 0.4px;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 8px;
  transition: background 0.25s, opacity 0.25s;
}

.topbar a:hover {
  background: rgba(255,255,255,0.08);
  opacity: 0.9;
}


/* Margine quando si arriva all'ancora (comodo se la topbar è sticky) */
#contatti {
  scroll-margin-top: 70px; /* evita che il footer resti “sotto” la barra */
}



/* SOCIAL FOOTER */
.social-links {
  margin: 10px 0 16px;
  display: flex;
  justify-content: center;
  gap: 14px;
}

.social-icon {
  width: 28px;
  height: 28px;
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.social-icon:hover {
  opacity: 1;
  transform: scale(1.1);
}