/* =========================================================================
   Emi Meat — stili custom
   Tutto ciò che NON è una utility Tailwind sta qui.
   I COLORI DEL BRAND si cambiano in un solo punto: le variabili qui sotto.
   ========================================================================= */

:root {
  /* --- Colori brand (cambia qui e si aggiorna tutto il sito) --- */
  --brand-red:   #C20313; /* rosso brand */
  --brand-ink:   #151517; /* nero        */
  --brand-cream: #FDFDF8; /* crema chiara (sfondo principale) */
  --brand-sand:  #F5EFE6; /* crema calda (grandi aree di sfondo) */
  --brand-green: #1F8F4E; /* verde WhatsApp (azione consigliata) */
  --brand-red-dark: #9c0210;

  /* --- Tipografia --- */
  --font-serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Le utility Tailwind compilate (bg-brand, text-brand, ecc.) leggono queste
   variabili: vedi /assets/css/tailwind.css. */

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  color: var(--brand-ink);
  background-color: var(--brand-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Focus visibile e accessibile su tutti gli elementi interattivi */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--brand-red);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Componenti riutilizzabili ---------- */

/* Bottoni grandi e ben evidenti */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1;
  padding: 1rem 1.5rem;
  border-radius: 9999px;
  text-decoration: none;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .12);
}
.btn:hover { transform: translateY(-2px); }
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }

.btn-call {
  background-color: var(--brand-red);
  color: #fff;
}
.btn-call:hover { background-color: var(--brand-red-dark); }

.btn-whatsapp {
  background-color: var(--brand-green);
  color: #fff;
}
.btn-whatsapp:hover { background-color: #19733f; }

.btn-outline {
  background-color: transparent;
  color: var(--brand-ink);
  border: 2px solid var(--brand-ink);
  box-shadow: none;
}
.btn-outline:hover { background-color: var(--brand-ink); color: #fff; }

/* Barra azioni fissa in basso su mobile (Chiama / WhatsApp sempre a portata) */
.action-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  gap: .5rem;
  padding: .6rem .75rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(253, 253, 248, .96);
  backdrop-filter: blur(8px);
  border-top: 1px solid rgba(21, 21, 23, .08);
}
.action-bar .btn { flex: 1; padding: .9rem 1rem; box-shadow: none; font-size: 1rem; }
@media (min-width: 768px) { .action-bar { display: none; } }
/* Spazio extra in fondo alle pagine per non coprire il footer su mobile */
@media (max-width: 767px) { body { padding-bottom: 4.5rem; } }

/* Titolo di sezione con piccola linea rossa */
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 4px;
  margin-top: .75rem;
  background: var(--brand-red);
  border-radius: 2px;
}
.section-title.is-centered::after { margin-left: auto; margin-right: auto; }

/* Hero overlay */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
}
.hero__bg { position: absolute; inset: 0; z-index: 0; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(21,21,23,.30) 0%, rgba(21,21,23,.62) 100%);
}
.hero > .hero__content { position: relative; z-index: 2; width: 100%; }

/* Card punti di forza */
.feature-card {
  background: #fff;
  border: 1px solid rgba(21,21,23,.06);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
  height: 100%;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,0,0,.08); }
.feature-card__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px;
  border-radius: 9999px;
  background: var(--brand-sand);
  color: var(--brand-red);
  margin-bottom: 1rem;
}
.feature-card__icon svg { width: 32px; height: 32px; }

/* Galleria prodotti */
.gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  background: #e9e6df;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
  border: none;
  padding: 0;
  width: 100%;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Placeholder grigio quando l'immagine manca (gestito da main.js) */
.img-fallback {
  background:
    repeating-linear-gradient(45deg, #e4e1da 0 12px, #dcd8d0 12px 24px);
  display: flex !important;
  align-items: center;
  justify-content: center;
  color: #8a857c;
  font-family: var(--font-sans);
  font-size: .8rem;
  letter-spacing: .03em;
  text-align: center;
  padding: .5rem;
  min-height: 100%;
}
.img-fallback::after { content: attr(data-label); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none;
  align-items: center; justify-content: center;
  background: rgba(21,21,23,.92);
  padding: 1.5rem;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; }
.lightbox__close {
  position: absolute; top: 1rem; right: 1.25rem;
  background: none; border: none; color: #fff;
  font-size: 2.5rem; line-height: 1; cursor: pointer;
}

/* Mappa GDPR: placeholder finché l'utente non clicca */
.map-consent {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 1rem; text-align: center;
  min-height: 320px;
  background: var(--brand-sand);
  border-radius: 16px;
  padding: 2rem 1.5rem;
}
.map-frame { border: 0; width: 100%; height: 380px; border-radius: 16px; display: block; }

/* Menu mobile a scomparsa */
.mobile-menu { display: none; }
.mobile-menu.is-open { display: block; }
@media (min-width: 768px) { .mobile-menu { display: none !important; } }

/* Link attivo nel menu */
.nav-link.is-active { color: var(--brand-red); }
.nav-link { position: relative; }

/* Riduci animazioni se l'utente lo preferisce */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
