/* ================= VARIABLES CSS ================= */
:root {
    --primary-color: #B590FF;
    --primary-dark: #9A7FE6;
    --primary-light: #D4B8FF;
    --white: #FFFFFF;
    --black: #1A1A1A;
    --gray-light: #F8F9FA;
    --gray-medium: #6C757D;
    --gray-dark: #495057;
    --success: #28A745;
    --error: #DC3545;
    --shadow: 0 4px 20px rgba(181, 144, 255, 0.15);
    --shadow-hover: 0 8px 30px rgba(181, 144, 255, 0.25);
    --border-radius: 16px;
    --border-radius-small: 8px;
}

/* ================= RESET Y ESTILOS BASE ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ================= NAVBAR STICKY SCROLL BEHAVIOR ================= */
.navbar {
    position: fixed;                /* Fija el navbar en la parte superior de la pantalla */
    top: 0;                         /* Lo posiciona en la parte superior */
    left: 0;                        /* Lo posiciona alineado a la izquierda */
    width: 100%;                    /* Ocupa todo el ancho de la ventana */
    height: 70px;                   /* Altura fija del navbar */
    background: transparent;        /* Fondo transparente por defecto */
    transition: background 0.4s ease; /* Transición suave al cambiar el fondo */
    z-index: 1000;                  /* Se asegura de que esté por encima de otros elementos */
    box-shadow: none;               /* Sin sombra por defecto */
    display: flex;                  /* Usa flexbox para alinear los elementos internos */
    align-items: center;            /* Centra verticalmente los elementos dentro del navbar */
}

.navbar.scrolled {
    background: #B590FF !important; /* Cambia el fondo a morado al hacer scroll */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); /* Agrega una sombra sutil al hacer scroll */
}

.navbar.scrolled .order-header-btn {
    opacity: 1 !important;          /* Hace visible el botón de pedido al hacer scroll */
    pointer-events: auto;           /* Permite que el botón sea clickeable */
    z-index: 1001;                  /* Asegura que el botón esté por encima del navbar */
}

/* ================= NAVBAR: CONTENEDOR PRINCIPAL ================= */
.nav-container {
    display: flex; /* Usa flexbox para organizar los elementos hijos en una fila horizontal */
    justify-content: space-between; /* Deja espacio entre los bloques izquierdo, central y derecho */
    align-items: center; /* Centra verticalmente los elementos dentro del navbar */
    width: 100%; /* Ocupa todo el ancho disponible */
    max-width: 1200px; /* Limita el ancho máximo para que no se vea demasiado extendido en pantallas grandes */
    margin: 0 auto; /* Centra el navbar horizontalmente en la página */
    padding: 0 32px; /* Espaciado interno a los lados */
    height: 60px; /* Altura fija del navbar */
    padding-left: 0 !important; /* Por defecto, pegado al borde izquierdo */
}

/* ================= NAVBAR: BLOQUES IZQUIERDA, CENTRO Y DERECHA ================= */
.nav-left, .nav-center, .nav-right {
    display: flex; /* Cada bloque usa flexbox para alinear sus hijos */
    align-items: center; /* Centra verticalmente los elementos dentro de cada bloque */
}

/*
 * Bloque izquierdo: contiene el botón hamburguesa.
 * - flex: 1; hace que ocupe el mismo espacio que los otros bloques.
 * - justify-content: flex-start; alinea el contenido a la izquierda.
 * - margin-left y padding-left ajustan el espaciado respecto al borde.
 */
.nav-left {
    flex: 1; /* Ocupa 1 parte del espacio disponible */
    justify-content: flex-start; /* Alinea el contenido a la izquierda */
    margin-left: 10px !important; /* Espacio desde el borde izquierdo (ajustable) */
    padding-left: 4px !important; /* Espacio adicional desde el borde izquierdo */
}

/*
 * Bloque central: contiene el logo.
 * - flex: 1; ocupa el mismo espacio que los otros bloques.
 * - justify-content: center; centra el logo horizontalmente.
 */
.nav-center {
    flex: 1; /* Ocupa 1 parte del espacio disponible */
    justify-content: center; /* Centra el logo horizontalmente */
    align-items: center; /* Centra verticalmente */
    display: flex; /* Flexbox para centrar */
    text-align: center; /* Centra el texto dentro del logo */
}

