body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: radial-gradient(circle at 30% 20%, #f7f3e5 0%, #e9f4f2 60%);
  font-family: 'Inter', sans-serif;
  overflow: hidden;
}

/* Pulsante “Torna al sito” */
.back-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  background: rgba(27, 38, 56, 0.85);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 500;
  z-index: 10;
  transition: background 0.3s ease;
}
.back-btn:hover {
  background: rgba(27, 38, 56, 1);
}

/* Contenitore principale (adattivo) */
.menu-wrapper {
  position: relative;
  width: min(90vw, 900px);
  height: min(80vh, 650px); /* proporzionato allo schermo */
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Contenitore delle pagine */
.menu-book {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Immagini */
.menu-page {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: contain; /* adattamento proporzionale */
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 0.7s ease, transform 0.9s cubic-bezier(.77,0,.18,1);
  border-radius: 12px;
}
.menu-page.active {
  opacity: 1;
  transform: scale(1);
  z-index: 2;
}

/* Frecce di navigazione */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: #1b2638;
  font-size: 26px;
  cursor: pointer;
  z-index: 5;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  box-shadow: 0 6px 18px rgba(0,0,0,.15);
}
.arrow:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
}
.arrow.left { left: 14px; }
.arrow.right { right: 14px; }

/* Adattamento mobile */
@media (max-width: 768px) {
  .menu-wrapper {
    width: 95vw;
    height: 70vh; /* meno alto su mobile */
    box-shadow: 0 12px 30px rgba(0,0,0,0.1);
  }

  .arrow {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  .back-btn {
    top: 12px;
    left: 12px;
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* Ancora più compatto per telefoni piccoli */
@media (max-width: 480px) {
  .menu-wrapper {
    height: 65vh;
  }
}
/* ===== SWITCH MENU (Bottone Menu / Carta dei Vini) ===== */
.menu-switch {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 12px;
  z-index: 20;
}

.switch-btn {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(0,0,0,0.12);
  cursor: pointer;
  font-weight: 600;
  backdrop-filter: blur(6px);
  transition: all .25s ease;
}

.switch-btn.active {
  background: #1b2638;
  color: #fff;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.switch-btn:hover {
  transform: translateY(-2px);
}

/* TITOLO */
.menu-title {
  position: fixed;
  top: 80px;
  text-align: center;
  width: 100%;
  font-size: 1.6rem;
  color: #1b2638;
  z-index: 10;
  margin: 0;
  font-weight: 600;
}
/* ===== BOTTONE SINGOLO TOGGLE MENU / CARTA VINI ===== */

.toggle-btn {
  position: fixed;
  top: 20px;
  left: 180px; /* stesso livello del bottone back */
  background: rgba(255,255,255,0.7);
  color: #1b2638;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  font-weight: 600;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 11;
  transition: all .25s ease;
}


/* Mobile alignment */
@media (max-width: 768px) {
  .toggle-btn {
    top: 70px;
    left: 20px;
  }
}
/* DESKTOP (default): switcher centrato sopra il menu */
.switcher {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 9999; /* <— AGGIUNGERE QUESTO */
}


/* MOBILE: switcher in alto come barra */
@media (max-width: 768px) {
  .switcher {
    position: fixed;
    top: 70px; /* sotto il "Torna al sito" */
    left: 0;
    right: 0;
    transform: none;
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    overflow-x: auto;
    white-space: nowrap;
    background: rgba(255,255,255,0.75);
    backdrop-filter: blur(12px);
    z-index: 999;
    border-radius: 0;
  }

  /* nasconde la scrollbar su mobile */
  .switcher::-webkit-scrollbar {
    display: none;
  }

  /* i pulsanti diventano compatti */
  .switch-btn {
    flex-shrink: 0;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  /* sposta il wrapper leggermente verso il basso */
  .menu-wrapper {
    margin-top: 120px;
  }
}
/* Indicatore scroll (desktop nascosto) */
.scroll-indicator {
  display: none;
}

@media (max-width: 768px) {
  .scroll-indicator {
    display: flex;
    justify-content: center;
    position: fixed;
    top: 125px; /* sotto lo switcher mobile */
    width: 100%;
    z-index: 900;
    pointer-events: none;
  }

  .scroll-indicator .arrow-down {
    font-size: 26px;
    font-weight: 600;
    color: rgba(0,0,0,0.45);
    animation: bounceDown 1.6s infinite;
  }

  @keyframes bounceDown {
    0%   { transform: translateX(0); opacity: 0.4; }
    50%  { transform: translateX(6px); opacity: 0.9; }
    100% { transform: translateX(0); opacity: 0.4; }
  }
}
