/* ==========================================================================
   Lettera 32 — tema del sito (bar, forno, menù, 404, pagine legali)
   ========================================================================== */

/* Font ospitati sul sito: niente richieste a Google Fonts */
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../fonts/Archivo-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }
@font-face { font-family: "Archivo SemiExpanded"; src: url("../fonts/Archivo_SemiExpanded-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Archivo SemiExpanded"; src: url("../fonts/Archivo_SemiExpanded-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/Inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Peanut Donuts"; src: url("../fonts/PeanutDonutsRegular.woff") format("woff"); font-weight: 400; font-display: swap; }

:root {
  --orange: #E14612;
  --orange-forno: #E04914;
  --cream: #F2DAC5;
  --light: #EAEAE1;
  --black: #1C1C1C;
  --grey: #595959;
  --whatsapp: #25D366;
  --whatsapp-dark: #1DA851;
  --font-wide: "Archivo SemiExpanded", "Archivo", Arial, sans-serif;
  --font-archivo: "Archivo", Arial, sans-serif;
  --font-ui: "Inter", Arial, sans-serif;
  --font-credits: "Peanut Donuts", var(--font-archivo);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, ul { margin: 0; }
ul { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* --------------------------------------------------------------------------
   Selettore della lingua (fisso in alto a destra)
   -------------------------------------------------------------------------- */
.lang-switch {
  --ls-fg: var(--light);
  --ls-active-bg: var(--light);
  --ls-active-fg: var(--black);
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 100;
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 30px;
  background: rgba(0, 0, 0, 0.18);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.lang-switch a {
  display: block;
  min-width: 36px;
  padding: 7px 9px;
  border-radius: 30px;
  text-align: center;
  color: var(--ls-fg);
  opacity: 0.8;
  transition: background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}
.lang-switch a:hover { opacity: 1; }
.lang-switch a[aria-current] {
  background: var(--ls-active-bg);
  color: var(--ls-active-fg);
  opacity: 1;
}
.page-forno .lang-switch { --ls-fg: var(--cream); --ls-active-bg: var(--cream); --ls-active-fg: var(--orange-forno); background: var(--orange-forno); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15); }
.page-menu .lang-switch,
.page-products .lang-switch,
.page-legal .lang-switch { --ls-fg: var(--orange); --ls-active-bg: var(--orange); --ls-active-fg: #fff; background: rgba(225, 70, 18, 0.1); }

/* Icone social */
.social { display: flex; align-items: center; justify-content: center; }
.social a { display: block; color: inherit; transition: opacity 0.2s ease, transform 0.2s ease; }
.social a:hover { opacity: 0.8; transform: translateY(-1px); }
.social svg { display: block; width: 100%; height: 100%; fill: currentColor; }

/* Crediti e link legali */
.credits {
  text-align: center;
  font-family: var(--font-credits);
  font-size: 14px;
}
.credits a { opacity: 0.5; transition: opacity 0.2s ease; }
.credits a:hover { opacity: 1; }
.legal-links {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  letter-spacing: 0.3px;
}

/* ==========================================================================
   LANDING DEL BAR
   ========================================================================== */
.page-bar {
  min-height: 100vh;
  background-color: var(--black);
  color: #fff;
  font-family: var(--font-wide);
}
.bar-bg { position: fixed; inset: 0; z-index: 0; }
.bar-bg img { width: 100%; height: 100%; object-fit: cover; }
.bar-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.5); }

.bar {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2vw 36px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.bar-header { padding: 0 4vw 2vw; }
.bar-logo img { height: 160px; width: auto; }

.bar-info { margin-top: 36px; font-size: 24px; line-height: 1.75; }
.bar-info a { color: var(--light); }
.bar-info a:hover { text-decoration: underline; text-underline-offset: 4px; }

.bar-actions { display: flex; flex-direction: column; align-items: center; gap: 60px; margin-top: 60px; }
.btn-pill {
  display: inline-block;
  padding: 9px 25px;
  border: 2px solid transparent;
  border-radius: 30px;
  letter-spacing: 0.1em;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.btn-orange { font-size: 25px; background-color: var(--orange); color: var(--light); }
.btn-orange:hover { background-color: var(--light); color: var(--orange); border-color: var(--orange); }
.btn-cream { font-size: 20px; background-color: var(--cream); color: var(--orange); border-color: var(--cream); }
.btn-cream:hover { background-color: var(--orange); color: var(--cream); }

.bar-phone { margin-top: 46px; font-size: 24px; }
.bar-phone a { color: var(--light); }

.bar-social { margin-top: 60px; gap: 80px; color: var(--light); }
.bar-social a { width: 40px; height: 40px; }

.page-bar .credits { margin-top: auto; padding-top: 40px; color: var(--cream); }

@media (max-width: 1000px) {
  .bar { padding-top: 56px; }
  .bar-logo img { height: auto; width: 70vw; max-width: 420px; }
  .bar-info { margin-top: 12px; margin-bottom: 20px; font-size: 16px; }
  .bar-actions { gap: 20px; margin-top: 20px; }
  .btn-orange { font-size: 22px; padding: 12px 28px; }
  .btn-cream { font-size: 18px; padding: 10px 24px; }
  .bar-phone { margin-top: 34px; font-size: 18px; }
  .bar-social { margin-top: 30px; gap: 40px; }
  .bar-social a { width: 32px; height: 32px; }
  .page-bar .credits { font-size: 12px; padding-top: 24px; }
}

/* ==========================================================================
   IL FORNO
   ========================================================================== */
.page-forno {
  background-color: var(--orange-forno);
  color: var(--cream);
  font-family: var(--font-archivo);
}
.forno {
  position: relative;
  display: flex;
  height: 100vh;
  overflow: hidden;
}
.forno-content {
  width: 50%;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.forno-inner {
  width: 100%;
  margin: auto;
  padding: 0 24px;
}
.forno-media { width: 50%; height: 100vh; }

.forno-logo { height: 16vh; margin-top: 6vh; }
.forno-logo a { display: flex; height: 100%; justify-content: center; align-items: center; }
.forno-logo img { max-height: 100%; width: auto; }

.forno-info {
  margin: 4vh 0 2vh;
  font-size: 21px;
  line-height: 1.15;
  text-align: center;
}
.forno-info a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Illustrazioni: una colonna sul bordo tra testo e foto */
.forno-illustrations {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 10;
  height: 100vh;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5vh;
  pointer-events: none;
}
.forno-illustrations img { height: 19vh; width: auto; max-width: none; }

/* Slideshow */
.slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--light);
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}
.slideshow:not(.is-ready) .slide:first-child,
.slideshow .slide.active { opacity: 1; }

/* WhatsApp */
.whatsapp-cta { max-width: 380px; margin: 3vh auto 2vh; text-align: center; }
.whatsapp-cta-text { font-size: 14px; line-height: 1.5; margin-bottom: 2vh; }
.whatsapp-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 30px;
  background-color: var(--whatsapp);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
  transition: all 0.25s ease;
}
.whatsapp-button:hover { background-color: var(--whatsapp-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35); }
.whatsapp-icon { width: 18px; height: 18px; fill: currentColor; flex-shrink: 0; }

/* Recensione */
.review-cta { margin-top: 3vh; text-align: center; }
.review-link {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 30px;
  background-color: var(--cream);
  color: var(--orange-forno);
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: all 0.25s ease;
}
.review-link:hover { background-color: #fff; transform: translateY(-1px); }

/* Torte personalizzate */
.cake-cta { max-width: 280px; margin: 3vh auto 0; text-align: center; }
.cake-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  border: 1px solid rgba(242, 218, 197, 0.3);
  border-radius: 10px;
  background-color: rgba(242, 218, 197, 0.15);
  transition: all 0.25s ease;
}
.cake-link:hover { background-color: rgba(242, 218, 197, 0.25); border-color: rgba(242, 218, 197, 0.5); transform: translateY(-1px); }
.cake-emoji { font-size: 24px; line-height: 1; flex-shrink: 0; }
.cake-text { display: flex; flex-direction: column; gap: 2px; font-family: var(--font-ui); text-align: left; }
.cake-text strong { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cake-text em { font-size: 11.5px; font-style: normal; font-weight: 500; opacity: 0.7; letter-spacing: 0.3px; }

/* Chi siamo */
.about-link { margin-top: 2.5vh; text-align: center; }
.about-link a {
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  opacity: 0.6;
  transition: opacity 0.2s ease, border-color 0.2s ease;
}
.about-link a:hover { opacity: 1; border-bottom-color: currentColor; }

.forno-social { min-height: 5vh; margin-top: 3vh; gap: 4vw; }
.forno-social a { width: 30px; height: 30px; }

.page-forno .credits { padding: 16px 0 20px; }

@media (max-width: 991px) {
  .forno { flex-direction: column; height: auto; overflow: visible; }
  .forno-content, .forno-media { width: 100%; height: auto; }
  .forno-content { overflow: visible; }
  .forno-inner { padding: 0 20px 24px; }
  .forno-logo { height: auto; margin-top: 56px; }
  .forno-logo img { width: 100%; max-width: 700px; height: auto; max-height: none; }
  .forno-info { margin: 3vh 0 2vh; font-size: 15px; }
  .whatsapp-cta { max-width: 320px; margin: 2.5vh auto 1.5vh; }
  .whatsapp-cta-text { font-size: 13px; margin-bottom: 12px; }
  .forno-social { gap: 10vw; margin: 3vh 0 1vh; }
  .page-forno .credits { padding: 0 0 calc(24px + 8vw); font-size: 12px; }

  .forno-illustrations {
    position: relative;
    left: auto;
    top: auto;
    order: 1;
    height: auto;
    transform: none;
    flex-direction: row;
    gap: 10vw;
    margin: -8vw 0;
  }
  .forno-illustrations img { height: 16vw; }
  .forno-media { order: 2; }
  .forno-media .slideshow { aspect-ratio: 1 / 1; height: auto; min-height: 300px; }
}

/* ==========================================================================
   MENÙ
   ========================================================================== */
.page-menu {
  min-height: 100vh;
  background: #f7f0de url("../images/menu-bg.png");
  color: #333;
  font-family: var(--font-wide);
}
.menu { padding: 64px 24px 80px; text-align: center; }
.menu-logo img { width: 30%; min-width: 200px; max-width: 520px; height: auto; margin: 0 auto; opacity: 0.8; }
.menu-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 80px;
  margin-top: clamp(64px, 12vh, 140px);
  color: var(--orange);
  font-weight: 700;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.2;
}
.menu-links a { display: inline-block; padding: 4px 8px; border-bottom: 3px solid transparent; transition: border-color 0.2s ease; }
.menu-links a:hover { border-bottom-color: currentColor; }

.menu-products { margin-top: clamp(48px, 9vh, 96px); }
.menu-products a {
  display: inline-block;
  padding: 12px 26px;
  border: 2px solid var(--orange);
  border-radius: 30px;
  color: var(--orange);
  font-size: clamp(15px, 1.6vw, 19px);
  letter-spacing: 0.05em;
  transition: background-color 0.25s ease, color 0.25s ease;
}
.menu-products a:hover { background-color: var(--orange); color: #fff; }

@media (max-width: 700px) {
  .menu { padding-top: 72px; }
  .menu-logo img { width: 60%; }
  .menu-links { flex-direction: column; gap: 32px; }
}

/* ==========================================================================
   PRODOTTI, INGREDIENTI E ALLERGENI
   ========================================================================== */
.page-products {
  min-height: 100vh;
  background: #f7f0de url("../images/menu-bg.png");
  color: #333;
  font-family: var(--font-ui);
}
.products { max-width: 1160px; margin: 0 auto; padding: 64px 24px 80px; }
.products-header { text-align: center; margin-bottom: 48px; }
.products-logo img { width: 200px; margin: 0 auto; opacity: 0.8; }
.products-back {
  display: inline-block;
  margin-top: 28px;
  color: var(--orange);
  font-family: var(--font-wide);
  font-size: 15px;
  border-bottom: 1px solid transparent;
}
.products-back:hover { border-bottom-color: currentColor; }
.products-header h1 {
  margin-top: 20px;
  color: var(--orange);
  font-family: var(--font-archivo);
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  text-transform: uppercase;
}
.products-intro { margin-top: 12px; font-size: 17px; color: var(--grey); }

/* Tre colonne: prodotto, ingredienti, allergeni */
.products-head,
.product {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) 2fr minmax(200px, 1.2fr);
  gap: 32px;
}
.products-head {
  padding: 0 0 12px;
  border-bottom: 2px solid var(--orange);
  color: var(--orange);
  font-family: var(--font-archivo);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.product {
  align-items: start;
  padding: 24px 0;
  border-bottom: 1px solid rgba(51, 51, 51, 0.15);
}
.product-main { display: flex; align-items: center; gap: 16px; }
.product-img {
  width: 88px;
  height: 88px;
  flex-shrink: 0;
  border-radius: 8px;
  object-fit: cover;
  background-color: var(--light);
}
.product-name {
  font-family: var(--font-archivo);
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--black);
}
.product-ingredients,
.product-allergens { font-size: 15px; line-height: 1.6; }
.product-ingredients p, .product-allergens p { margin: 0 0 8px; }
.product-ingredients p:last-child, .product-allergens p:last-child { margin-bottom: 0; }
/* Negli ingredienti il grassetto segna gli allergeni: maiuscolo e sottolineato */
.product-ingredients strong, .product-ingredients b {
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}
.product-ingredients ul, .product-ingredients ol { padding-left: 1.2em; list-style: disc; }
.product-allergens { color: var(--orange); font-weight: 500; }

/* Etichetta ripetuta nelle celle (aggiunta da products.js): solo per lettori di schermo su desktop */
.cell-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.products-empty { display: none; padding: 40px 0; text-align: center; color: var(--grey); }
.products-list:empty { display: none; }
.products-list:empty + .products-empty { display: block; }

.products-note {
  max-width: 720px;
  margin: 48px auto 0;
  text-align: center;
  font-size: 14px;
  line-height: 1.6;
  color: var(--grey);
}

@media (max-width: 760px) {
  .products { padding-top: 72px; }
  .products-head { display: none; }
  .product {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 16px;
    padding: 20px;
    border: 0;
    border-radius: 12px;
    background-color: rgba(255, 255, 255, 0.6);
  }
  .products-list { margin-top: 8px; }
  .product-img { width: 72px; height: 72px; }
  .cell-label {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
    display: block;
    margin-bottom: 2px;
    color: var(--grey);
    font-family: var(--font-archivo);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }
}

/* ==========================================================================
   404
   ========================================================================== */
.page-404 { background-color: var(--orange-forno); color: var(--cream); font-family: var(--font-ui); }
.not-found {
  min-height: 100vh;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.not-found-kicker { font-size: 18.7px; font-weight: 700; }
.not-found-code { font-size: 252px; font-weight: 900; letter-spacing: -20px; line-height: 1; margin: -20px 20px -20px 0; }
.not-found-message { max-width: 421px; font-size: 24px; }
.not-found-home {
  margin-top: 48px;
  padding: 14px 32px;
  border-radius: 30px;
  background-color: var(--cream);
  color: var(--orange-forno);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}
.not-found-home:hover { background-color: #fff; transform: translateY(-2px); }
@media (max-width: 640px) {
  .not-found-code { font-size: 140px; letter-spacing: -10px; margin-right: 10px; }
  .not-found-message { font-size: 18px; }
}

/* ==========================================================================
   PAGINE LEGALI
   ========================================================================== */
.page-legal { background: #f7f0de url("../images/menu-bg.png"); color: var(--black); font-family: var(--font-ui); }
.legal { max-width: 760px; margin: 0 auto; padding: 72px 24px 80px; line-height: 1.65; }
.legal-logo img { width: 180px; opacity: 0.8; margin-bottom: 40px; }
.legal h1 { font-family: var(--font-archivo); font-size: clamp(32px, 6vw, 48px); font-weight: 800; line-height: 1.05; color: var(--orange); margin-bottom: 16px; }
.legal h2 { font-family: var(--font-archivo); font-size: 22px; color: var(--orange); margin: 32px 0 8px; }
.legal p { margin-bottom: 16px; }
.legal-date { color: var(--grey); }
.legal-body a, .legal-owner a { color: var(--orange); text-decoration: underline; }
.legal-owner { margin-top: 40px; font-style: normal; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
