/* ============ Ranas Porongo · Tema verde campestre ============ */
:root {
  --verde-oscuro: #123d31;
  --verde: #1d5c4a;
  --verde-claro: #2e7d63;
  --crema: #f6f3ea;
  --dorado: #d4a945;
  --texto: #22302b;
  --gris: #6b7a73;
  --blanco: #ffffff;
  --rojo: #c0392b;
  --radio: 14px;
  --sombra: 0 4px 18px rgba(18, 61, 49, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--crema);
  color: var(--texto);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; }

a { color: var(--verde); }

/* ---------- Cabecera ---------- */
.cabecera {
  background: var(--verde-oscuro);
  color: var(--blanco);
  padding: .8rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: .7rem; text-decoration: none; color: var(--blanco); }
.logo { height: 48px; width: auto; border-radius: 8px; }
.logo-emoji { font-size: 2rem; }
.marca-texto strong { font-family: 'Playfair Display', serif; font-size: 1.25rem; display: block; }
.marca-texto small { color: #b9d4c9; font-size: .72rem; }

.btn-carrito {
  background: var(--dorado);
  border: none;
  border-radius: 999px;
  padding: .55rem 1rem;
  font-size: 1.1rem;
  cursor: pointer;
  position: relative;
}
.badge {
  background: var(--rojo);
  color: #fff;
  border-radius: 999px;
  font-size: .75rem;
  font-weight: 700;
  padding: .1rem .45rem;
  margin-left: .2rem;
}

/* ---------- Contenido ---------- */
.contenido { flex: 1; width: 100%; max-width: 1080px; margin: 0 auto; padding: 1.2rem; }
.contenido-ancho { max-width: 1280px; }

.banda-info {
  background: var(--verde);
  color: var(--blanco);
  border-radius: var(--radio);
  padding: 1.4rem 1.6rem;
  margin-bottom: 1.2rem;
  box-shadow: var(--sombra);
}
.banda-info h1 { font-size: 1.6rem; margin-bottom: .3rem; }
.banda-info p { color: #d8e8e0; }
.aviso-pruebas { margin-top: .5rem; font-size: .85rem; color: #ffe9a8 !important; }

.categorias-nav {
  display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .6rem; margin-bottom: .8rem;
  scrollbar-width: thin;
}
.categorias-nav a {
  white-space: nowrap; text-decoration: none; background: var(--blanco);
  border: 1px solid #dfe6e1; border-radius: 999px; padding: .45rem 1rem;
  font-size: .9rem; font-weight: 600; color: var(--verde-oscuro);
}

.categoria h2 {
  margin: 1.4rem 0 .8rem; color: var(--verde-oscuro); font-size: 1.35rem;
  border-bottom: 2px solid var(--dorado); display: inline-block; padding-bottom: .2rem;
}

.grilla-productos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.tarjeta {
  background: var(--blanco);
  border-radius: var(--radio);
  overflow: hidden;
  box-shadow: var(--sombra);
  display: flex;
  flex-direction: column;
}
.tarjeta.agotado { opacity: .55; }
.tarjeta-img {
  height: 150px; background: linear-gradient(135deg, #e8f0eb, #d3e3da);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.tarjeta-img img { width: 100%; height: 100%; object-fit: cover; }
.img-placeholder { font-size: 3rem; opacity: .5; }
.sello-agotado, .sello-pocas {
  position: absolute; top: .6rem; right: .6rem; border-radius: 999px;
  font-size: .72rem; font-weight: 700; padding: .25rem .7rem; color: #fff;
}
.sello-agotado { background: var(--rojo); }
.sello-pocas { background: var(--dorado); color: var(--verde-oscuro); }

.tarjeta-cuerpo { padding: .9rem; display: flex; flex-direction: column; flex: 1; }
.tarjeta-cuerpo h3 { font-size: 1.05rem; color: var(--verde-oscuro); margin-bottom: .3rem; }
.descripcion { font-size: .82rem; color: var(--gris); flex: 1; margin-bottom: .7rem; }
.tarjeta-pie { display: flex; align-items: center; justify-content: space-between; }
.precio { font-weight: 700; font-size: 1.05rem; color: var(--verde); }

.control-cantidad {
  display: flex; align-items: center; gap: .5rem;
  background: var(--crema); border-radius: 999px; padding: .2rem;
}
.control-cantidad button {
  width: 30px; height: 30px; border: none; border-radius: 50%;
  background: var(--verde); color: #fff; font-size: 1.1rem; cursor: pointer;
  line-height: 1;
}
.control-cantidad .cantidad { min-width: 1.2rem; text-align: center; font-weight: 700; }

/* ---------- Calendario de inicio (cliente) ---------- */
.grilla-dias {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.tarjeta-dia {
  background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra);
  overflow: hidden; display: flex; flex-direction: column;
}
.dia-cabecera { padding: .9rem 1rem .4rem; }
.dia-cabecera h3 { color: var(--verde-oscuro); font-size: 1.1rem; margin-top: .2rem; }
.dia-etiqueta {
  display: inline-block; background: var(--verde-claro); color: #fff;
  border-radius: 999px; font-size: .7rem; font-weight: 700; padding: .15rem .6rem;
}
.dia-etiqueta.hoy { background: var(--dorado); color: var(--verde-oscuro); }
.turnos-dia { display: flex; flex-direction: column; gap: .5rem; padding: .6rem 1rem 1rem; }
.turno-boton {
  display: flex; flex-direction: column; gap: .1rem; text-decoration: none;
  border-radius: 12px; padding: .8rem 1rem; border: 2px solid #e0e7e1; color: var(--texto);
}
.turno-boton .turno-icono { font-size: 1.3rem; }
.turno-boton .turno-nombre { font-weight: 700; color: var(--verde-oscuro); }
.turno-boton .turno-horario { font-size: .8rem; color: var(--gris); }
.turno-boton.turno-cena { background: #eef2fb; border-color: #c9d6f0; }
.turno-boton.turno-almuerzo { background: #fdf7e7; border-color: #ecdcae; }
.turno-boton:hover { border-color: var(--verde); }

.alerta-turno {
  background: rgba(255,255,255,.15); border-radius: 8px; padding: .5rem .8rem;
  margin: .4rem 0; color: #fff !important;
}
.banda-info .enlace-volver { color: #d8e8e0; }

.turno-chip {
  display: inline-block; border-radius: 999px; font-size: .72rem; font-weight: 700;
  padding: .15rem .6rem; margin-left: .3rem;
}
.turno-chip.turno-cena { background: #e7edfb; color: #2f4a8a; }
.turno-chip.turno-almuerzo { background: #fbf1d6; color: #8a6d1a; }

.turno-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.turno-tab {
  text-decoration: none; border-radius: 999px; padding: .5rem 1.1rem; font-weight: 600;
  border: 1px solid #d7ded8; color: var(--verde-oscuro); background: var(--blanco);
}
.turno-tab.activo { background: var(--verde); color: #fff; border-color: var(--verde); }

/* ---------- Panel carrito ---------- */
.oculto { display: none !important; }
.panel-carrito { position: fixed; inset: 0; z-index: 100; }
.panel-fondo { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.panel-cuerpo {
  position: absolute; top: 0; right: 0; height: 100%; width: min(400px, 92vw);
  background: var(--blanco); display: flex; flex-direction: column;
  box-shadow: -6px 0 24px rgba(0,0,0,.2);
}
.panel-cuerpo header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.2rem; background: var(--verde-oscuro); color: #fff;
}
.panel-cuerpo header button { background: none; border: none; color: #fff; font-size: 1.2rem; cursor: pointer; }
#lista-carrito { list-style: none; flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
#lista-carrito li {
  display: flex; align-items: center; justify-content: space-between; gap: .6rem;
  padding: .6rem 0; border-bottom: 1px solid #eef1ee; font-size: .92rem;
}
.carrito-vacio { color: var(--gris); text-align: center; padding-top: 2rem !important; border: none !important; display: block !important; }
.item-nombre { flex: 1; }
.item-controles { display: flex; align-items: center; gap: .45rem; }
.item-controles button {
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: var(--verde); color: #fff; cursor: pointer;
}
.item-precio { font-weight: 600; min-width: 56px; text-align: right; }
.panel-cuerpo footer { padding: 1rem 1.2rem; border-top: 1px solid #e4e9e5; }
.total-linea {
  display: flex; justify-content: space-between; font-size: 1.1rem;
  margin-bottom: .8rem; font-weight: 600;
}

.barra-pedido {
  position: fixed; bottom: 0; left: 0; right: 0; padding: .8rem 1rem;
  background: linear-gradient(transparent, rgba(246,243,234,.95) 35%);
  display: flex; justify-content: center; z-index: 60;
}
.barra-pedido .btn { width: min(480px, 100%); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  background: var(--blanco); color: var(--verde-oscuro);
  border: 1px solid #d7ded8; border-radius: 10px;
  padding: .55rem 1rem; font-weight: 600; font-size: .92rem;
  text-decoration: none; cursor: pointer;
}
.btn-principal { background: var(--verde); color: #fff; border-color: var(--verde); }
.btn-principal:hover { background: var(--verde-claro); }
.btn-grande { width: 100%; padding: .9rem; font-size: 1.05rem; }
.btn-ok { background: var(--verde); color: #fff; border-color: var(--verde); }
.btn-peligro { background: #fff; color: var(--rojo); border-color: #eccfcb; }
.btn-whatsapp { background: #25d366; color: #fff; border: none; }
.deshabilitado { pointer-events: none; opacity: .5; }

/* ---------- Formularios ---------- */
.formulario { display: flex; flex-direction: column; gap: .9rem; }
.formulario label { display: flex; flex-direction: column; gap: .3rem; font-weight: 600; font-size: .9rem; }
.formulario input, .formulario select, .formulario textarea {
  border: 1px solid #d7ded8; border-radius: 10px; padding: .65rem .8rem;
  font-size: 1rem; font-family: inherit; background: var(--blanco);
}
.formulario h2 { color: var(--verde-oscuro); margin-top: .6rem; }
.formulario-ancho { max-width: 560px; }
.nota { font-size: .82rem; color: var(--gris); background: #fff; border-radius: 10px; padding: .7rem .9rem; border: 1px dashed #cfd9d2; }

.checkout-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 820px) { .checkout-grid { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.resumen {
  background: var(--blanco); border-radius: var(--radio); padding: 1.2rem;
  box-shadow: var(--sombra);
}
.resumen h2 { color: var(--verde-oscuro); margin-bottom: .8rem; }
.resumen ul { list-style: none; margin-bottom: .8rem; }
.resumen li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px solid #eef1ee; font-size: .92rem; }

.opciones-pago { display: flex; flex-direction: column; gap: .6rem; }
.opcion-pago {
  flex-direction: row !important; align-items: flex-start; gap: .7rem !important;
  background: var(--blanco); border: 2px solid #d7ded8; border-radius: 12px;
  padding: .9rem; cursor: pointer; font-weight: 400 !important;
}
.opcion-pago:has(input:checked) { border-color: var(--verde); background: #eef7f2; }
.opcion-pago input { accent-color: var(--verde); margin-top: .2rem; }
.opcion-pago small { color: var(--gris); }

.bloque-qr { background: var(--blanco); border-radius: 12px; padding: 1rem; text-align: center;
  display: flex; flex-direction: column; gap: .8rem; border: 1px solid #e0e7e1; }
.imagen-qr { max-width: 260px; margin: 0 auto; border-radius: 10px; }

.enlace-volver { display: inline-block; margin-top: .8rem; font-size: .9rem; }

/* ---------- Confirmación / cerrado ---------- */
.confirmacion, .vacio, .cerrado {
  text-align: center; padding: 2.2rem 1rem; max-width: 560px; margin: 0 auto;
  display: flex; flex-direction: column; gap: .9rem; align-items: center;
}
.emoji-grande { font-size: 3.4rem; }
.codigo-reserva strong { font-size: 1.4rem; color: var(--verde); letter-spacing: 1px; }
.tarjeta-resumen {
  background: var(--blanco); border-radius: var(--radio); padding: 1.2rem;
  box-shadow: var(--sombra); width: 100%; text-align: left;
}
.tarjeta-resumen ul { list-style: none; margin: .8rem 0; }
.tarjeta-resumen li { display: flex; justify-content: space-between; padding: .35rem 0; border-bottom: 1px solid #eef1ee; font-size: .92rem; }

/* ---------- Flashes ---------- */
.flashes { max-width: 1080px; margin: .8rem auto 0; padding: 0 1.2rem; width: 100%; }
.flash { border-radius: 10px; padding: .75rem 1rem; margin-bottom: .5rem; font-size: .92rem; }
.flash-ok { background: #e3f4ea; color: #1b6b43; border: 1px solid #bfe5cf; }
.flash-error { background: #fdebe9; color: var(--rojo); border: 1px solid #f3c9c4; }

/* ---------- Pie ---------- */
.pie {
  background: var(--verde-oscuro); color: #b9d4c9; text-align: center;
  padding: 1.4rem 1rem; font-size: .85rem; margin-top: 2rem;
}
.pie a { color: var(--dorado); }

/* ============ Panel admin ============ */
.nav-admin { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; font-size: .92rem; }
.nav-admin a { color: #d8e8e0; text-decoration: none; font-weight: 600; }
.nav-admin a:hover { color: var(--dorado); }
.usuario-actual { color: #8fb3a5; font-size: .8rem; }
.nav-admin .salir { color: #f0b9b0; }

.btn-avisos {
  background: var(--dorado); color: var(--verde-oscuro); border: none;
  border-radius: 999px; padding: .35rem .8rem; font-size: .82rem; font-weight: 700;
  cursor: pointer;
}
.btn-avisos.activado { background: #2e7d63; color: #fff; cursor: default; }

.aviso-banner {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: .8rem;
  background: var(--dorado); color: var(--verde-oscuro);
  padding: .7rem 1.2rem; font-weight: 600;
  box-shadow: 0 3px 10px rgba(0,0,0,.18);
  animation: aviso-entra .3s ease;
}
@keyframes aviso-entra { from { transform: translateY(-100%); } to { transform: translateY(0); } }
.aviso-banner .aviso-texto { flex: 1; }
.aviso-banner .aviso-actualizar { background: var(--verde-oscuro); color: #fff; border: none; }
.aviso-banner .aviso-cerrar { background: none; border: none; font-size: 1.1rem; cursor: pointer; color: var(--verde-oscuro); }

.encabezado-seccion {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: .8rem; margin-bottom: 1rem;
}
.encabezado-seccion h1 { color: var(--verde-oscuro); font-size: 1.5rem; }
.filtros { display: flex; gap: .5rem; flex-wrap: wrap; }
.filtros input, .filtros select { border: 1px solid #d7ded8; border-radius: 10px; padding: .5rem .7rem; font-family: inherit; }

.subtitulo { color: var(--verde-oscuro); margin: 1.4rem 0 .6rem; }

.tabla {
  width: 100%; border-collapse: collapse; background: var(--blanco);
  border-radius: var(--radio); overflow: hidden; box-shadow: var(--sombra);
  margin-bottom: 1rem; font-size: .92rem;
}
.tabla th { background: var(--verde-oscuro); color: #fff; text-align: left; padding: .7rem .9rem; font-size: .82rem; }
.tabla td { padding: .65rem .9rem; border-bottom: 1px solid #eef1ee; vertical-align: middle; }
.tabla .acciones { display: flex; gap: .4rem; align-items: center; }
.celda-img img { width: 52px; height: 40px; object-fit: cover; border-radius: 8px; }
.fila-inactiva { opacity: .5; }
.input-stock { width: 90px; border: 1px solid #d7ded8; border-radius: 8px; padding: .45rem .6rem; font-size: 1rem; }

.lista-reservas { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); }
.reserva-carta {
  background: var(--blanco); border-radius: var(--radio); padding: 1rem 1.1rem;
  box-shadow: var(--sombra); border-left: 5px solid #cbd6cf;
}
.reserva-carta.estado-pendiente { border-left-color: var(--dorado); }
.reserva-carta.estado-confirmada { border-left-color: var(--verde); }
.reserva-carta.estado-entregada { border-left-color: #8fb3a5; }
.reserva-carta.estado-liberada, .reserva-carta.estado-rechazada { border-left-color: var(--rojo); opacity: .75; }
.reserva-carta header { display: flex; justify-content: space-between; align-items: center; margin-bottom: .5rem; }
.hora-llegada { font-size: 1.1rem; color: var(--verde-oscuro); }
.codigo { color: var(--gris); font-size: .82rem; margin-left: .5rem; }
.etiqueta { border-radius: 999px; font-size: .72rem; font-weight: 700; padding: .25rem .7rem; }
.etiqueta-pendiente { background: #fdf3d7; color: #8a6d1a; }
.etiqueta-confirmada { background: #e3f4ea; color: #1b6b43; }
.etiqueta-entregada { background: #e8eeeb; color: #51635b; }
.etiqueta-liberada, .etiqueta-rechazada { background: #fdebe9; color: var(--rojo); }
.comentario-reserva {
  background: #fff8e6; border-left: 3px solid var(--dorado); border-radius: 6px;
  padding: .45rem .7rem; margin: .4rem 0; font-size: .88rem; color: #6b5a1a;
}
.reserva-carta .items { list-style: none; margin: .5rem 0; font-size: .9rem; color: var(--texto); }
.reserva-carta .items li { padding: .15rem 0; }
.total-reserva { font-size: .9rem; margin-bottom: .7rem; }
.ver-comprobante { margin-left: .4rem; font-size: .85rem; }
.reserva-carta .acciones { display: flex; gap: .5rem; flex-wrap: wrap; }

.login-caja {
  max-width: 380px; margin: 3rem auto; background: var(--blanco);
  border-radius: var(--radio); padding: 2rem; box-shadow: var(--sombra);
}
.login-caja h1 { color: var(--verde-oscuro); margin-bottom: 1.2rem; text-align: center; }

.dias-fieldset { border: 1px solid #d7ded8; border-radius: 10px; padding: .8rem 1rem; }
.dias-fieldset legend { font-weight: 600; font-size: .9rem; padding: 0 .4rem; }
.check-dia { flex-direction: row !important; align-items: center; gap: .45rem !important; font-weight: 400 !important; display: inline-flex !important; margin-right: 1rem; }
.vista-previa { max-width: 220px; border-radius: 10px; box-shadow: var(--sombra); }
.vista-qr { max-width: 180px; }

@media (max-width: 640px) {
  .grilla-productos { grid-template-columns: 1fr 1fr; }
  .tarjeta-img { height: 110px; }
  .descripcion { display: none; }
  .tarjeta-cuerpo h3 { font-size: .9rem; }
  .tabla { display: block; overflow-x: auto; }
}