/*
 * Bloque derecho: contiene el botón de pedido.
 * - flex: 1; ocupa el mismo espacio que los otros bloques.
 * - justify-content: flex-end; alinea el contenido a la derecha.
 */
.nav-right {
    flex: 1; /* Ocupa 1 parte del espacio disponible */
    justify-content: flex-end; /* Alinea el contenido a la derecha */
}

/* ================= BOTÓN HAMBURGUESA ================= */
.hamburger-btn {
    background: none; /* Sin fondo para que sea transparente */
    border: none; /* Sin borde */
    color: #000; /* Color del icono y texto */
    font-weight: 600; /* Texto en negrita */
    font-size: 1.3rem; /* Tamaño del icono y texto */
    display: flex; /* Flexbox para alinear icono y texto */
    align-items: center; /* Centra verticalmente el icono y el texto */
    gap: 4px; /* Espacio entre el icono y la palabra "Menu" */
    cursor: pointer; /* Cambia el cursor al pasar el mouse */
    padding: 10px 14px; /* Espaciado interno para hacerlo más fácil de pulsar */
    transition: background 0.2s; /* Transición suave al cambiar el fondo (si se usa hover) */
    padding-left: 0 !important; /* Por defecto, pegado al borde izquierdo */
    margin-left: 0; /* Por defecto, pegado al borde izquierdo */
}

.brand-large {
    font-size: 3.8rem;                /* Hace el logo grande */
    letter-spacing: 2px;               /* Espacia las letras del logo */
    text-transform: uppercase;         /* Pone el logo en mayúsculas */
    font-family: 'Agbalumo', cursive !important; /* Usa la fuente especial Agbalumo */
    font-weight: 700;                  /* Negrita para el logo */
    color: #000;                       /* Color negro para el logo */
    background: none !important;       /* Sin fondo */
    border-radius: 0 !important;       /* Sin bordes redondeados */
    padding: 0 !important;             /* Sin padding extra */
    display: block;                    /* Permite centrar con margin auto */
    margin: 0 auto;                    /* Centra el logo horizontalmente */
    text-align: center;                /* Centra el texto dentro del logo */
}

/* 
   Centra y estiliza el logo de la marca en el navbar.
   Este bloque asegura que el texto del logo "TUMBLR" se muestre grande, en minúsculas, con la fuente Agbalumo,
   y perfectamente centrado horizontalmente en la barra de navegación, dándole protagonismo visual y estilo distintivo.
*/
.nav-center .brand {
    font-size: 3rem;
    font-weight: 700;
    color: #000;
    text-transform: lowercase;
    letter-spacing: -1px;
    font-family: 'Agbalumo', cursive !important;
    display: block;
    margin: 0 auto;
    text-align: center;
}

/* ===== BOTÓN HEADER DERECHO ===== */
.order-header-btn {
    opacity: 0; /* Oculto por defecto */
    pointer-events: none; /* No se puede clicar */
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 26px; /* Igual al botón del header */
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem; /* Mismo tamaño de texto */
    cursor: pointer;
    transition: opacity 0.4s cubic-bezier(.4,0,.2,1), background 0.3s, transform 0.3s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none !important;
}

.navbar.scrolled .order-header-btn {
    opacity: 1;
    pointer-events: auto;
    animation: fadeInBtn 0.6s ease;
}

@keyframes fadeInBtn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= HERO SECTION ================= */
.hero {
    position: relative;
    min-height: 500px;        /* Ajusta la altura total (bájala más si quieres) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 80px;         /* Espacio arriba */
    padding-bottom: 80px;      /* Espacio abajo */
    overflow: hidden;
    background: #f8f9fa;       /* Fondo de respaldo si no carga el video */
}

.hero-bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85) saturate(1.1);
    pointer-events: none;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
}

.hero-bg-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.85) saturate(1.1);
    pointer-events: none;
}

.hero-overlay {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.hero-order-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    border: none;
    padding: 10px 26px; /* igual al botón del header */
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem; /* mismo tamaño de texto */
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: unset; /* eliminamos ancho mínimo */
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none !important; /* Quita la línea debajo siempre */
}

.hero-order-btn:hover,
.hero-order-btn:focus,
.hero-order-btn:active,
.hero-order-btn:visited {
    text-decoration: none !important; /* Quita la línea debajo en hover, focus, active y visitado */
}

