* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #111;
  color: #eee;
  margin: 0;
}

html, body {
  overflow-x: hidden;
}

.container {
  padding: 15px;
  padding-bottom: 120px;
}

/* Gestione Categorie e Menu a comparsa */
.category h2 {
  background: #222;
  padding: 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 20px;
}

.category-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

/* Struttura del singolo Piatto/Prodotto */
.item {
  background: #1b1b1b;
  border-radius: 10px;
  padding: 10px;
  margin: 10px auto;
  max-width: 500px;
  text-align: center;
}

/* Immagini dei piatti basse, centrate e proporzionate */
.item img {
  width: 75%;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  margin: 10px auto;
  display: block;
  transition: transform 0.3s;
}

.item img:hover {
  transform: scale(1.05);
}

/* Selezione Piatto */
.selected {
  border: 2px solid #ff7b00;
  background: #2a1a0f;
}

.name {
  font-size: 18px;
  font-weight: bold;
  margin: 5px 0;
}

.desc {
  font-size: 13px;
  color: #999;
  font-style: italic;
}

.price {
  font-size: 16px;
  margin-top: 5px;
}

/* Controlli quantitativi */
.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.controls span {
  font-size: 20px;
}

/* Elementi d'interfaccia */
button {
  padding: 12px 20px;
  font-size: 18px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
}

input {
  width: 100%;
  padding: 15px;
  font-size: 20px;
  border-radius: 10px;
  border: none;
  margin: 10px 0;
  box-sizing: border-box;
  background: #222;
  color: #fff;
}

/* Animazione Pop */
.pop {
  animation: pop 0.2s;
}

@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Barra fissa del carrello */
.cart-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ff7b00;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  font-size: 18px;
  box-sizing: border-box;
  z-index: 999;
}

/* Scontrino di riepilogo */
#receipt {
  width: 95%;
  max-width: 320px;
  margin: 20px auto;
  background: white;
  color: black;
  padding: 20px;
  border-radius: 10px;
}

.title {
  text-align: center;
  font-weight: bold;
  margin-bottom: 10px;
}

.row {
  display: flex;
  justify-content: space-between;
  margin: 4px 0;
  font-size: 14px;
}

.total {
  font-weight: bold;
  font-size: 16px;
}

/* Finestra Modal Pop-up */
.modal-qr {
  display: none;
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  color: white;
  font-family: sans-serif;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background: white;
  color: black;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  max-width: 90%;
  width: 320px;
}

.modal-content img {
  width: 220px;
  height: 220px;
  margin: 15px 0;
  border: 1px solid #ccc;
}

.modal-btn {
  background: #ff3b30;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  width: 100%;
}

/* Struttura Informazioni Preordine */
.inst-container { 
  max-width: 700px; 
  margin: 40px auto; 
  padding: 3rem 2rem; 
}

.inst-title { 
  text-align: center; 
  margin-bottom: 3.5rem; 
}

.inst-title h1 {
  font-size: 3rem;
  color: white;
  margin-bottom: 1rem;
}

.inst-title p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.1rem;
}
