/* ===========================
   BASE / LAYOUT / HOME
   =========================== */

:root{
  --max: 1200px;
  --gap: 12px;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --text: #222;
  --muted: #666;
  --brand: #111;
  --accent: #f8c100;
}

*{ box-sizing: border-box; }
html,body{ margin:0; padding:0; }
img{ display:block; max-width:100%; height:auto; }

body{
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background:#fafafa;
}

h1,h2,h3{ margin:8px 0; }

/* Header tipo home/admin */
.home-header{
  background:#111; color:#fff; padding:12px 16px;
  display:flex; align-items:center; justify-content:space-between;
}
.home-header .brand{ display:flex; align-items:center; gap:10px; }
.home-header .logo{ font-size:26px; }
.home-header .brand-text h1{ margin:0; line-height:1; font-size:20px; }
.home-header .brand-text p{ margin:0; color:#cfcfcf; font-size:12px; }
.home-header .home-nav a{
  color:#fff; text-decoration:none; margin-left:16px; opacity:.9;
}
.home-header .home-nav a:hover{ opacity:1; text-decoration:underline; }

/* Banner grande con logo centro */
.banner{
  height: 100vh;
  min-height: 720px;
  display:grid; place-items:center;
  background: url("img/banner_cometeesta.png") center/cover no-repeat;
  position: relative; overflow:hidden;
}
.banner-overlay{
  position:absolute; inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.28), rgba(0,0,0,.22));
}
.banner-content{
  position:relative; z-index:1;
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  text-align:center; width:100%; padding:0 24px;
}
.banner-content h1,.banner-content p{ display:none !important; }

.logo-home{
  width: clamp(260px, 28vw, 520px);
  height:auto; margin:0;
  filter: drop-shadow(0 6px 18px rgba(0,0,0,.45));
  transition: transform .2s ease;
}
.logo-home:hover{ transform: scale(1.03); }
@media (max-width:600px){
  .banner{ min-height: 580px; }
  .logo-home{ width: clamp(220px, 62vw, 360px); }
}

