/* Stile del menu digitale. I colori sono nelle variabili di :root.
   
   Indice delle sezioni:
     1. Colori, base e sfondo
     2. Barra in alto
     3. Menu a tendina
     4. Contenuto principale e titoli
     5. Righe del menu
     6. Informazioni
     7. Contatti
     8. Piè di pagina
     9. Area QR
     10. Schermi piccoli */

/* ========================================
   CARPE DIEM - STILI
   ======================================== */

/* Sezione 1 - Colori, base e sfondo */
:root {
  --bordeaux: #7a0f2b;
  --bordeaux-light: rgba(122, 15, 43, 0.08);
  --bordeaux-border: rgba(122, 15, 43, 0.20);
  --text: #1a1a1a;
  --text-light: #555;
  --bg: #fafafa;
  --white: #ffffff;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* Offset per lo scroll alle sezioni (compensa l'header sticky) */
.menu-category,
.section,
#menu,
#info,
#contatti {
  scroll-margin-top: 100px;
}

/* SFONDO FISSO (funziona anche su mobile) */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("assets/bg.png") center center / 350px auto no-repeat;
  opacity: 0.18;
  z-index: -2;
  pointer-events: none;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  z-index: -3;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ========================================
   HEADER
   ======================================== */
/* Sezione 2 - Barra in alto */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--bordeaux-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand h1 {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 32px;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 3px;
  color: var(--bordeaux);
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.tagline {
  font-family: "Brush Script MT", "Segoe Script", cursive;
  font-size: 20px;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 1px;
  color: var(--text);
  margin-top: 6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-link {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
}

.nav-link:hover {
  background: var(--bordeaux-light);
  color: var(--bordeaux);
}

/* Sezione 3 - Menu a tendina */
/* Dropdown Menu */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  cursor: pointer;
  border: none;
  background: none;
}

.nav-dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--bordeaux-border);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
  min-width: 180px;
  z-index: 200;
  padding: 8px 0;
}

.nav-dropdown-content.show {
  display: block;
}

.nav-dropdown-content a {
  display: block;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s;
}

.nav-dropdown-content a:hover {
  background: var(--bordeaux-light);
  color: var(--bordeaux);
}

.lang-switch {
  display: flex;
  border: 1px solid var(--bordeaux-border);
  border-radius: 8px;
  overflow: hidden;
  margin-left: 8px;
}

.lang-btn {
  padding: 10px 12px;
  font-size: 12px;
  font-weight: 800;
  border: none;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.lang-btn.active {
  background: var(--bordeaux);
  color: var(--white);
}

/* ========================================
   MAIN
   ======================================== */
/* Sezione 4 - Contenuto principale e titoli */
.main {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.section {
  margin-bottom: 40px;
}

.section-header {
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--bordeaux);
}

.section-title {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--bordeaux);
  text-transform: uppercase;
}

/* ========================================
   MENU
   ======================================== */
/* Sezione 5 - Righe del menu */
.menu-category {
  margin-bottom: 30px;
}

.menu-category-title {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--bordeaux);
  text-transform: uppercase;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--bordeaux);
}

.menu-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* RIGA MENU con linea puntinata */
.menu-item {
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.menu-item-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.menu-item-name {
  font-weight: 800;
  font-size: 15px;
  flex-shrink: 0;
}

.menu-item-dots {
  flex: 1;
  border-bottom: 1px dotted var(--text-light);
  margin-bottom: 4px;
  min-width: 20px;
}

.menu-item-price {
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  color: var(--bordeaux);
}

.menu-item-desc {
  display: block;
  font-weight: 400;
  font-size: 12px;
  color: var(--text-light);
  margin-top: 2px;
  line-height: 1.4;
}

/* Nota finale menu (es. *PRODOTTO SURGELATO) */
.menu-footnote {
  margin-top: 20px;
  padding: 12px 16px;
  background: var(--bordeaux-light);
  border-left: 3px solid var(--bordeaux);
  font-weight: 700;
  font-size: 13px;
}

/* ========================================
   INFO
   ======================================== */
/* Sezione 6 - Informazioni */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-card {
  background: var(--white);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid var(--bordeaux-border);
  box-shadow: var(--shadow);
}

.info-card h3 {
  font-family: "Arial Narrow", Arial, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--bordeaux);
  text-transform: uppercase;
  margin-bottom: 8px;
}

.info-card p {
  font-size: 14px;
  color: var(--text);
  margin: 4px 0;
}

/* ========================================
   CONTATTI
   ======================================== */
/* Due bottoni telefono affiancati */
/* Sezione 7 - Contatti */
.contacts-phones {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

.contact-btn--square {
  aspect-ratio: 1;
  max-width: 180px;
  justify-self: center;
}

@media (max-width: 500px) {
  .contacts-phones {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  .contact-btn--square {
    max-width: 100%;
    aspect-ratio: auto;
    padding: 20px 16px;
  }
}

.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.contact-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--white);
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow);
}

.contact-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.contact-btn--call {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.contact-btn--instagram {
  background: linear-gradient(135deg, #833ab4, #fd1d1d, #fcb045);
}

.contact-btn--maps {
  background: linear-gradient(135deg, #4285f4, #34a853);
}

.contact-icon {
  font-size: 28px;
  margin-bottom: 8px;
}

.contact-btn span:nth-child(2) {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
}

.contact-detail {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 4px;
}

/* ========================================
   FOOTER
   ======================================== */
/* Sezione 8 - Piè di pagina */
.footer {
  background: var(--bordeaux);
  color: var(--white);
  text-align: center;
  padding: 30px 20px;
  font-size: 13px;
}

.footer a {
  color: var(--white);
  text-decoration: underline;
}

.footer p {
  margin: 4px 0;
}

.footer .footer-firma { margin-top: 12px; font-size: 11px; opacity: 0.75; }
.footer .footer-firma a { text-decoration: none; }

/* ========================================
   ADMIN QR (nascosto di default)
   ======================================== */
/* Sezione 9 - Area QR */
.qr-admin {
  background: var(--white);
  padding: 30px;
  border-radius: 12px;
  margin: 40px auto;
  max-width: 400px;
  text-align: center;
  border: 2px dashed var(--bordeaux-border);
}

.qr-admin[hidden] {
  display: none !important;
}

.admin-note {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 20px;
}

.qr-box {
  display: inline-block;
  padding: 16px;
  background: var(--white);
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 16px;
}

.qr-url {
  font-family: monospace;
  font-size: 11px;
  color: var(--text-light);
  word-break: break-all;
  margin-bottom: 16px;
}

.qr-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn {
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.btn--primary {
  background: var(--bordeaux);
  color: var(--white);
}

.btn--primary:hover {
  background: #5a0a1f;
}

/* ========================================
   RESPONSIVE
   ======================================== */
/* Sezione 10 - Schermi piccoli */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    text-align: center;
  }

  .nav {
    justify-content: center;
  }

  .brand h1 {
    font-size: 20px;
  }

  .section-title {
    font-size: 18px;
  }

  .menu-item-name {
    font-size: 13px;
  }

  .menu-item-price {
    font-size: 13px;
  }
}
