/* CSS Reset & Variables */
:root {
    /* 
       Colores extraídos de Colores.png
    */
    --color-terracota: #BC5D2E;
    /* Borde / Horno */
    --color-crema: #F4EBD9;
    /* Fondo / Masa */
    --color-marron: #4A3B32;
    /* Texto / Detalles */
    --color-verde: #6B7F49;
    /* Acentos / Frescura */

    /* Mapeo Semántico */
    --primary-color: var(--color-terracota);
    --secondary-color: var(--color-verde);
    --accent-color: var(--color-verde);
    --background-color: var(--color-crema);
    --text-color: var(--color-marron);

    /* 
       Tipografías extraídas de Tipografias.png 
    */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Glassmorphism adjustment for the new warm background */
    --glass-bg: rgba(255, 255, 255, 0.4);
    --glass-border: rgba(255, 255, 255, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--background-color);
    /* Doodles rústicos generados integrados en el fondo con baja opacidad */
    background-image: url('bg-doodles.png');
    background-size: 600px;
    background-attachment: fixed;
    background-repeat: repeat;
    color: var(--text-color);
    line-height: 1.6;
}

/* Creamos un overlay pálido para que los doodles no interfieran con la lectura, solo se perciban como marca de agua en las esquinas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(244, 235, 217, 0.88);
    /* Color crema difuminado */
    z-index: -1;
    pointer-events: none;
}

/* Header */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.brand-logo {
    height: 90px;
    /* Ajustar según sea necesario */
    object-fit: contain;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--secondary-color);
}

/* Hero Section */
.hero-section {
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    position: relative;
    background-size: cover;
    background-position: center;
    background-color: var(--color-marron);
    /* Fondo estático de la imagen local con un filtro de oscurecimiento */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.7)), url('Gemini_Generated_Image_kjwhqckjwhqckjwh.png');
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 3.8rem;
    margin-bottom: 1rem;
    color: white;
    /* Resalta fuertemente sobre el fondo oscuro de las fotos */
    text-shadow:
        1px 1px 0px rgba(0, 0, 0, 0.5),
        3px 3px 5px rgba(0, 0, 0, 0.6),
        0 10px 20px rgba(0, 0, 0, 0.8);
}