/* Hero bajo el banner (home público) */
.hero{
  text-align:center; padding:40px 16px;
  background:#fff; border-bottom:1px solid #eee;
}
.hero h2{ font-size:28px; margin-bottom:6px; }
.hero p{ color:#555; margin:4px 0 12px; }
.cta-group{
  display:flex; gap:12px; justify-content:center; flex-wrap:wrap;
}
.btn{
  background:#111; color:#fff; padding:10px 16px;
  border-radius:10px; border:none;
  text-decoration:none; display:inline-block;
  font-weight:700;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  transition:filter .15s ease;
}
.btn:hover{ filter:brightness(1.1); }
.btn.ghost{
  background:#f5f5f5; color:#111; border:1px solid #ddd;
}

/* cards info / footer home */
.features{
  display:grid; gap:14px; padding:16px; background:#fafafa;
  grid-template-columns: repeat(auto-fit, minmax(220px,1fr));
  max-width:var(--max); margin:0 auto;
}
.feature-card{
  background:#fff; border:1px solid #eee; border-radius:12px; padding:16px;
  box-shadow: var(--shadow); text-align:center;
}

.howto{
  padding:18px 16px; max-width: var(--max); margin: 0 auto;
}
.howto h2{ margin-bottom:8px; }
.howto ol{ margin-left:18px; color:#444; }

.inline-menu{
  margin-top:14px; background:#fff;
  border:1px solid #eee; border-radius:12px; padding:12px;
}
.inline-row{
  display:flex; gap:8px; align-items:center; flex-wrap:wrap;
}
.inline-row select{
  padding:8px; border:1px solid #ddd; border-radius:8px;
}

.home-footer{
  display:grid; gap:12px; padding:16px; background:#111; color:#eee;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-top:24px;
}
.home-footer strong{ color:#fff; }

/* ===========================
   LAYOUT DEL MENÚ (pedido)
   =========================== */

.container{
  width:100%; max-width:var(--max);
  margin:16px auto;
  padding:0 12px;
  display:block;
}
.content{ width:100%; }
.mesa{
  font-weight:700;
  margin:6px 0 10px;
  color:#fff;
}

/* ===========================
   CARDS PRODUCTO EN MENÚ
   =========================== */

#menu{ display:block; width:100%; }

.grid{
  display:grid;
  gap:var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

/* tarjeta tipo vidrio neon */
.grid > div {
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 0 15px rgba(255, 0, 255, 0.25),
    0 0 30px rgba(0, 0, 0, 0.6);
  color: #fff;
  transition: all 0.3s ease;
  padding: 1rem;
}
.grid > div:hover {
  transform: scale(1.03);
  background: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 0 25px rgba(255, 0, 255, 0.5),
    0 0 45px rgba(0, 0, 0, 0.9);
  border-color: rgba(255, 0, 255, 0.5);
}
.grid > div h3,
.grid > div h4 {
  color: #fff;
  text-shadow: 0 0 8px #ff00ff, 0 0 16px #ff00ff;
  font-weight: 700;
  margin: 0 0 .4rem;
}
.grid > div p {
  color: #ddd;
  font-size: 0.95rem;
  line-height: 1.4;
  margin: 0 0 .6rem;
}
.grid select,
.grid input,
.grid textarea {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  border-radius: 8px;
  padding: 6px 8px;
  width: 100%;
  font-family: inherit;
  font-size: .9rem;
}
.grid input::placeholder,
.grid textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* botón agregar (en cada producto) */
button.add {
  padding:8px 12px;
  border-radius:10px;
  border:1px solid #ddd;
  background:#f0f0f0;
  cursor:pointer;
  font-weight:600;
  font-family: inherit;
  color:#000;
}
button.add:hover{
  background:#e8e8e8;
}

/* bloqueo producto sin stock */
.card.locked { position: relative; opacity: .85; }
.lock-overlay{
  position:absolute; inset:0;
  background: rgba(255,255,255,.6);
  display:flex; align-items:center; justify-content:center;
  font-size: 42px; color:#333; pointer-events:none;
}
.card.locked .acciones .add[disabled]{
  background:#bbb;
  color:#fff;
  cursor:not-allowed;
  border:0;
}

/* ===========================
   TOAST / MENSAJES
   =========================== */

#toastContainer{
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  color: #fff;
  text-align:center;
  font-size:.9rem;
  text-shadow: 0 0 6px rgba(0,0,0,0.9);
}
.toast{
  background: #111;
  color: #fff;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 8px 30px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  opacity: .98;
}
.toast .check{
  background: #10b981;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size: 12px;
  font-weight: 900;
  color:#fff;
}
.toast.fade-out{ opacity:0; transition:opacity .2s ease; }
.sr-only{
  position:absolute !important;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* ===========================
   MODAL LOGIN (otras vistas)
   =========================== */

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  justify-content: center;
  align-items: center;
  z-index: 999;
  backdrop-filter: blur(3px);
}
.modal.show { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 16px;
  padding: 28px 30px;
  width: 90%;
  max-width: 380px;
  box-shadow: 0 4px 20px rgba(0,0,0,.25);
  position: relative;
  text-align: center;
}
.modal-content h2 {
  margin-top: 0;
  font-weight: 800;
  color: #222;
}
.modal-content label {
  display: block;
  text-align: left;
  font-size: 14px;
  color: #444;
  margin-top: 12px;
}
.modal-content input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  margin-top: 4px;
  font-size: 15px;
}
.modal-content button {
  margin-top: 18px;
  width: 100%;
  background: #111;
  color: #fff;
  font-weight: bold;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
}
.modal-content button:hover {
  background: #f8c100;
  color: #111;
}
.close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}
.close:hover {
  color: #000;
}

/* ===========================
   MAPA / INFO FINAL (landing)
   =========================== */

.zona-inferior {
  position: relative;
  z-index: 5;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 4rem;
  padding-bottom: 4rem;
  font-family: "Poppins", system-ui, sans-serif;
  color: #fff;
  text-align: center;
}
.ubicacion-box {
  background: rgba(0, 0, 0, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow:
    0 0 10px rgba(255, 0, 255, 0.4),
    0 30px 60px rgba(0,0,0,0.9);
  border-radius: 14px;
  padding: 0.8rem 1rem 1rem;
  width: 90%;
  max-width: 320px;
  text-align: center;
  color: #fff;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  margin-bottom: 2rem;
}
.ubicacion-box h2 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.6rem 0;
  text-shadow: 0 0 6px #fff, 0 0 12px #ff00ff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
}
.ubicacion-box .direccion {
  font-size: 0.9rem;
  color: #ddd;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.mapa-frame {
  width: 100%;
  height: 180px;
  border: 0;
  border-radius: 10px;
  box-shadow:
    0 0 10px rgba(255, 0, 255, 0.3),
    0 10px 25px rgba(0, 0, 0, 0.8);
}

/* ===========================
   🛒 CARRITO FLOTANTE (SIEMPRE ARRIBA)
   =========================== */

/* caja flotante resumida del carrito (visible SIEMPRE) */
.cart-box {
  position: fixed;
  right: 20px;
  top: 80px;
  bottom: auto;
  width: 260px;
  max-height: 260px;
  background: rgba(0,0,0,0.85);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  box-shadow:
    0 0 12px rgba(255,0,255,0.4),
    0 30px 60px rgba(0,0,0,0.9);
  padding: 1rem;
  color: #fff;
  font-family: inherit;
  z-index: 99999;
  display: flex !important;
  flex-direction: column;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}


/* cabecera mini carrito */
.cart-box-header {
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 0 8px #ff00ff;
  display: flex;
  flex-direction: column;
  line-height: 1.4;
  margin-bottom: .5rem;
}
.cart-box-title-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  color: #fff;
}
.cart-box-totalline {
  font-size: 0.8rem;
  color: #fff;
  font-weight: 500;
}

