html {
    background-color: #1A365D; /* El mismo azul de tu header */
}
:root {
    --primary-red: #D32F2F;
    --dark-blue: #1A365D;
    --light-bg: #f4f6f8;
    --card-bg: #ffffff;
    --text-dark: #333333;
    --accent-yellow: #f1c40f;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}
body {
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Mejor soporte para pantallas de celular */
    display: flex; /* NUEVO: Convierte el body en un contenedor flexible */
    flex-direction: column; /* NUEVO: Apila los elementos de arriba hacia abajo */
}
/* NUEVO: Técnica moderna para fondo fijo sin saltos en móviles/tablets */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Usa la altura completa de la ventana */
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('imagenes/letrero\ ia.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    z-index: -1; /* Lo manda al fondo, detrás de todo el contenido */
    will-change: transform; /* Optimización para que el navegador lo renderice mejor */
}
#main-content {
    flex-grow: 1;
}
/* =========================================
   HEADER & LOGO
   ========================================= */
.main-header {
    background-color: var(--primary-red);
    color: white;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}
.logo-image {
    max-height: 140px;
    width: auto;
    display: block;
    opacity: 0; 
    animation: logoPop 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.header-text {
    opacity: 0;
    animation: textoEntrada 0.8s ease-out 0.3s forwards; 
}
.header-text h1 {
    font-size: 2.2rem;
    letter-spacing: 1px;
    margin-bottom: -5px;
}
.header-text p {
    font-size: 1rem;
    font-weight: 300;
}
@keyframes logoPop {
    0% {
        opacity: 0;
        transform: scale(0.3) rotate(-15deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}
@keyframes textoEntrada {
    0% {
        opacity: 0;
        transform: translateX(30px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}
/* =========================================
   NAVBAR
   ========================================= */
.main-nav {
    background-color: var(--dark-blue);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    padding: 15px 20px;
    flex-wrap: wrap;
    gap: 20px;
}
.main-nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}
.main-nav ul li a:hover {
    color: var(--accent-yellow);
}
.main-nav ul li a.active {
    color: var(--accent-yellow);
    padding-bottom: 5px;
}
/* =========================================
   LAYOUT & COMPONENTES GLOBALES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 40px auto;
    display: grid;
    grid-template-columns: 2fr 1fr; 
    gap: 30px;
    padding: 0 20px;
}
/* NUEVA CLASE: Para secciones de ancho completo como las Promos */
.container.ancho-completo {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative; 
}
.card:hover {
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
}
.btn-principal {
    display: inline-block;
    padding: 12px 25px;
    background-color: var(--primary-red);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}
.btn-principal:hover {
    background-color: #b71c1c;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}
/* =========================================
   campo-domicilio
   ========================================= */
/* Contenedor principal (oculto por defecto) */
.contenedor-domicilio {
    display: none;
}
/* Alerta de tiempo estimado */
.alerta-tiempo {
    background-color: #fff3cd;
    color: #856404;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 12px;
    border: 1px solid #ffeeba;
    display: flex;
    align-items: center;
    gap: 8px;
}
.icono-alerta {
    font-size: 1.2rem;
}
/* Títulos y textos informativos */
.titulo-seccion {
    font-size: 0.85rem;
    margin-bottom: 5px;
    font-weight: 600;
    color: white;
}
.mensaje-cobertura {
    font-size: 0.65rem;
    margin-top: 5px;
    margin-bottom: 5px;
    font-weight: 600;
    text-align: center;
    display: none;
}
/* Botón de GPS */
.btn-gps {
    margin-top: 4px;
    margin-bottom: 4px;
    background-color: goldenrod;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    width: 100%;
    transition: opacity 0.2s;
}
.btn-gps:hover {
    opacity: 0.9;
}
/* Grupo de entrada de teléfono */
.input-grupo-tel {
    display: flex;
    align-items: stretch; /* Estira ambos elementos para que midan lo mismo */
    gap: 5px;
    margin: top 0;
}
/* Estilo para el cuadro del +56 */
.prefijo-tel {
    background-color: #eee;
    padding: 6px 10px; /* Ajustado para que coincida con el input */
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
    height: 43px;
    display: flex;
    align-items: center; /* Centra el texto "+56" verticalmente */
    white-space: nowrap;
}
/* Ajustes generales de inputs dentro de este contenedor */
.input-carrito {
    margin-bottom: 0;
    /* Aquí puedes agregar más estilos compartidos para tus inputs */
}
/* =========================================
   FOOTER & REDES SOCIALES
   ========================================= */
footer {
    background-color: var(--dark-blue);
    color: white;
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}
.footer-links {
    margin-top: 10px;
}
.footer-links a {
    color: var(--accent-yellow);
    text-decoration: none;
    margin: 0 10px;
}
.footer-links a:hover {
    text-decoration: underline;
}
.footer-socials {
    display: flex;
    justify-content: center; /* Centra los iconos horizontalmente */
    align-items: center;     /* Los alinea verticalmente */
    gap: 25px;               /* Define la separación entre cada icono */
    flex-wrap: wrap;         /* Permite que bajen de línea si la pantalla es muy pequeña */
}
.social-link img {
    width: 35px;             /* Ajusta el tamaño de los iconos a tu gusto */
    height: auto;
    transition: transform 0.3s ease;
}
/* Efecto al pasar el mouse */
.social-link:hover img {
  transform: scale(1.2);   /* Crece un poquito */
  filter: brightness(1.2); /* Se ilumina un poco */
}
/* Elimina cualquier subrayado que el footer ponga por defecto */
.social-link {
  text-decoration: none;
}
/* =========================================
   SIDEBAR DERECHO (Separación de Tarjetas)
   ========================================= */
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 25px; /* Esta es la magia que separa los cuadros */
    align-self: flex-start; /* Evita que las tarjetas se estiren intentando igualar la altura de la historia */
}
/* Ajustes internos para las tarjetas de la derecha para que no queden gigantes */
.sidebar-right .card {
    padding: 20px 25px;
    width: 100%;
}
/* =========================================
   LOGO ESQUINA INFERIOR DERECHA WHATSAPP
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 10px;       /* Distancia desde abajo */
    right: 10px;        /* Distancia desde la derecha */
    background-color: #2c3e50;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;      /* Asegura que esté por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1); /* Se agranda un poquito al pasar el mouse */
    background-color: #2c3e50;
}
.whatsapp-float img {
    width: 55px;
    height: 55px;
}
/* =========================================
   CARRITO DE COMPRAS
   ========================================= */
.cart-float {
    position: fixed;
    width: 65px;
    height: 65px;
    bottom: 85px; /* Arriba del botón de WhatsApp */
    right: 10px;
    background-color: var(--primary-red);
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.cart-float:hover {
    transform: scale(1.1);
}
.cart-badge {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--accent-yellow);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cart-panel {
    position: fixed;
    top: 0;
    right: -350px; /* Oculto por defecto */
    width: 100%;      /* Adaptable en móviles */
    max-width: 350px; /* Tope máximo para PC */
    height: 100%;     /* Fallback para navegadores antiguos */
    height: 100dvh;   /* SOLUCIÓN MÓVIL: Altura dinámica que respeta la barra del navegador */
    background-color: var(--card-bg);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 2000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}
.cart-panel.abierto {
    right: 0;
}
.cart-header {
    background-color: var(--dark-blue);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.btn-cerrar-carrito {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}
.cart-items {
    flex-grow: 1; /* Ocupa todo el espacio disponible */
    overflow-y: auto; /* Genera el scroll interno */
    padding: 20px;
    padding-bottom: 30px; /* Espacio extra para que el último ingrediente no quede pegado al botón */
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}
.btn-eliminar {
    background-color: #ff4d4d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    cursor: pointer;
}
.cart-footer {
    padding: 15px 20px 25px 20px; /* Más espacio inferior para el pulgar */
    border-top: 1px solid #eee;
    background-color: var(--dark-blue); /* Fondo blanco para que no se transparente nada */
    position: sticky;
    bottom: 0;
    z-index: 10;
}
.cart-total {
    color: white;
}
.w-100 {
    width: 100%;
    text-align: center;
    margin-top: 10px;
}
/* =========================================
   ESTILOS PANEL DE PERSONALIZACIÓN
   ========================================= */
.opciones-grupo {
    margin-bottom: 15px;
    text-align: left;
}
.opciones-grupo h3 {
    font-size: 1rem;
    color: var(--dark-blue);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* =========================================
   ESTILOS PANEL DE PERSONALIZACIÓN
   ========================================= */
.opciones-grupo {
    margin-bottom: 15px;
    text-align: left;
}
.opciones-grupo h3 {
    font-size: 1rem;
    color: var(--dark-blue);
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
/* 1. Reducimos el margen inferior del label de 8px a 4px */
.opciones-grupo label {
    display: block;
    margin-bottom: 4px; 
    font-size: 0.9rem;
    color: var(--text-dark);
    cursor: pointer;
}
/* 2. MAGIA: Ocultamos los saltos de línea <br> para evitar el doble espacio */
.opciones-grupo br {
    display: none;
}
.opciones-grupo input[type="radio"], 
.opciones-grupo input[type="checkbox"] {
    margin-right: 8px;
    accent-color: var(--primary-red);
}
.requerido {
    background-color: #eee;
    color: #666;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: normal;
}
.divisor {
    border: 0;
    height: 1px;
    background-color: #eaeaea;
    margin: 15px 0;
}
/* =========================================
   NUEVO BOTÓN DE CANTIDAD Y AÑADIR (MODAL)
   ========================================= */
.add-to-cart-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    margin-top: 5px;
}
.quantity-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    background: transparent;
    font-weight: 600;
    font-size: 1.1rem;
    color: white
}
.btn-qty {
    background: transparent;
    border: 2px solid #ffffff; /* Borde gris clarito como en tu foto */
    border-radius: 50%; /* Círculo perfecto */
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    color: #ffffff;
    transition: all 0.2s ease;
}
.btn-qty:hover {
    border-color: var(--primary-red);
    color: var(--primary-red);
}
.btn-add-modal {
    flex-grow: 1; /* Ocupa el resto del espacio disponible */
    display: flex;
    justify-content: space-between; /* Texto "Añadir" a la izq, "Precio" a la der */
    align-items: center;
    padding: 12px 20px;
    background-color: var(--primary-red);
    color: white;
    border: none;
    border-radius: 30px; /* Formato píldora redondeada */
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.btn-add-modal:hover {
    background-color: #b71c1c;
    transform: translateY(-2px);
}
/* =========================================
   NUEVOS ESTILOS PARA INPUTS DEL CARRITO
   ========================================= */
.input-carrito {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}
.input-carrito:focus {
    border-color: var(--primary-red);
}
/* =========================================
   BOTÓN VACIAR CARRITO (Mejorado)
   ========================================= */
.btn-vaciar-todo {
    background-color: rgba(255, 77, 77, 0.15); /* Fondo rojo transparente y suave */
    border: 1px solid rgba(255, 77, 77, 0.3); /* Borde sutil */
    color: #ffcccc; /* Texto en un tono rojizo claro/pastel */
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none; /* Adiós a la línea fea de abajo */
    padding: 6px 14px; /* Espacio interno para que respire */
    border-radius: 20px; /* Bordes totalmente redondeados (tipo píldora) */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px; /* Separación entre el basurero y el texto */
    margin-left: 10px;
}
.btn-vaciar-todo:hover {
    background-color: #ff4d4d; /* Se vuelve rojo intenso al pasar el mouse */
    color: #ffffff; /* El texto se vuelve blanco brillante */
    border-color: #ff4d4d;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.4); /* Pequeño resplandor */
    transform: translateY(-1px); /* Se levanta un poquito */
}
/* =========================================
   IMAGEN EN MODAL PERSONALIZACIÓN (CON ZOOM)
   ========================================= */
.imagen-modal-container {
    text-align: center;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 400px; /* Hacemos el espacio un poco más grande */
    /* ESTO ES CLAVE: Mantiene los bordes redondeados y corta lo que sobra del zoom */
    border-radius: 5px;
    overflow: hidden; 
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}
.imagen-pizza-modal {
    width: 100%;
    height: auto;
    display: none;
    object-fit: cover;
}
/* =========================================
   ALINEACIÓN DE PRECIOS A LA DERECHA
   ========================================= */
/* Convertimos la etiqueta en un contenedor flex */
.opciones-grupo label {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 10px; /* Separación cómoda entre líneas */
    cursor: pointer;
}
/* Ocultamos los saltos de línea (br) que usabas antes para no romper la grilla */
.opciones-grupo label br {
    display: none;
}
/* El span principal (que tiene el texto y el precio) tomará el 100% del espacio sobrante */
.opciones-grupo label > span {
    display: flex;
    justify-content: space-between; /* Esto empuja el precio a la derecha */
    width: 100%;
    margin-left: 10px; /* Separación entre el circulito/cuadrado y el texto */
}
/* Opcional: Le damos un estilo bonito al precio para que destaque */
.precio-derecha {
    font-weight: 600;
    color: var(--primary-red); /* Usa el rojo de tu tema, o cámbialo si prefieres */
}
/* =========================================
   CORRECCIÓN DEFINITIVA DE PRECIOS EXTRAS
   ========================================= */
/* Le decimos a la etiqueta del precio que ignore la regla de los tamaños */
.opciones-grupo label .precio-extra-label {
    display: inline-block !important; /* Anula el comportamiento que lo estiraba */
    width: auto !important;           /* Le quitamos el 100% de ancho */
    margin-left: auto !important;     /* ¡Esto es lo que lo empuja a la derecha! */
    font-weight: 600;
    color: var(--primary-red);
}
/* Aseguramos de que el contenedor siga siendo flexible */
.opciones-grupo label {
    display: flex;
    align-items: center;
    width: 100%;
}
/* Animación que crea el efecto de acercamiento suave al abrir */
@keyframes acercarPizza {
    0% {
        transform: scale(1); /* Tamaño original */
    }
    100% {
        transform: scale(1.18); /* Zoom del 18% para que se vea bien de cerca */
    }
}
/* =========================================
   RESPONSIVIDAD MÓVIL (Unificada y Mejorada)
   ========================================= */
/* Para Tablets y pantallas medianas (hasta 850px) */
@media (max-width: 850px) {
    .container {
        grid-template-columns: 1fr;
    }
    .container.ancho-completo {
        width: 100% !important; /* El !important asegura que gane a otras reglas */
        max-width: 100% !important;
        padding-left: 1px !important;  /* Un mínimo para que no toquen el borde físico */
        padding-right: 1px !important;
        margin: 0;
        margin-top: 20px;
    }
    .header-text h1 {
        font-size: 1.8rem;
    }
    .main-nav {
        position: sticky;
        top: 0;
        width: 100%;
        -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
        mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    }
    .main-nav ul {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding: 15px 25px; 
        gap: 25px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; 
    }
    .main-nav ul::-webkit-scrollbar {
        display: none; 
    }
    .main-nav ul li {
        flex: 0 0 auto;
    }  
    /* Achicamos un poco el logo para que no choque en tablets */
    .logo-image {
        max-height: 110px;
    }
}
/* Para Celulares (hasta 600px) - Logo a la izquierda */
@media (max-width: 600px) {
    .main-header {
        padding: 5px 15px; 
    }
    .logo-container {
        display: flex;
        flex-direction: row; /* Mantiene el logo a la izquierda y el texto a la derecha */
        align-items: center; /* Los alinea verticalmente */
        justify-content: center; /* Centra todo el bloque en la cabecera */
        gap: 1px; /* Espacio entre el logo y las letras */
    } 
    .logo-image {
        max-height: 120px; /* Logo más pequeño para que quepa en la misma línea */
        width: auto;
        flex-shrink: 0; /* Evita que el logo se aplaste si el texto es largo */
    }
    .header-text {
        text-align: left; /* Asegura que el texto se alinee a la izquierda junto al logo */
    }
    .header-text h1 {
        font-size: 1.3rem; /* Tamaño de letra reducido para evitar que se desborde */
        margin-bottom: 0;
        line-height: 1.2;
    }
    .header-text p {
        font-size: 0.8rem; /* Subtítulo más pequeño */
    }
@media (max-width: 600px) {
    /* ... otros códigos que ya tengas de logos o nav ... */
    .cart-panel {
        width: 100% !important;
        right: -100%;
        max-width: none;
        height: 100dvh; /* Asegura que ocupe el alto dinámico */
        background-color: white !important; /* Azul sólido, sin transparencias */
    }
    .cart-panel.active {
        right: 0;               /* Cubre toda la pantalla al abrirse */
    }
    /* Ajuste para que el footer no se mueva en la pantalla completa */
    .cart-footer {
        position: sticky;
        bottom: 0;
        background: var(--dark-blue);
        padding-bottom: 30px; /* Espacio extra para el área de gestos del iPhone/Android */
    }
}
}




