body {
  font-family: 'Georgia', serif;
  background: url('img/pizza.png') no-repeat center center fixed;
  background-size: cover;
  color: #3e2723;
  margin: 0;
  padding: 0;
}

header {
  text-align: center;
  background: url('img/cuadrille.jpg') no-repeat center center fixed;
  background-size: cover;
  padding: 5px 10px;
}

.logo-banner {
  display: block;
  margin: 5px auto 0 auto; 
  width: 35% !important;
  max-width: 140px !important;
  height: auto;
  border-radius: 50%;
  border: 6px solid #104833;
}

h1 { margin: 0; font-size: 2em; }

.menu {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background: #fff8e1;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid #d7ccc8;
  flex-wrap: wrap;
}

.item h4 { margin: 0; }
.controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  background-color: #8d6e63;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}

.btn:hover { background-color: #6d4c41; }

.count {
  min-width: 24px;
  text-align: center;
  font-weight: bold;
}

.total {
  text-align: right;
  font-size: 1.2em;
  margin-top: 20px;
  font-weight: bold;
}

.whatsapp-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px; /* espacio entre icono y texto */
  width: 90%;
  max-width: 320px;
  margin: 25px auto;
  background-color: #075E54; /* verde oscuro elegante */
  color: #ffffff; /* texto blanco */
  padding: 14px 0;
  border-radius: 40px; /* más redondeado estilo premium */
  font-size: 1.1em;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.whatsapp-btn i {
  margin-right: 8px; /* separa el ícono del texto */
  vertical-align: middle; /* opcional, para que quede alineado */
}


.whatsapp-btn:hover {
  background-color: #0a6d63; /* un tono apenas más claro que #075E54 sin flúo */
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.45);
}


.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffb347; /* naranja elegante */
  color: #000;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.95em;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease-in-out;
  z-index: 999;
}

.detalle {
  font-size: 0.75em;
  color: #444;
  font-style: italic;
  display: block;   /* ← ESTO ES LO QUE LO BAJA A OTRA LÍNEA */
  margin-top: 2px;
}



.toast.show {
  opacity: 1;
  pointer-events: auto;
}

.toast.hidden {
  opacity: 0;
}


/* Responsive */
@media (max-width: 768px) {
  .item { flex-direction: column; align-items: flex-start; }
  .controls { margin-top: 5px; }
}

/* CAJA DE TITULO */
.title-box {
  background: #fff8e1;
  border-radius: 12px;
  padding: 5px 9px;
  margin: 30px auto 10px auto;  /* centrado igual que el menú */
  width: 75%;                  /* más chico que el menú */
  max-width: 450px;            /* limite para desktop */
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  text-align: center;
}

/* H2 DE TITULO */
.title-box h2 {
  margin: 0;             /* <<< elimina el gran margen que lo estira */
  padding: 0;
  font-size: 1.2em;       /* ya proporcionado, como la imagen */
  line-height: 1.2;       /* baja altura real */
}




/* =========================
   BURBUJA FLOTANTE 🛒 (F1)
   ========================= */

#cart-bubble {
  position: fixed;
  bottom: 105px; /* margen M1 sobre el botón WhatsApp */
  right: 20px;
  z-index: 999;
  display: none; /* se muestra solo si total > 0 */
}