.hero.scrolled .hero-order-btn {
    display: none;
}
/* Sección contenedora del banner */
.week-banner-section {
    background: #fff;
    padding: 40px 40px 0;  /* Arriba, lados, sin mucho abajo */
    text-align: left;
}

/* El banner en sí mismo (manteniendo tu estilo) */
.week-banner {
    background: #B590FF;         /* Tu color morado */
    color: #000;
    padding: 10px 20px;
    font-size: 1rem;              /* Un poco más grande si quieres */
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: inline-block;
}

/* Título grande de la sección */
.weekly-title-section {
    background: #fff;
    padding: 20px 40px 40px;
    text-align: left;
}

.weekly-title {
    font-size: 3rem;
    font-weight: 900;
    color: #000;
    margin: 0;
}

/* ================= SECCIONES DE GALLETAS ================= */
.cookie-sections {
    background: #fff;
}

.cookie-section {
    padding: 2.5rem 0;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.cookie-section::before {
    content: '';
    position: absolute;
    top: 50%;                        /* Empieza desde la mitad vertical */
    left: 50%;                       /* Centra horizontalmente */
    transform: translate(-50%, -50%);/* Centra en ambos ejes */
    width: 100%;
    max-width: 1300px;
    height: 50%;                     /* Solo la mitad de la altura */
    background: #fff;
    transition: all 0.5s ease;
    z-index: -1;
    border-radius: 40px;
}

.cookie-section.hover-galaxy::before {
    background: #947142; /* Marrón sólido */
}
.cookie-section.hover-pink::before {
    background: #242135; /* negro azulado */
}
.cookie-section.hover-red::before {
    background: #b91c1c; /* Rojo sólido */
}
.cookie-section.hover-blue::before {
    background: #0984e3; /* Azul sólido */
}
.cookie-section.hover-brown::before {
    background: #d2b48c; /* Marrón claro sólido */
}

.cookie-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.cookie-content.reverse {
    direction: rtl;
}
.cookie-content.reverse > * {
    direction: ltr;
}

.cookie-image {
    position: relative;
    box-shadow: none !important;
}
.cookie-image img {
    width: 100%;
    height: auto;           /* Cambia de 400px fijo a auto para que no recorte */
    object-fit: contain;    /* Cambia de 'cover' a 'contain' para mostrar la imagen completa */
    border-radius: 20px;
    box-shadow: none !important;
    transition: transform 0.3s ease;
}
.cookie-image img:hover {
    transform: scale(1.05);
    box-shadow: none !important;
}

.cookie-info {
    padding: 2rem 0;
}
.cookie-info h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #333;
    line-height: 1.2;
}
.cookie-info p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.learn-more-btn {
    background: transparent;
    color: #B590FF;
    border: 2px solid #B590FF;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}
.learn-more-btn:hover {
    background: #B590FF;
    color: #fff;
    transform: scale(1.05);
}

.order-now-btn {
    background: #B590FF;
    color: #fff;
    border: 2px solid #B590FF;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none !important;
}
.order-now-btn:hover {
    background: #9a7ce8;
    border-color: #9a7ce8;
    transform: scale(1.05);
    text-decoration: none !important;
}
/* ================= FOOTER ================= */
.footer {
    background: #333;
    color: #fff;
    padding: 3rem 0 1rem;
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
}
.footer-brand h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #B590FF;
}
.footer-brand p {
    color: #ccc;
    line-height: 1.6;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}
.footer-section h4 {
    color: #B590FF;
    margin-bottom: 1rem;
    font-weight: 600;
}
.footer-section ul {
    list-style: none;
}
.footer-section ul li {
    margin-bottom: 0.5rem;
}
.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-section ul li a:hover {
    color: #B590FF;
}
.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    color: #ccc;
}