/* lista de items chica con scroll */
.cart-box-items {
  flex: 1;
  min-height: 40px;
  max-height: 110px;
  overflow-y: auto;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #fff;
  margin-bottom: .5rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  padding: .5rem .6rem;
}

/* box total dentro del carrito flotante */
.cart-box-totalbox {
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  padding: .6rem .75rem;
  margin-bottom: .5rem;
  text-shadow: 0 0 6px rgba(255,0,255,0.5);
}
.cart-box-total-amount {
  font-weight: 700;
  color: #fff;
}

/* botón verde grande pedir */
#btnPedir {
  width: 100%;
  border: none;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0.8rem 1rem;
  text-align: center;
  transition: 0.18s;
  color: #fff;
  background: #00c853;
  box-shadow:
    0 0 12px rgba(0, 200, 83, 0.7),
    0 20px 30px rgba(0, 0, 0, 0.9);
}
#btnPedir:hover {
  background: #009d3f;
  transform: scale(1.03);
  box-shadow:
    0 0 20px rgba(0, 200, 83, 0.9),
    0 30px 60px rgba(0,0,0,1);
}

/* mensaje bajo el botón */
.cart-box-msg {
  font-size: 0.7rem;
  line-height: 1.3;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 8px rgba(255,0,255,0.6);
  margin-top: .5rem;
  min-height: 1em;
}

/* ===========================
   🛒 MODAL DEL CARRITO (DETALLE COMPLETO)
   =========================== */

.cart-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10000;
}
.cart-modal.show {
  display: flex;
}