.cart-bubble-inner {
  background-color: #ffb347; /* mismo color del toast para coherencia */
  color: #000;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 25px;
  font-size: 0.95em;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* RESPONSIVE FIX: Controles fijos a la derecha en mobile */
@media (max-width: 768px) {
  .item {
    flex-direction: row;
    align-items: center;
  }
  .controls {
    margin-top: 0;
    margin-left: auto;
  }
}

/* ==============================
   SELECT OPCIONES FLAN
   ============================== */
.select-opcion {
  display: inline-block;
  margin-top: 6px;
  padding: 6px 10px;
  background-color: #fff8e1; /* mismo color del menú */
  border: 1px solid #d7ccc8;
  border-radius: 10px;
  font-family: 'Georgia', serif;
  font-size: 0.95em;
  color: #3e2723;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
  outline: none;
  width: 100%;
  max-width: 180px;
}

.select-opcion:hover {
  background-color: #fcefd3;
  box-shadow: 0 3px 6px rgba(0,0,0,0.25);
}

.select-opcion:focus {
  border-color: #8d6e63;
  box-shadow: 0 0 0 2px rgba(141,110,99,0.25);
}

/* ==========================
   TEXTO "ELIJE UNA OPCIÓN" flan o crema 🖐
   ========================== */
.opcion-con-texto {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-top: 5px;
  flex-wrap: nowrap;
}

.texto-opcion {
  font-weight: bold;
  color: #104833;
  font-size: 0.95em;
  white-space: nowrap; /* evita que se corte en 2 líneas */
}

.select-opcion {
  flex: 0 0 auto;
  margin-top: 0; /* saca el salto hacia abajo */
  padding: 6px 10px;
  background-color: #fff8e1;
  border: 1px solid #d7ccc8;
  border-radius: 10px;
  font-family: 'Georgia', serif;
  font-size: 0.95em;
  color: #3e2723;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  outline: none;
  width: auto;          /* se ajusta al contenido */
  max-width: 180px;
}




/* ==========================
   CUADRO DE CONFIRMACIÓN 🧾
   ========================== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.hidden {
  display: none;
}

.confirm-box {
  background: #fff8e1;
  border-radius: 12px;
  padding: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.4);
  text-align: center;
  color: #3e2723;
}

.confirm-box h3 {
  margin-top: 0;
  font-size: 1.3em;
  color: #104833;
}

#detalle-pedido {
  text-align: left;
  margin: 15px 0;
  font-size: 0.95em;
  line-height: 1.4em;
}

.botones {
  display: flex;
  justify-content: space-around;
  margin-top: 15px;
}

.btn-confirmar, .btn-editar {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  font-size: 1em;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-confirmar {
  background-color: #0a6d63;
}

.btn-confirmar:hover {
  background-color: #0d8b7a;
  transform: translateY(-2px);
}

.btn-editar {
  background-color: #c62828;
}

.btn-editar:hover {
  background-color: #e53935;
  transform: translateY(-2px);
}

/* ====== FIX FINAL: alineación perfecta de contadores ====== */

/* Mantiene cada línea Chica / Grande en fila, texto a la izquierda, botones a la derecha */
.linea-opcion {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 6px 0;
  padding: 0 10px;
  width: 100%;
  gap: 12px;
}

/* Texto a la izquierda */
.linea-opcion span {
  flex: 1;
  text-align: left;
  color: #3e2723;
  font-size: 0.95em;
  white-space: nowrap;
}

/* Controles completamente a la derecha */
.linea-opcion .controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  min-width: 110px; /* espacio reservado, evita que se mueva el texto */
}

/* Botones */
.btn {
  background-color: #8d6e63;
  color: white;
  border: none;
  border-radius: 6px;
  width: 28px;
  height: 28px;
  font-weight: bold;
  cursor: pointer;
}

/* Centrado total del número dentro del contador */
.count {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;     /* centra verticalmente */
  justify-content: center; /* centra horizontalmente */
  font-weight: bold;
  border: 1px solid #d7ccc8;
  border-radius: 6px;
  background: #fff8e1;
  color: #3e2723;
}

/* Mantiene las pizzas en formato vertical */
.item:has(.linea-opcion) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/* Los demás productos conservan la estructura original */
.item:not(:has(.linea-opcion)) {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Para todos los productos (incluidas empanadas, postres, bebidas) */
.item .controls {
  margin-left: auto;      /* empuja el contador al extremo derecho */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* --- ITEM ELECCIÓN HELADOS (alineado y responsivo) --- */

.helado-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.helado-item .item-col {
  flex: 1 1 75%;
}

.sabores-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
  margin: 8px 0 0 0;
  width: 100%;
}

.nota {
  display: block;
  width: 100%;
  font-size: 0.85em;
  color: #6d4c41;
  margin-top: 8px;
  text-align: left;
}

.helado-item .controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
}

/* --- Modo responsivo (celular) --- */
@media (max-width: 480px) {
  .helado-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .helado-item .controls {
    align-self: flex-end;
    margin-top: 8px;
  }
}

/* --- FIX: alinear contador del Helado en la misma línea --- */
.helado-item {
  flex-direction: column;
}

.helado-item .item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.helado-item .item-header h4 {
  margin: 0;
}

.helado-item .item-header .precio {
  margin-left: 10px;
  font-weight: 500;
}

.helado-item .controls {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
}