/* ================= RESPONSIVE DESIGN ================= */
@media (max-width: 768px) {
    .nav-container {
        padding: 1rem;
    }
    .nav-center .brand {
        font-size: 1.5rem;
    }
    .nav-right .order-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    .hero-logo .brand {
        font-size: 2rem;
        padding: 0.5rem 1.5rem;
    }
    .hero-order-btn {
        font-size: 1.1rem;
        padding: 14px 24px;
        min-width: 160px;
    }
    .week-pill {
        font-size: 0.95rem;
        padding: 8px 16px;
    }
    .hero-bg-video video {
        height: 60vh;
    }
    .hero {
        padding: 100px 20px 40px;
    }
    .cookie-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .cookie-content.reverse {
        direction: ltr;
    }
    .cookie-info h2 {
        font-size: 1.8rem;
    }
    .cookie-info p {
        font-size: 1rem;
    }
    .cookie-buttons {
        justify-content: center;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
@media (max-width: 480px) {
    .nav-container {
        padding: 0.8rem;
    }
    .hamburger-btn span {
        display: none;
    }
    .nav-center .brand {
        font-size: 1.3rem;
    }
    .hero-logo .brand {
        font-size: 1.3rem;
        padding: 0.4rem 1rem;
    }
    .hero-order-btn {
        font-size: 1rem;
        padding: 10px 12px;
        min-width: 120px;
    }
    .week-pill {
        font-size: 0.9rem;
        padding: 6px 10px;
    }
    .hero-bg-video video {
        height: 40vh;
    }
    .cookie-info h2 {
        font-size: 1.5rem;
    }
    .cookie-buttons {
        flex-direction: column;
        align-items: center;
    }
    .learn-more-btn,
    .order-now-btn {
        width: 100%;
        max-width: 200px;
    }
}

/* ================= ANIMACIONES Y EFECTOS ================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.cookie-section {
    animation: fadeInUp 0.8s ease-out;
}

html {
    scroll-behavior: smooth;
}

button:focus,
a:focus {
    outline: 2px solid #B590FF;
    outline-offset: 2px;
}

button {
    position: relative;
    overflow: hidden;
}
.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    transform: scale(0);
    animation: ripple-animation 0.6s linear;
    pointer-events: none;
}
@keyframes ripple-animation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.images-loaded .cookie-section {
    animation: fadeInUp 0.8s ease-out;
}

.cookie-section:hover .cookie-image img {
    transform: scale(1.05);
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

* {
    transition: all 0.3s ease;
}

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #B590FF;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9a7ce8;
}

.hero-logo .brand, .nav-center .brand {
    font-family: 'Agbalumo', cursive !important;
    font-weight: 700;
    text-transform: lowercase;
}

/* ===== MENÚ RESPONSIVE CORREGIDO ===== */
.nav-menu {
    display: none;
    background: #fff;
    width: 100%;
    padding: 20px 0;
    text-align: center;
}

.nav-menu.active {
    display: block;
}

.nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu ul li {
    margin: 10px 0;
}

.nav-menu ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
}

/* ===== RESPONSIVE para el botón de hamburguesa y el logo ===== */
@media (max-width: 768px) {
    .hamburger-btn span {
        display: none; /* Oculta la palabra "Menu" en móvil */
    }
    .hamburger-btn {
        padding: 8px 12px;
        font-size: 1rem;
    }
    .nav-center .brand {
        font-size: 1.8rem;
    }
    .order-header-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* En tablet y móvil, separa el botón del borde */
@media (max-width: 900px) {
    /*
     * En pantallas pequeñas (tablet y móvil):
     * - Separa el bloque izquierdo del borde para que el botón hamburguesa no quede tan pegado.
     * - Separa el botón hamburguesa del borde izquierdo.
     */
    .nav-left {
        padding-left: 10px !important; /* Más espacio desde el borde en móvil/tablet */
    }
    .hamburger-btn {
        margin-left: 4px; /* Más espacio desde el borde en móvil/tablet */
    }
    .cookie-section::before {
        max-width: 95vw;
        height: 60%;
        border-radius: 24px;
    }
}
@media (max-width: 600px) {
    .cookie-section::before {
        max-width: 99vw;
        height: 80%;
        border-radius: 16px;
    }
}

/* ==================== DISEÑO RESPONSIVE PARA PANTALLAS PEQUEÑAS ==================== */
@media (max-width: 768px) {

    /* Ajusta la altura del HERO para que no quede demasiado alto en celulares */
    .hero {
        min-height: 380px;          /* Reduce la altura mínima en móviles */
        padding-top: 60px;          /* Ajusta el espacio superior */
        padding-bottom: 40px;       /* Ajusta el espacio inferior */
        background-position: center;
        background-size: cover;
    }

    /* Ajusta la sección de la semana para eliminar el espacio blanco raro */
    .week-banner-section {
        padding-top: 10px;          /* Espacio arriba reducido */
        padding-bottom: 0;          /* Sin espacio extra abajo */
        margin-top: 0;              /* Elimina cualquier margen innecesario */
    }

    /* (Opcional) Si tuvieras un botón de hamburguesa u otros elementos, puedes seguir añadiendo aquí */
}

/* Redondea el recuadro de la galleta al hacer hover (sin cambiar el color de fondo) */
.cookie-section.hover-galaxy,
.cookie-section.hover-pink,
.cookie-section.hover-red,
.cookie-section.hover-blue,
.cookie-section.hover-brown {
    border-radius: 40px;
    overflow: hidden;
    transition: border-radius 0.4s;
}

/* Cambia el color de los botones al hacer hover en la sección */
.cookie-section.hover-galaxy .learn-more-btn,
.cookie-section.hover-pink .learn-more-btn,
.cookie-section.hover-red .learn-more-btn,
.cookie-section.hover-blue .learn-more-btn,
.cookie-section.hover-brown .learn-more-btn {
    background: #fff;
    color: #000000; /* Puedes ajustar este color según el fondo */
    border-color: #fff;
}

.cookie-section.hover-galaxy .order-now-btn,
.cookie-section.hover-pink .order-now-btn,
.cookie-section.hover-red .order-now-btn,
.cookie-section.hover-blue .order-now-btn,
.cookie-section.hover-brown .order-now-btn {
    background: #fff;
    color: #000000; /* Puedes ajustar este color según el fondo */
    border-color: #fff;
}

/* Opcional: cambia el color del texto para mejor contraste */
.cookie-section.hover-galaxy .cookie-info h2,
.cookie-section.hover-pink .cookie-info h2,
.cookie-section.hover-red .cookie-info h2,
.cookie-section.hover-blue .cookie-info h2,
.cookie-section.hover-brown .cookie-info h2,
.cookie-section.hover-galaxy .cookie-info p,
.cookie-section.hover-pink .cookie-info p,
.cookie-section.hover-red .cookie-info p,
.cookie-section.hover-blue .cookie-info p,
.cookie-section.hover-brown .cookie-info p {
    color: #fff;
}

@media (max-width: 900px) {
    .cookie-section {
        padding: 1.5rem 0;
    }
}
@media (max-width: 600px) {
    .cookie-section {
        padding: 1rem 0;
    }
}

/* ================= SISTEMA DE PEDIDOS (OVERLAY) ================= */
.order-system-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    z-index: 9999;
    display: none;
    overflow-y: auto;
}

.order-system-overlay.active {
    display: block;
}

.close-order-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.close-order-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.back-order-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    color: var(--gray-dark);
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.back-order-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: scale(1.1);
}