.cart-modal-content {
  background: rgba(20,0,25,0.95);
  border: 1px solid rgba(255,255,255,0.2);
  box-shadow:
    0 0 20px rgba(255,0,255,0.4),
    0 40px 80px rgba(0,0,0,1);
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 1.25rem;
  color: #fff;
  overflow: hidden;
}

.cart-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: .75rem;
}
.cart-modal-header h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  text-shadow: 0 0 8px #ff00ff;
  color: #fff;
}
.cart-close {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  text-shadow: 0 0 8px #ff00ff;
}

#cartItems {
  flex: 1;
  min-height: 100px;
  max-height: 40vh;
  overflow-y: auto;
  font-size: 0.9rem;
  color: #fff;
}

#obsGenerales {
  width: 100%;
  min-height: 60px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(0,0,0,0.4);
  color: #fff;
  padding: 0.6rem 0.8rem;
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.4;
  margin-top: 0.75rem;
  margin-bottom: 0.75rem;
}
#obsGenerales::placeholder {
  color: #bbb;
}

.total {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: center;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 6px rgba(255,0,255,0.5);
}
.total span#total {
  color: #fff;
  font-weight: 700;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

#btnEnviar,
#btnPagar {
  width: 100%;
  background: #ff00ff;
  color: #fff;
  border: none;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.18s;
  box-shadow:
    0 0 12px rgba(255, 0, 255, 0.5),
    0 20px 30px rgba(0, 0, 0, 0.9);
  text-align: center;
  font-family: inherit;
}
#btnEnviar:hover,
#btnPagar:hover {
  background: #c700c7;
  transform: scale(1.03);
  box-shadow:
    0 0 20px rgba(255,0,255,0.8),
    0 30px 60px rgba(0,0,0,1);
}

.msg,
#msg {
  font-size: 0.75rem;
  line-height: 1.3;
  min-height: 1em;
  color: #fff;
  text-align: center;
  text-shadow: 0 0 8px rgba(255,0,255,0.6);
  margin-top: 0.5rem;
}

.extra-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 6px 0;
  font-weight: 600;
}

/* Forzar que el texto quede a la izquierda */
.extra-check strong {
  order: 1;
}

/* Y el checkbox a la derecha */
.extra-check input[type="checkbox"] {
  order: 2;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* ===== Custom Dropdown Style ===== */
select.variant {
  background: rgba(240, 0, 200, 0.3); /* fucsia transparente */
  color: #fff;
  border: 1px solid #ff4eda;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
}

/* Hover */
select.variant:hover {
  background: rgba(255, 0, 200, 0.45);
}

/* Texto dentro del menú desplegable */
select.variant option {
  background: #a8007a;  /* fucsia oscuro */
  color: white;
  font-weight: 600;
}

/* Para que no se ponga negro en Windows */
select.variant:focus {
  outline: none;
  border: 2px solid #ff8aff;
  background: rgba(255, 0, 255, 0.35);
}

/* ===== Select legible (categoría) ===== */
#categoriaSel {
  background: rgba(255, 0, 180, 0.25);
  color: #fff;
  border: 1px solid #ff4eda;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}

/* Lista desplegable (opciones) */
#categoriaSel option {
  background: #a8007a;   /* fucsia oscuro */
  color: #fff;
}

/* Enfocado/Hover */
#categoriaSel:focus {
  outline: none;
  border: 2px solid #ff8aff;
  background: rgba(255, 0, 200, 0.35);
}

/* Select legible para categoría */
#categoriaSel {
  background: rgba(255, 0, 180, 0.25);
  color: #fff;
  border: 1px solid #ff4eda;
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 600;
}
#categoriaSel option { background: #a8007a; color: #fff; }
#categoriaSel:focus { outline: none; border: 2px solid #ff8aff; }

.btn-primary{
  background: linear-gradient(135deg,#ff2fa0,#8a2be2);
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  transition: all .2s ease;
}

.btn-primary:hover{
  transform: scale(1.05);
  box-shadow: 0 0 10px rgba(255,0,150,0.6);
}