.hero-content p {
    color: #fcebc4;
    /* Un tomo crema claro que combina con la paleta */
    font-size: 1.4rem;
    /* Un poco más grande para mejor lectura */
    font-weight: bold;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.highlight {
    color: var(--secondary-color);
}

.cta-button {
    display: inline-block;
    margin-top: 2rem;
    padding: 1rem 3rem;
    /* Slightly larger */
    background: linear-gradient(145deg, #7c9454, #607242);
    /* bevel gradient */
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    /* High Relief Button Shadow */
    box-shadow:
        5px 5px 10px rgba(74, 59, 50, 0.2),
        -5px -5px 10px rgba(255, 255, 255, 0.8),
        inset 1px 1px 0 rgba(255, 255, 255, 0.3);
    /* Top edge highlight */
    transition: all 0.2s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow:
        8px 8px 15px rgba(74, 59, 50, 0.25),
        -8px -8px 15px rgba(255, 255, 255, 0.9),
        inset 1px 1px 0 rgba(255, 255, 255, 0.4);
}

.cta-button:active {
    transform: translateY(1px);
    box-shadow:
        inset 5px 5px 10px rgba(45, 60, 30, 0.3),
        inset -5px -5px 10px rgba(255, 255, 255, 0.2);
    background: linear-gradient(145deg, #607242, #7c9454);
    /* Inverted gradient */
    border-color: rgba(0, 0, 0, 0.05);
}

/* Sections */
section {
    padding: 4rem 5%;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.85);
    /* Un poco más blanco para leer bien sobre los doodles */
    backdrop-filter: blur(10px);
    border: 1px solid rgba(188, 93, 46, 0.15);
    /* Bordes terracota tenues para atar el diseño */
    border-radius: 20px;
    margin: 2rem 5%;
    padding: 3rem;
    box-shadow: 0 8px 32px 0 rgba(74, 59, 50, 0.08);
    /* Sombra parduzca */
    position: relative;
    /* Para aislar contenidos del doodle de fondo */
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

@media (min-width: 768px) {
    .about-content {
        flex-direction: row;
        text-align: left;
    }

    .about-text {
        flex: 1;
    }

    .about-image {
        flex: 1;
        display: flex;
        justify-content: center;
    }
}

.feature-image {
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
    max-height: 300px;
}

/* Branding Preview (For User Verification) */
.color-palette {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.color-box {
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 0.8rem;
    text-align: center;
    border-radius: 10px;
}

.primary {
    background-color: var(--primary-color);
}

.secondary {
    background-color: var(--secondary-color);
}

.accent {
    background-color: var(--accent-color);
    color: #333;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.menu-item {
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
}

.menu-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.menu-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.menu-item.active .menu-image-container {
    transform: scale(1.05);
}

.menu-item.active .menu-image {
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.65)) sepia(0.25) saturate(1.25) contrast(1.1) brightness(0.6) blur(2px);
    /* Se pausará la animación al tocar (opcional, pero puede quedar bien para leer "saber más") */
    animation-play-state: paused;
}

.menu-image-container {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 1rem;
    background-image: url('fondo-pizza-presentacion.png');
    /* Fondo rústico dinámico */
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
    /* Sombrita interna para mezclar bien los bordes de la mesa */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.menu-image {
    width: 90%;
    /* Dejamos un borde para que se vea la mesa de madera */
    height: 90%;
    object-fit: contain;
    /* Para que la pizza no se corte */
    margin-bottom: 0;
    /* FILTROS INTELIGENTES: Estos filtros se aplican solo a la pizza (sin afectar la mesa atrás).
       1. drop-shadow: Crea una sombra realista bajo los bordes de la pizza cortada.
       2. sepia/saturate/contrast/brightness: Corrige temperatura y luz para que parezca tomada sobre esa misma mesa cálida. */
    filter: drop-shadow(0 15px 15px rgba(0, 0, 0, 0.65)) sepia(0.25) saturate(1.25) contrast(1.1) brightness(0.95);
    transition: filter 0.4s ease;
    /* Evitar que el transition machaque el transform del keyframe */
    animation: giro-pizza 35s linear infinite;
    /* Rota constante como en exhibición */
}

@keyframes giro-pizza {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.menu-item h3 {
    font-family: var(--font-heading);
    color: var(--color-terracota);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

/* Menu Actions Overlay */
.menu-actions {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.menu-item.active .menu-actions {
    opacity: 1;
    pointer-events: all;
}

.menu-actions button {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: var(--font-body);
    font-size: 1rem;
    width: 80%;
    max-width: 200px;
}

.btn-ordenar {
    background-color: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-ordenar:hover {
    transform: scale(1.05);
    background-color: #556b3e;
    /* Darker green */
}

.btn-saber-mas {
    background-color: var(--color-crema);
    color: var(--color-marron);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-saber-mas:hover {
    transform: scale(1.05);
    background-color: white;
}

/* Footer */
.main-footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--color-marron);
    /* Usando la variable semántica correcta */
    color: var(--color-crema);
    margin-top: auto;
}

/* Pizza Builder Styles */
.builder-section {
    padding-bottom: 4rem;
}

.builder-section h2 {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--color-terracota);
    margin-bottom: 0.5rem;
}

.builder-section p {
    text-align: center;
    margin-bottom: 2rem;
}

.pizza-builder-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .pizza-builder-container {
        flex-direction: row;
        justify-content: space-around;
        align-items: flex-start;
    }
}

.controls {
    flex: 1;
    background: rgba(255, 255, 255, 0.5);
    padding: 2rem;
    border-radius: 15px;
}

.controls h3 {
    font-family: var(--font-heading);
    color: var(--color-marron);
    margin-bottom: 1rem;
    margin-top: 1.5rem;
    border-bottom: 2px solid var(--color-terracota);
    display: inline-block;
}

.controls h3:first-child {
    margin-top: 0;
}

.ingredient-group {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.control-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: bold;
    color: var(--color-marron);
}

.control-item input {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--color-terracota);
}

/* Pizza Preview */
.preview-area {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
}

.pizza-plate {
    width: 350px;
    height: 350px;
    background: #6F4E37;
    /* Coffee/Brown color */
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.pizza-base {
    width: 320px;
    height: 320px;
    background: #e6c280;
    /* Realistic dough base and baked crust gradient */
    background-image: radial-gradient(circle, transparent 72%, #d28c46 88%, #6a3005 100%);
    border-radius: 50%;
    position: relative;
    overflow: hidden;
    /* Inner shadow for crust depth, outer for elevation */
    box-shadow:
        inset 0 0 12px rgba(106, 48, 5, 0.6),
        inset 0 0 30px rgba(0, 0, 0, 0.3),
        0 8px 15px rgba(0, 0, 0, 0.4);
    border: 2px solid #6a3005;
    transition: transform 0.3s ease;
}

/* Shadow over the ingredients to simulate raised crust */
.pizza-base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.5);
    z-index: 100;
    pointer-events: none;
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    pointer-events: none;
}

.layer.visible {
    opacity: 1;
    transform: scale(1);
    animation: bounceIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3) translateY(-20px);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Ingredients Visuals */

/* Ingredients Visuals */

/* Salsa */
.layer-salsa {
    background: #c0392b;
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
}

/* Queso Mozzarella */
.layer-queso {
    background-image: url('queso mozarella.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 92%;
    height: 92%;
    top: 4%;
    left: 4%;
    z-index: 2;
    /* Sobre la salsa */
}

.layer.visible.layer-queso {
    opacity: 0.95;
}

/* Queso Cheddar */
.layer-cheddar {
    background-image: url('queso chedar.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    width: 92%;
    height: 92%;
    top: 4%;
    left: 4%;
    z-index: 3;
    /* Sobre la mozzarella */
    rotate: 115deg;
    scale: -1 1;
    /* Voltea horizontalmente para un look más único */
}

/* Borde de Queso Realista */
.layer-borde-queso {
    background: url('borde_queso_realista.png') center no-repeat;
    /* Redimensionamos la imagen un poco para asegurarnos de recortar el fondo falso cuadrado */
    background-size: 155%;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    box-sizing: border-box;
    z-index: 20;
    /* Forzamos el anillo, un rango mucho más ajustado para que solo se vea el queso */
    -webkit-mask-image: radial-gradient(circle closest-side, transparent 86%, black 89%, black 95%, transparent 97%);
    mask-image: radial-gradient(circle closest-side, transparent 86%, black 89%, black 95%, transparent 97%);
    /* Opcional: filtro para ajustar luz o intensidad del queso */
    filter: contrast(1.1) brightness(1.05) saturate(1.3) drop-shadow(0 0 5px rgba(0, 0, 0, 0.6));
}

/* Sombra extra por encima del borde de queso para hundirlo en la masa */
.layer-borde-queso::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: inset 0 0 10px rgba(106, 48, 5, 0.7);
    pointer-events: none;
}

/* Peperoni */
.layer-peperoni {
    background-image:
        url('peperoni.png'), url('peperoni.png'), url('peperoni.png'),
        url('peperoni.png'), url('peperoni.png'), url('peperoni.png'),
        url('peperoni.png'), url('peperoni.png'), url('peperoni.png');
    background-size: 65px;
    background-repeat: no-repeat;
    /* Peperoni en círculo externo + uno al centro */
    background-position:
        50% 12%, 77% 23%, 88% 50%,
        77% 77%, 50% 88%, 23% 77%,
        12% 50%, 23% 23%, 50% 50%;
    z-index: 5;
}

/* Chorizo */
.layer-chorizo {
    background-image:
        url('Chorizo.png'), url('Chorizo.png'), url('Chorizo.png'),
        url('Chorizo.png'), url('Chorizo.png');
    background-size: 55px, 60px, 52px, 58px, 54px;
    background-repeat: no-repeat;
    /* Distribuidos en un patrón ligeramente rotado respecto al jamón */
    background-position:
        40% 15%, 85% 60%, 60% 85%,
        15% 40%, 60% 40%;
    z-index: 6;
}

.layer.visible.layer-chorizo {
    opacity: 0.9;
}

/* Jamón */
.layer-jamon {
    background-image:
        url('jamon.png'), url('jamon.png'), url('jamon.png'),
        url('jamon.png'), url('jamon.png');
    background-size: 50px, 55px, 48px, 52px, 54px;
    background-repeat: no-repeat;
    /* Jamón en un arreglo de cruz diagonal */
    background-position:
        25% 25%, 75% 75%, 25% 75%,
        75% 25%, 65% 50%;
    z-index: 4;
}

.layer.visible.layer-jamon {
    opacity: 0.9;
}

/* Tocino */
.layer-tocino {
    background-image:
        url('tocino.png'), url('tocino.png'), url('tocino.png'),
        url('tocino.png'), url('tocino.png');
    background-size: 80px, 85px, 75px, 82px, 78px;
    background-repeat: no-repeat;
    /* Tocino llenando los huecos medios-externos en estrella */
    background-position:
        30% 15%, 85% 30%, 50% 85%,
        15% 60%, 35% 55%;
    z-index: 7;
}

.layer.visible.layer-tocino {
    opacity: 0.9;
}



/* Champiñones */
.layer-champinones {
    background-image:
        url('champinones.png'), url('champinones.png'), url('champinones.png'), url('champinones.png'),
        url('champinones.png'), url('champinones.png'), url('champinones.png'), url('champinones.png'),
        url('champinones.png'), url('champinones.png'), url('champinones.png'), url('champinones.png'),
        url('champinones.png'), url('champinones.png'), url('champinones.png'), url('champinones.png');
    /* Champiñones más pequeños */
    background-size:
        32px, 28px, 35px, 30px,
        38px, 33px, 34px, 36px,
        31px, 29px, 37px, 32px,
        35px, 28px, 34px, 30px;
    background-repeat: no-repeat;
    /* Distribución esparcida en espacios vacíos entre el resto de ingredientes */
    background-position:
        50% 25%, 25% 50%, 75% 50%, 50% 75%,
        35% 25%, 65% 25%, 25% 35%, 75% 35%,
        25% 65%, 75% 65%, 35% 75%, 65% 75%,
        42% 42%, 58% 58%, 42% 58%, 58% 42%;
    z-index: 8;
}

/* Tomate */
.layer-tomate {
    background-image:
        url('tomate.png'), url('tomate.png'), url('tomate.png'),
        url('tomate.png'), url('tomate.png'), url('tomate.png'),
        url('tomate.png'), url('tomate.png');
    /* Rodajas más pequeñas, entre 40px y 60px */
    background-size:
        45px, 55px, 50px,
        48px, 60px, 42px,
        52px, 46px;
    background-repeat: no-repeat;
    /* Distribución aleatoria pero equilibrada, esquivando el peperoni externo */
    background-position:
        35% 15%, 85% 35%, 85% 65%,
        65% 85%, 35% 85%, 15% 65%,
        15% 35%, 65% 15%;
    z-index: 9;
}

/* Albahaca - Green specks */
/* Albahaca */
.layer-albaca {
    background-image:
        url('albahaca.png'),
        url('albahaca.png'),
        url('albahaca.png'),
        url('albahaca.png'),
        url('albahaca.png'),
        url('albahaca.png');
    background-size: 55px, 60px, 50px, 65px, 58px, 52px;
    background-repeat: no-repeat;
    /* Ubicadas armoniosamente como broche final */
    background-position:
        35% 40%,
        65% 40%,
        40% 65%,
        60% 65%,
        20% 20%,
        80% 80%;
    z-index: 10;
}

/* Orégano - Fine noise */
/* Orégano */
.layer-oregano {
    /* Mantenemos el orégano más al centro de la pizza, alejándolo de los bordes */
    width: 76%;
    height: 76%;
    top: 12%;
    left: 12%;

    /* 70 piececitos de orégano */
    background-image:
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'),
        url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png'), url('oregano.png');

    /* Tamaño mucho más pequeño para el orégano (entre 4px y 7px) */
    background-size:
        4px, 6px, 5px, 4px, 6px, 5px, 4px, 6px, 5px, 4px,
        5px, 4px, 6px, 5px, 6px, 5px, 4px, 5px, 6px, 5px,
        5px, 4px, 5px, 4px, 6px, 5px, 6px, 4px, 4px, 5px,
        4px, 6px, 5px, 6px, 4px, 5px, 6px, 5px, 4px, 6px,
        5px, 6px, 4px, 5px, 6px, 4px, 5px, 6px, 5px, 4px,
        6px, 5px, 4px, 5px, 6px, 4px, 5px, 6px, 4px, 5px,
        4px, 5px, 6px, 5px, 4px, 5px, 6px, 4px, 5px, 6px;

    background-repeat: no-repeat;

    /* Distribución aleatoria dentro del área del 76% central */
    background-position:
        12% 18%, 85% 14%, 44% 52%, 22% 78%, 76% 83%, 31% 29%, 68% 21%, 19% 59%, 91% 47%, 9% 38%,
        5% 88%, 94% 11%, 48% 9%, 52% 89%, 39% 49%, 61% 64%, 27% 11%, 73% 92%, 14% 31%, 81% 67%,
        41% 72%, 16% 44%, 88% 29%, 57% 12%, 34% 81%, 79% 51%, 24% 68%, 62% 36%, 7% 53%, 96% 74%,
        33% 16%, 66% 79%, 11% 64%, 83% 42%, 46% 23%, 54% 38%, 21% 91%, 69% 8%, 51% 55%, 36% 58%,
        71% 41%, 29% 32%, 89% 84%, 18% 81%, 47% 76%, 13% 13%, 78% 19%, 38% 34%, 59% 71%, 64% 48%,
        86% 56%, 26% 22%, 49% 43%, 92% 63%, 3% 71%, 82% 6%, 56% 26%, 42% 87%, 67% 91%, 32% 62%,
        74% 23%, 17% 95%, 93% 86%, 8% 27%, 53% 69%, 43% 14%, 77% 72%, 28% 54%, 63% 16%, 37% 94%;
    z-index: 11;
}

/* Detalle Page Styles */
.detail-section {
    padding: 8rem 5% 4rem;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.detail-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .detail-container {
        flex-direction: row;
        align-items: center;
    }
}

.detail-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.detail-image {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: rotate(-5deg);
    transition: transform 0.5s ease;
}

.detail-image:hover {
    transform: rotate(0deg) scale(1.05);
}

.detail-info {
    flex: 1;
}

.detail-title {
    font-family: var(--font-heading);
    color: var(--color-terracota);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.detail-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--color-marron);
}

.detail-ingredients h3 {
    font-family: var(--font-heading);
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.detail-ingredients ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-ingredients li {
    background: rgba(255, 255, 255, 0.5);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-ingredients li::before {
    content: "•";
    color: var(--secondary-color);
    font-size: 1.5rem;
}

.back-button {
    display: inline-block;
    margin-top: 3rem;
    padding: 0.8rem 2rem;
    background-color: var(--color-marron);
    color: var(--color-crema);
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: transform 0.2s;
}

.back-button:hover {
    transform: translateX(-5px);
}

/* --- Sección Especial de Horarios --- */
.horarios-section {
    padding: 3rem 20px;
    text-align: center;
}

.horarios-section h2 {
    font-family: var(--font-heading);
    color: var(--color-terracota);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.horarios-box {
    max-width: 450px;
    margin: 0 auto;
    background-color: white;
    /* Rediseñado con bordes más amigables (tipo tarjeta viva) */
    border-radius: 12px;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 30px rgba(74, 59, 50, 0.15);
    /* Sombra que combina con el marrón base */
    text-align: left;
    border-top: 5px solid var(--color-verde);
    /* Guiño al borde verde que pidió, pero más premium */
    position: relative;
    overflow: hidden;
}

/* Header del panel y Badge de estado (Abierto/Cerrado) */
.horarios-header {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: bold;
    background: #f0f0f0;
    color: #5f6368;
    transition: all 0.3s ease;
}

.status-badge.abierto {
    background: rgba(46, 204, 113, 0.15);
    color: #27ae60;
}

.status-badge.cerrado {
    background: rgba(231, 76, 60, 0.15);
    color: #c0392b;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ccc;
}

.status-badge.abierto .status-dot {
    background-color: #27ae60;
    box-shadow: 0 0 0 rgba(46, 204, 113, 0.4);
    animation: pulse-green 2s infinite;
}

.status-badge.cerrado .status-dot {
    background-color: #e74c3c;
}

@keyframes pulse-green {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(46, 204, 113, 0);
    }

    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

.horario-item {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    font-size: 1.15rem;
    color: #5f6368;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: default;
}

.horario-item:hover {
    background-color: rgba(107, 127, 73, 0.05);
    /* Tonos del color verde de la paleta */
    transform: scale(1.02);
}

.horario-item.today {
    background-color: var(--color-crema);
    color: var(--color-marron);
    font-weight: bold;
    border-left: 4px solid var(--color-terracota);
}

.horario-item.today span:last-child {
    color: var(--color-marron);
    font-weight: 800;
}

.horario-item span:first-child {
    font-family: var(--font-body);
    text-transform: capitalize;
    /* Convierte 'lunes' en 'Lunes' si se prefiere visualmente, aunque la fuente ya lo maneja bien */
}

.horario-item span:last-child {
    color: #3c4043;
}

/* El span para "Cerrado" */
.horario-item .cerrado {
    color: #5f6368;
}

/* --- Ruleta de Promoción --- */
.ruleta-section {
    text-align: center;
    padding-bottom: 4rem;
}

.ruleta-section h2 {
    font-family: var(--font-heading);
    color: var(--color-terracota);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.ruleta-section p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--color-marron);
}

.ruleta-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 3rem;
    gap: 2rem;
}

.pointer {
    position: absolute;
    top: 0;
    font-size: 3rem;
    color: var(--color-marron);
    z-index: 10;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

/* Base masa de la pizza ruleta */
.ruleta-wheel {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: #e6c280;
    box-shadow:
        inset 0 0 15px rgba(106, 48, 5, 0.8),
        inset 0 0 35px rgba(0, 0, 0, 0.4),
        0 10px 25px rgba(0, 0, 0, 0.2);
    border: 8px solid #6a3005;
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.ruleta-wheel::before {
    content: '';
    position: absolute;
    top: 6%;
    left: 6%;
    right: 6%;
    bottom: 6%;
    border-radius: 50%;
    background-color: #c0392b;
    background-image: url('queso mozarella.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 0 5px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.ruleta-wheel::after {
    content: '';
    position: absolute;
    top: 6%;
    left: 6%;
    right: 6%;
    bottom: 6%;
    border-radius: 50%;
    /* Líneas separadoras más oscuras, nítidas y ligeramente más gruesas */
    background: repeating-conic-gradient(from -1.5deg,
            rgba(60, 20, 0, 0.95) 0deg 3deg,
            transparent 3deg 36deg);
    z-index: 2;
    pointer-events: none;
}

.segment {
    position: absolute;
    top: 0;
    left: 50%;
    width: 80px;
    height: 160px;
    margin-left: -40px;
    transform-origin: 50% 100%;
    transform: rotate(calc((var(--i) - 1) * 36deg + 18deg));
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 25px;
    z-index: 5;
    pointer-events: none;
    text-align: center;
    box-sizing: border-box;
}

.segment img {
    width: 45px;
    height: auto;
    filter: drop-shadow(2px 3px 3px rgba(0, 0, 0, 0.6));
}

.winning-segment span {
    color: white;
    font-size: 1.15rem;
    /* Letras un poco más pequeñas para que entren perfecto en la rebanada */
    font-weight: 800;
    line-height: 1.1;
    display: block;
    margin-top: -5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9), 0 0 8px rgba(0, 0, 0, 0.8);
}

#btn-girar-ruleta {
    cursor: pointer;
    font-size: 1.3rem;
    padding: 1rem 3rem;
}

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed !important;
    pointer-events: none;
}

.ruleta-resultado {
    margin-top: 2rem;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
    color: var(--color-terracota);
    min-height: 2.5rem;
    transition: all 0.3s;
}

.ruleta-resultado.ganador {
    color: var(--color-verde);
    transform: scale(1.1);
}

/* --- Botones Flotantes (WhatsApp y Carrito) --- */
.btn-whatsapp-flotante {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    /* Verde oficial WhatsApp */
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: transform 0.3s;
}

.btn-whatsapp-flotante:hover {
    transform: scale(1.1);
}

.btn-carrito-flotante {
    position: fixed;
    bottom: 110px;
    right: 30px;
    background-color: var(--color-terracota);
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-carrito-flotante:hover {
    transform: scale(1.1);
}

.carrito-counter {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 15px;
}

/* --- Panel del Carrito (Offcanvas) --- */
.carrito-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.carrito-overlay.active {
    display: block;
    opacity: 1;
}

.panel-carrito {
    position: fixed;
    top: 0;
    right: -400px;
    /* Escondido a la derecha */
    width: 350px;
    height: 100%;
    background-color: var(--color-crema);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    z-index: 2001;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}

.panel-carrito.active {
    right: 0;
}

.carrito-header {
    background-color: var(--color-marron);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrito-header h2 {
    font-family: var(--font-heading);
    margin: 0;
    font-size: 1.8rem;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.carrito-items {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.carrito-item {
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carrito-item-info strong {
    color: var(--color-marron);
    display: block;
    margin-bottom: 0.2rem;
}

.btn-eliminar-item {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    cursor: pointer;
    font-weight: bold;
}

.carrito-footer {
    padding: 1.5rem;
    background-color: white;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.w-100 {
    width: 100%;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {

    /* Header and Nav */
    .main-header {
        flex-direction: column;
        gap: 0.8rem;
        padding: 10px;
    }

    .brand-logo {
        height: 50px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
        font-size: 0.95rem;
    }

    /* Hero Section */
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* Secciones (Padding extra para móviles) */
    section {
        padding: 3rem 15px;
    }

    .glass-panel {
        padding: 2rem 1rem;
        margin: 1rem 5%;
    }

    /* Pizza Builder Canvas */
    .preview-area {
        min-height: auto;
        padding-top: 2rem;
    }

    .pizza-plate {
        width: 280px;
        height: 280px;
    }

    .pizza-base {
        width: 250px;
        height: 250px;
    }

    /* Builder Button */
    #btn-add-custom-pizza {
        white-space: normal;
        padding: 1rem;
        font-size: 0.95rem;
        width: 100%;
        max-width: 280px;
        margin-top: 1rem;
        line-height: 1.4;
    }

    /* Floating Buttons */
    .btn-whatsapp-flotante,
    .btn-carrito-flotante {
        width: 50px;
        height: 50px;
        right: 15px;
    }

    .btn-whatsapp-flotante {
        bottom: 15px;
    }

    .btn-carrito-flotante {
        bottom: 75px;
    }

    .btn-whatsapp-flotante svg,
    .btn-carrito-flotante svg {
        width: 24px;
        height: 24px;
    }

    .carrito-counter {
        top: -5px;
        right: -3px;
        font-size: 0.75rem;
        padding: 2px 6px;
    }

    /* Cart Panel Full Width */
    .panel-carrito {
        width: 100%;
        right: -100%;
    }
}