.order-screen {
    display: none;
    min-height: 100vh;
    padding: 80px 20px 40px;
    background: var(--primary-color);
}

.order-screen.active {
    display: block;
}

.order-screen-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 2rem;
    background: transparent;
    border-radius: var(--border-radius);
}

.order-screen-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 3rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* ================= PANTALLA 1: OPCIONES DE ENTREGA ================= */
.delivery-options {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.delivery-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.delivery-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.delivery-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.delivery-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.delivery-card p {
    color: var(--gray-medium);
    line-height: 1.5;
}

/* ================= PANTALLA 2: PAQUETES ================= */
.package-options {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

.package-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: var(--shadow);
}

.package-card:hover {
    transform: translateY(-3px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
}

.package-card.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}

.package-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--black);
}

.package-description {
    color: var(--gray-medium);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.package-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* ================= PANTALLA 3: SABORES ================= */
.progress-counter {
    text-align: center;
    background: var(--white);
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.flavors-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.flavor-item {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
}

.flavor-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.flavor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.flavor-info {
    flex: 1;
}

.flavor-info h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--black);
}

.flavor-info p {
    color: var(--gray-medium);
    font-size: 0.9rem;
}

.flavor-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-btn {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.quantity-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: var(--white);
}

.quantity-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.quantity {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    min-width: 30px;
    text-align: center;
}

