/* ============================================================
   SECCIÓN 1: VARIABLES GLOBALES Y RESET (Común a todas)
   ============================================================ */
:root {
  /* Colores de Bienvenida y Categorías */
  --color-principal: #f5c542;
  --color-secundario: #ffdd55;
  --color-abierto: #00ff88;
  --color-cerrado: #ff4f4f;
  --color-fondo-index: #0a0a0a;
  --color-caja: #2c2c2e;
  --color-texto: #ffffff;
  --sombra-dorado: 0 0 20px #f5c542, 0 0 40px #f5c54280;

  /* Colores de Productos y Carrito */
  --bg-color-dark-start: #1a1a1a;
  --bg-color-dark-end: #000000;
  --light-effect-color: rgba(245, 197, 66, 0.90);
  --card-bg-color: #2c2c2e;
  --text-color-light: #f0f0f0;
  --text-color-dark: #a0a0a0;
  --accent-yellow: #f5c542;
  --accent-orange: #ff9500;
  --border-radius-card: 12px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #211F1B;
    background-image: radial-gradient(ellipse at center, #413B2E 0%, #211F1B 75%);
    background-repeat: no-repeat;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra todo horizontalmente */
    justify-content: flex-start;
    min-height: 100vh;
    padding: 2rem 1rem;
    color: var(--color-principal);
    text-align: center;
}

/* ============================================================
   SECCIÓN 2: INDEX.HTML (Página de Bienvenida)
   ============================================================ */
.encabezado-estado {
  display: flex; flex-direction: column; align-items: center;
  margin-bottom: 2rem; animation: fadeIn 1s ease-out;
}

.logo-estado {
  width: 120px; height: 120px; border-radius: 50%; border: 3px solid var(--color-principal);
  padding: 6px; background-color: #111; object-fit: contain; box-shadow: var(--sombra-dorado);
  margin-bottom: 1rem; animation: floatLogo 4s ease-in-out infinite, glowLogo 2.5s ease-in-out infinite alternate;
}

.nombre-negocio {
  margin: 0; font-size: 3rem; font-weight: bold; color: var(--color-principal);
  text-shadow: 0 0 8px #000, 0 0 12px var(--color-secundario); animation: fadeInUp 1s ease-out; letter-spacing: 2px;
}

.estado {
  margin-top: 0.5rem; font-weight: 600; padding: 8px 20px; border-radius: 24px;
  display: inline-flex; align-items: center; gap: 8px; animation: fadeIn 1.5s ease-out;
  box-shadow: 0 0 12px rgba(0,0,0,0.6); font-size: 1.1rem;
}

.estado.abierto { background-color: var(--color-abierto); color: #000; box-shadow: 0 0 20px var(--color-abierto); }
.estado.cerrado { background-color: var(--color-cerrado); color: #fff; box-shadow: 0 0 20px var(--color-cerrado); }
.estado i { animation: pulseEstado 1.5s infinite alternate; }

.timer {
  margin-top: 0.5rem; font-size: 1rem; background: rgba(0,0,0,0.4); padding: 6px 12px;
  border-radius: 16px; display: inline-block; animation: fadeIn 2s ease-out; color: #fff;
}

.boton-principal {
  background: linear-gradient(90deg, var(--color-principal), var(--color-secundario));
  border: none; border-radius: 50px; padding: 14px 40px; font-size: 1.3rem; font-weight: bold;
  color: #000; box-shadow: var(--sombra-dorado); cursor: pointer; transition: all 0.3s ease;
  animation: fadeInUp 2s ease-out; margin-top: 2rem; min-width: 180px; position: relative; overflow: hidden;
}

.boton-principal::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: rgba(255,255,255,0.2); transform: rotate(45deg); transition: all 0.5s;
}
.boton-principal:hover::before { transform: rotate(45deg) translate(10px, 10px); }
.boton-principal:hover { box-shadow: 0 0 40px var(--color-secundario); transform: scale(1.08); }

.redes { margin-top: 2rem; font-size: 2rem; display: flex; justify-content: center; gap: 28px; }
.redes a { color: var(--color-principal); transition: transform 0.3s ease, color 0.3s ease, text-shadow 0.3s ease; text-shadow: 0 0 6px #000, 0 0 12px var(--color-secundario); }
.redes a:hover { color: var(--color-secundario); transform: scale(1.3) rotate(10deg); text-shadow: 0 0 20px var(--color-secundario); }

.sede { margin-top: 1rem; font-size: 1rem; color: #eee; font-style: italic; text-shadow: 0 0 6px rgba(255, 215, 100, 0.3); }

.texto-discreto { margin-top: 3rem; font-size: 0.75rem; color: #ffffff; opacity: 0.4; text-align: center; }
.texto-discreto a { color: var(--color-principal); text-decoration: underline; opacity: 0.7; }

/* ============================================================
   SECCIÓN 3: CATEGORIAS.HTML (Grid de Selección)
   ============================================================ */
.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  background: transparent; 
  padding: 1rem 0;
  margin-bottom: 1rem;
  position: relative; 
}
.logo {
    width: 80px;
    height: 80px;
    background-color: #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem; 
    padding: 10px;
    box-sizing: border-box;
}
.logo img { max-width: 100%; max-height: 100%; object-fit: contain; }

h1 { margin: 0; font-size: 2.2rem; font-weight: 600; }
.estado {
    display: inline-flex;
    margin: 1rem 0 0.5rem 0; /* Espacio arriba y abajo */
}

#timer {
    display: block; /* Ocupa su propia línea */
    width: 100%;
    color: #a0a0a0;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.subtitulo {
    display: block;
    width: 100%;
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-top: 0.5rem;
}

.categorias-container { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; width: 100%; max-width: 800px; margin: 0 auto; }

.categoria {
  background-color: var(--color-caja); border-radius: 12px; padding: 1rem; text-decoration: none; color: var(--color-texto);
  font-size: 1.1rem; font-weight: 500; height: 120px; cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-size: 75%; background-repeat: no-repeat; background-position: -10% center; display: flex; align-items: center; justify-content: flex-end;
}
.categoria:hover { transform: scale(1.03); box-shadow: 0 4px 20px rgba(0,0,0,0.4); }

#sushi { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('img/tempura-roll.jpg'); }
#banderillas { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('img/banderillas.jpg'); }
#extras { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('https://images.pexels.com/photos/1583884/pexels-photo-1583884.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1'); }
#bebidas { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('img/bebidas.jpeg'); }
#sodas_italianas { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('img/sodas-italianas.png'); }
#smoothies { background-image: linear-gradient(to left, var(--color-caja) 40%, transparent), url('img/smoothies.png'); }

.footer { text-align: center; margin-top: 3rem; }
.social-icons a { color: #a0a0a0; margin: 0 0.75rem; font-size: 1.5rem; text-decoration: none; transition: color 0.2s ease; }
.social-icons a:hover { color: var(--color-principal); }
.qr-code { margin-top: 1.5rem; }
.qr-code img { width: 100px; height: 100px; border-radius: 8px; }
.qr-code p { margin-top: 0.5rem; font-size: 0.8rem; color: #a0a0a0; }

/* ============================================================
   SECCIÓN 4: PRODUCTOS.HTML (Grid de Menú)
   ============================================================ */
header { 
    width: 100%; 
    background-color: transparent; /* Cambiado de #1a1a1a a transparente */
    padding: 1rem 0; 
    box-shadow: none; /* Quitamos la sombra para que no se vea una línea cortada */
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-bottom: none; /* Quitamos el borde para mantener la limpieza visual */
}
.back-button { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--text-color-light); font-size: 1.5rem; text-decoration: none; padding: 5px; transition: color 0.2s ease; }
.back-button:hover { color: var(--accent-yellow); }

header .logo-container { display: flex; align-items: center; justify-content: center; }
header .logo-container .logo-icon { width: 40px; height: 40px; background-color: #000; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 8px; padding: 5px; box-sizing: border-box; }
header .logo-container .logo-icon img { max-width: 100%; max-height: 100%; object-fit: contain; }
header .logo-container .logo-text { font-family: 'Orbitron', sans-serif; font-size: 1.4rem; font-weight: 500; color: var(--accent-yellow); text-transform: uppercase; }

main { width: 100%; max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; box-sizing: border-box; flex-grow: 1; }
h2.section-title { font-size: 1.8rem; font-weight: 700; color: var(--text-color-light); text-align: center; margin-bottom: 2rem; }

.items { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }

.card { background-color: var(--card-bg-color); border-radius: var(--border-radius-card); overflow: hidden; box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3); display: flex; flex-direction: column; transition: transform 0.2s ease, box-shadow 0.2s ease; position: relative; }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5); }
.card img.product-image { width: 100%; height: 180px; object-fit: cover; }
.card-content { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.card .item-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 5px; color: var(--text-color-light); line-height: 1.3; }
.card .description { font-size: 0.9rem; color: var(--text-color-dark); line-height: 1.4; margin-bottom: 10px; flex-grow: 1; }
.card .price { font-size: 1.1rem; font-weight: 700; color: var(--accent-yellow); margin-top: auto; }

.card select, .card input[type="number"] { display: none; background-color: rgba(0, 0, 0, 0.3); color: var(--text-color-light); border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 8px; padding: 0.4rem 0.7rem; margin-top: 10px; font-size: 0.9rem; width: calc(100% - 30px); appearance: none; }
.card input[type="number"] { width: 60px; text-align: center; margin: 10px auto 0; }

.add-to-cart-circle { position: absolute; bottom: 10px; right: 10px; background-color: var(--accent-yellow); color: #000; border-radius: 50%; width: 45px; height: 45px; font-size: 1.5rem; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); transition: background-color 0.2s ease, transform 0.2s ease; }
.add-to-cart-circle:hover { background-color: var(--accent-orange); transform: scale(1.05); }

#cart-icon { position: fixed; bottom: 20px; right: 20px; background-color: var(--accent-yellow); color: #000; padding: 15px; border-radius: 50%; cursor: pointer; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); z-index: 9999; transition: transform 0.2s ease, background-color 0.2s ease; }
#cart-icon:hover { transform: scale(1.1); background-color: var(--accent-orange); }

.volver { margin: 3rem auto; display: block; text-align: center; padding: 12px 30px; background: linear-gradient(90deg, var(--accent-yellow), var(--accent-orange)); color: #000; font-weight: bold; text-decoration: none; border-radius: 30px; max-width: 220px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.2s ease, box-shadow 0.2s ease; }

/* ============================================================
   SECCIÓN 5: RESUMEN Y PEDIDO (Check-out)
   ============================================================ */
.container { background: linear-gradient(145deg, #1f1f1f, #2a2a2a); padding: 40px 35px 45px; border-radius: 16px; max-width: 500px; width: 100%; box-shadow: 0 10px 30px rgba(0,0,0,0.8); transition: box-shadow 0.3s ease, transform 0.3s ease; margin: 0 auto; }
.container:hover { box-shadow: 0 14px 40px rgba(0,0,0,1); transform: translateY(-2px); }

h2 { text-align: center; font-weight: 700; font-size: 2rem; margin-bottom: 36px; color: #ffd700; letter-spacing: 1.2px; text-shadow: 1px 1px 3px rgba(0,0,0,0.5); }
label { display: block; margin-bottom: 10px; font-weight: 600; font-size: 1.05rem; color: #fff3b0; }

input[type="text"], input[type="tel"], textarea { width: 100%; padding: 14px 16px; border-radius: 12px; background-color: #292929; border: 2px solid #444; color: #f9f6f0; font-size: 1.05rem; box-shadow: inset 0 2px 6px rgba(0,0,0,0.6); transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease; resize: vertical; margin-bottom: 20px; }
input:focus, textarea:focus { outline: none; border-color: #ffd700; background-color: #3a3a3a; box-shadow: 0 0 10px #ffd700 inset; }

input[type="submit"], .finalizar-btn { width: 100%; padding: 16px 0; background: linear-gradient(90deg, #ffd700, #e6c200); color: #121212; font-size: 1.2rem; font-weight: 700; border: none; border-radius: 12px; cursor: pointer; box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4); transition: all 0.3s ease; margin-top: 30px; }

.product { background: linear-gradient(145deg, #1e1e1e, #2a2a2a); border-left: 5px solid #ffd700; border-radius: 12px; padding: 15px 20px; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 10px rgba(0,0,0,0.5); transition: transform 0.2s; }
.product:hover { transform: translateY(-2px); }
.product-info { flex-grow: 1; text-align: left; }
.product-name { font-weight: 700; font-size: 1.1rem; color: #ffd700; margin-bottom: 5px; }
.product-description { font-size: 0.9rem; color: #e0d8c1; margin-bottom: 5px; }
.product-price { font-size: 1rem; font-weight: bold; color: #fff3b0; }

.quantity-controls { display: flex; align-items: center; gap: 8px; }
.btn { padding: 6px 12px; border: none; background-color: #ffd700; color: #121212; font-weight: 600; cursor: pointer; border-radius: 6px; transition: all 0.2s; }

#total { font-size: 1.2rem; margin-top: 25px; padding: 15px; background: rgba(255, 215, 0, 0.1); border-left: 5px solid #ffd700; border-radius: 8px; text-align: right; font-weight: 600; color: #ffd700; }

/* ============================================================
   SECCIÓN 6: ANIMACIONES GLOBALES
   ============================================================ */
@keyframes fadeIn { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fadeInUp { 0% { opacity: 0; transform: translateY(25px); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes floatLogo { 0% { transform: translateY(0px); } 50% { transform: translateY(-8px); } 100% { transform: translateY(0px); } }
@keyframes glowLogo { 0% { box-shadow: 0 0 20px #f5c542, 0 0 40px #f5c54250; } 100% { box-shadow: 0 0 35px #ffdd55, 0 0 60px #ffdd5580; } }
@keyframes pulseEstado { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.2); opacity: 1; } }

/* Estilos para el selector de entrega */
.metodo-entrega {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.opcion-entrega {
    flex: 1;
    background: #292929;
    border: 2px solid #444;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    color: #a0a0a0;
}

.opcion-entrega i { font-size: 1.5rem; }

.opcion-entrega.active {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
    color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.2);
}


.btn-secundario {
    background-color: #3a3a3a;
    color: #f5c542;
    border: 1px solid #f5c542;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    margin-bottom: 20px;
    transition: all 0.3s;
}
.btn-secundario:hover {
    background-color: #f5c542;
    color: #000;
}



#confetti-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Crucial para que sigan funcionando los botones */
    z-index: 999;
    overflow: hidden;
}

.confeti {
    position: absolute;
    top: -50px;
    user-select: none;
    pointer-events: none;
    animation: caer linear forwards;
    /* Evita que los iconos se vean muy sólidos, dándoles un toque profesional */
    filter: drop-shadow(0 0 5px rgba(0,0,0,0.2)); 
}

@keyframes caer {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0; /* Empieza invisible */
    }
    10% {
        opacity: 1; /* Aparece rápido al bajar */
    }
    85% {
        opacity: 1; /* Se mantiene visible casi todo el camino */
    }
    100% {
        transform: translateY(110vh) rotate(450deg); /* Rota un poco más */
        opacity: 0; /* Se desvanece suavemente antes de desaparecer */
    }
}


/* Frase Dinámica */
.frase-estilo {
    color: #f5c542;
    font-size: 1.1rem;
    font-style: italic;
    height: 1.5rem;
    transition: opacity 0.5s ease;
    margin-bottom: 10px;
}

/* Slider Infinito */
.slider-contenedor {
    width: 100%;
    overflow: hidden;
    padding: 20px 0;
    background: rgba(0,0,0,0.2);
    margin: 15px 0;
}

.slider-track {
    display: flex;
    width: calc(150px * 8); /* Ajusta según el número de fotos */
    animation: scroll 20s linear infinite;
}

.slider-track img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 15px;
    margin: 0 15px;
    border: 2px solid #f5c542;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc(-150px * 4)); }
}

/* ============================================================
   SECCIÓN 7: RESPONSIVE (Móviles)
   ============================================================ */
@media (max-width: 480px) {
  .nombre-negocio { font-size: 2.2rem; }
  .logo-estado { width: 90px; height: 90px; }
  .redes { font-size: 1.6rem; gap: 18px; }
  .boton-principal { font-size: 1.1rem; padding: 12px 32px; min-width: 140px; }
  .categorias-container { grid-template-columns: 1fr; }
  .categoria { background-position: -15% center; }
  main { padding: 0 1rem; }
  h2.section-title { font-size: 1.5rem; }
  .card .item-name { font-size: 1.1rem; }
  .card .description { font-size: 0.85rem; }
}

@media (min-width: 600px) { .items { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 992px) { .items { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 520px) { body { padding: 30px 15px; } .container { padding: 30px 20px 35px; } h2 { font-size: 1.8rem; } input[type="submit"] { font-size: 1.1rem; padding: 14px 0; } }