.order-btn-large, .continue-btn {
    width: 100%;
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.order-btn-large:hover:not(:disabled),
.continue-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    background: var(--white);
    color: var(--primary-color);
}

.order-btn-large:disabled,
.continue-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-light);
    color: var(--gray-medium);
    border-color: var(--gray-medium);
}

/* ================= PANTALLA 4: PAGO ================= */
.order-summary {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.summary-item.total {
    border-top: 2px solid var(--primary-light);
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.tip-buttons {
    display: flex;
    gap: 0.5rem;
}

.tip-btn {
    background: var(--white);
    border: 2px solid var(--gray-medium);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.tip-btn:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
}

.tip-btn.selected {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ========== FORMULARIO DE TARJETA MEJORADO ========== */
.payment-form-header {
    margin-bottom: 1.2rem;
    text-align: center;
}
.payment-form-title {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}
.payment-form-desc {
    font-size: 0.98rem;
    color: var(--gray-medium);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    justify-content: center;
}
.input-icon-row {
    display: flex;
    align-items: center;
    background: var(--gray-light);
    border-radius: var(--border-radius-small);
    border: 2px solid var(--primary-light);
    padding: 0.1rem 0.7rem;
    margin-bottom: 0.2rem;
    transition: border 0.2s;
}
.input-icon-row:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px #b590ff33;
    background: var(--white);
}
.input-icon-row i {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-right: 0.7rem;
}
.payment-form input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 1.1rem;
    color: var(--black);
    width: 100%;
    padding: 0.9rem 0 0.9rem 0;
}
.payment-form-row {
    display: flex;
    gap: 1.2rem;
    margin-top: 0.5rem;
}
.payment-form-col {
    flex: 1;
    display: flex;
    flex-direction: column;
}
@media (max-width: 600px) {
    .payment-form-row {
        flex-direction: column;
        gap: 0.7rem;
    }
    .payment-form input {
        font-size: 1rem;
        padding: 0.8rem 0 0.8rem 0;
    }
    .payment-form-title {
        font-size: 1.05rem;
    }
}

/* ================= RESPONSIVE PARA SISTEMA DE PEDIDOS ================= */
@media (max-width: 768px) {
    .order-screen-container {
        padding: 1rem;
        margin: 0 10px;
    }
    
    .order-screen-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .delivery-card,
    .package-card,
    .flavor-item {
        padding: 1rem;
    }
    
    .flavor-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .flavor-image {
        width: 60px;
        height: 60px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .tip-buttons {
        flex-wrap: wrap;
    }
    
    .close-order-btn,
    .back-order-btn {
        top: 10px;
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .close-order-btn {
        right: 10px;
    }
    
    .back-order-btn {
        left: 10px;
    }
}

@media (max-width: 480px) {
    .order-screen {
        padding: 60px 10px 20px;
    }
    
    .delivery-icon {
        font-size: 2rem;
    }
    
    .delivery-card h3 {
        font-size: 1.2rem;
    }
    
    .order-screen-title {
        font-size: 1.8rem;
    }
    
    .close-order-btn,
    .back-order-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* ================= BOTONES DE NAVEGACIÓN ================= */
.screen-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
}

.back-btn {
    background: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    box-shadow: var(--shadow);
}

.back-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateX(-3px);
}

.back-btn i {
    font-size: 1.1rem;
}

/* Ajustar el título cuando hay botón de atrás */
.screen-header .order-screen-title {
    margin-bottom: 0;
    flex: 1;
    text-align: center;
}

/* ================= RESPONSIVE PARA BOTONES DE NAVEGACIÓN ================= */
@media (max-width: 768px) {
    .screen-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .back-btn {
        align-self: flex-start;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .screen-header .order-screen-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 480px) {
    .back-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .back-btn span {
        display: none; /* Solo mostrar el ícono en móviles muy pequeños */
    }
}

/* Ocultar scrollbar cuando el sistema de pedidos está activo */
.order-system-active {
    overflow: hidden !important;
}

html.order-system-active {
    overflow: hidden !important;
}

.order-btn-xl {
    font-size: 1.5rem;
    padding: 1.7rem 0;
    border-radius: 2.2rem;
    margin-top: 1.2rem;
    letter-spacing: 1px;
}

/* Mejora visual para el input de vencimiento */
#expiry {
    letter-spacing: 2px;
    text-align: left;
}