/* ==========================================================================
   VARIABLES DE COLOR (Distribución: 75% Blanco, 20% Naranja, 5% Verde)
   ========================================================================== */
:root {
    --blanco: #ffffff;
    --naranja: #f39c12;    
    --verde: #27ae60;      
    --texto-oscuro: #1e272e;
    --texto-suave: #57606f;
    --celeste: #00d1ff;
    --gris-fondo: #f9f9f9;
}

/* Badges de Situación de Cliente */
.badge-situacion-1 { background-color: var(--celeste); color: white; }
.badge-situacion-2 { background-color: var(--verde); color: white; }
.badge-situacion-3 { background-color: #f1c40f; color: white; }
.badge-situacion-4 { background-color: #e74c3c; color: white; }

/* Estilos para los contenedores de Pedido */
.card-product {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #f1f1f1;
}

.price-grid {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin: 15px 0;
}

.tx-orange { color: var(--naranja) !important; }
.tx-danger { color: #dc3545 !important; }

/* ==========================================================================
   RESETEO Y CONFIGURACIÓN BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--blanco);
    color: var(--texto-oscuro);
    scroll-behavior: smooth;
    overflow-x: hidden;
}

/* ==========================================================================
   NAVEGACIÓN DE ALTA GAMA
   ========================================================================== */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 10%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.02); /* Sombra más suave para resaltar las gotas */
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--naranja);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nav-logo {
    height: 45px;
    width: auto;
}

/* --- EFECTO DE GOTEO DE LECHE --- */
.milk-drip-container {
    position: absolute;
    top: 100%; /* Comienza justo al final de la navbar */
    left: 0;
    width: 100%;
    height: 0;
    pointer-events: none;
    z-index: 10;
}

/* Ajuste para las gotas que cuelgan del botón */
.btn-drips {
    top: 95%; /* Que nazcan un poco antes del borde inferior */
    z-index: 11;
}

.drip {
    position: absolute;
    /* Forma de gota: arriba casi recto, abajo muy redondeado (bulboso) */
    border-radius: 4px 4px 100px 100px; 
    top: -1px; /* Solapamiento mínimo para evitar líneas de separación */
    transform-origin: top;
    box-shadow: 
        0 10px 15px -5px rgba(0,0,0,0.1), 
        inset -4px -6px 8px rgba(0,0,0,0.05), 
        inset 4px 2px 6px rgba(255,255,255,1); /* Efecto 3D: sombra de caída, sombra interna y luz de borde */
    filter: blur(0.3px); /* Nitidez sutil para parecer un lácteo real */
}

/* Variante Blanca (Navbar) */
.drip-white {
    background: linear-gradient(165deg, #ffffff 30%, #f0f0f0 100%);
}

/* Variante Naranja (Botón) */
.drip-orange {
    background: linear-gradient(165deg, var(--naranja) 30%, #d35400 100%);
    box-shadow: 0 5px 10px rgba(211, 84, 0, 0.2);
}

/* Reflejo de luz (brillo especular) para textura de crema mojada */
.drip::after {
    content: '';
    position: absolute;
    top: 10%;
    left: 20%;
    width: 25%;
    height: 40%;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    filter: blur(1.5px); /* Brillo difuminado para parecer líquido espeso */
}

/* Animación de goteo suave */
@keyframes milkDripAnim {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.2) scaleX(1.02); }
    100% { transform: scaleY(1); }
}

/* Icono Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--naranja);
    margin: 4px 0;
    transition: 0.4s;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: var(--texto-oscuro);
    margin: 0 22px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links li a:hover {
    color: var(--verde);
}

.btn-login {
    background: var(--naranja);
    color: var(--blanco) !important;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.25);
}

/* ==========================================================================
   SECCIÓN INICIO: CARRUSEL CON DOBLE PNG INTERNO EXTENDIDO
   ========================================================================== */
.carousel-container {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    background: url('../public/img/background_inicio.png') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 8%;
    z-index: 1;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* --- TARJETA DE CONTENIDO CENTRAL --- */
.carousel-content {
    position: relative; /* Esencial para el anclaje de los PNGs internos */
    width: 100%;
    max-width: 580px;
    text-align: center;
    z-index: 5;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(15px);
    padding: 60px 45px;
    border-radius: 30px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1);
    border-bottom: 5px solid var(--naranja);
    transform: translateY(40px) scale(0.95);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide.active .carousel-content {
    transform: translateY(0) scale(1);
}

.badge {
    background-color: var(--verde);
    color: var(--blanco);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 25px;
    display: inline-block;
}

.carousel-content h1 {
    font-size: 2.4rem;
    font-weight: 600;
    color: var(--texto-oscuro);
    line-height: 1.2;
    margin-bottom: 20px;
}

.carousel-content p {
    font-size: 1.05rem;
    color: var(--texto-suave);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 35px;
}

.btn-cta {
    display: inline-block;
    padding: 15px 40px;
    background: var(--naranja);
    color: var(--blanco);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    position: relative;
    z-index: 10; /* Aseguramos que el botón esté por encima de los productos si llegan a tocarse */
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.3);
}

.btn-cta:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 35px rgba(243, 156, 18, 0.45);
    filter: brightness(1.05);
    letter-spacing: 0.5px;
}

/* --- IMÁGENES PNG INTERNAS FLOTANDO HACIA AFUERA --- */
.png-left, .png-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 400px; /* Tamaño un poco más grande para mayor impacto */
    height: 500px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 6;
    filter: drop-shadow(0 20px 30px rgba(0,0,0,0.18));
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* Las empujamos hacia afuera de los límites de la tarjeta blanca */
.png-left { 
    left: -360px; 
    transform: translateY(-50%) translateX(-40px) rotate(-8deg); 
}
.png-right { 
    right: -360px; 
    transform: translateY(-50%) translateX(40px) rotate(8deg); 
}

/* Animación fluida de entrada cuando el slide se activa */
.carousel-slide.active .png-left {
    transform: translateY(-50%) translateX(0) rotate(0deg);
    opacity: 1;
}
.carousel-slide.active .png-right {
    transform: translateY(-50%) translateX(0) rotate(0deg);
    opacity: 1;
}

/* Marcadores de posición de las imágenes de tus productos */
.yogurt-png-1 { background-image: url('../public/img/yogurt-sauco.png'); } 
.yogurt-png-2 { background-image: url('../public/img/yogurt-fresa.png'); }
.queso-png-1 { background-image: url('../public/img/queso-prensado-oregano\ a.png'); }
.queso-png-2 { background-image: url('../public/img/queso-paria-maduro2.png'); }
.mantequilla-png-1 { background-image: url('../public/img/mantequilla-sal a.png'); }
.mantequilla-png-2 { background-image: url('../public/img/mantequilla-sal b.png'); }

/* Controles */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    color: var(--texto-oscuro);
    border: none;
    font-size: 1.4rem;
    width: 55px;
    height: 55px;
    cursor: pointer;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.carousel-btn:hover { background: var(--naranja); color: var(--blanco); }
.prev { left: 40px; }
.next { right: 40px; }

.carousel-dots {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 15px;
}
.dot {
    width: 11px;
    height: 11px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}
.dot.active {
    background: var(--naranja);
    transform: scale(1.3);
}

/* ==========================================================================
   SECCIÓN CATÁLOGO
   ========================================================================== */
.products {
    padding: 120px 10%;
    background-color: var(--gris-fondo);
}

.section-title {
    text-align: center;
    font-size: 2.6rem;
    font-weight: 600;
    margin-bottom: 70px;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--verde);
    margin: 18px auto 0;
    border-radius: 2px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 45px;
}

.product-card {
    background: var(--blanco);
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.02);
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.07);
}

.product-img {
    height: 230px;
    margin-bottom: 30px;
    border-radius: 18px;
    background-size: cover;
    background-position: center;
}

.yogurt { background-image: url('https://images.unsplash.com/photo-1571212518115-28c55b3f272a?auto=format&fit=crop&q=80&w=600'); }
.quesos { background-image: url('https://images.unsplash.com/photo-1485962391905-dc37bc33e59b?auto=format&fit=crop&q=80&w=600'); }
.mantequilla { background-image: url('https://images.unsplash.com/photo-1589985270826-4b7bb135bc9d?auto=format&fit=crop&q=80&w=600'); }

.product-card h3 { font-size: 1.4rem; margin-bottom: 12px; }
.product-card p { color: var(--texto-suave); line-height: 1.6; font-size: 0.95rem; }

.btn-order {
    margin-top: 30px;
    padding: 12px 40px;
    border: 2px solid var(--naranja);
    background: transparent;
    color: var(--naranja);
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.3s;
}

.btn-order:hover { background: var(--naranja); color: var(--blanco); }

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
    background: #111417;
    padding: 60px 10% 40px;
    text-align: center;
    color: #a4b0be;
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (PROTECCIÓN DE DISEÑO)
   ========================================================================== */
@media (max-width: 1100px) {
    /* En pantallas medianas, acercamos los PNGs para que no se corten en los bordes de la pantalla */
    .png-left { left: -120px; width: 180px; height: 240px; }
    .png-right { right: -120px; width: 180px; height: 240px; }
}

@media (max-width: 768px) {
    .navbar { padding: 15px 5%; }
    
    .menu-toggle { display: flex; }
    
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 75px;
        left: 0;
        background: rgba(255, 255, 255, 0.98);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        text-align: center;
    }

    .nav-links.active { display: flex; }

    .nav-links li { width: 100%; margin: 10px 0; }
    .nav-links li a { margin: 0; display: block; padding: 10px; }

    .btn-login {
        display: inline-block;
        width: auto;
        min-width: 180px;
        padding: 12px 30px;
        font-size: 0.9rem;
        margin: 10px auto;
    }

    /* Ajuste de Secciones */
    .products { padding: 60px 5%; }
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    
    /* Ajuste de Botones Globales */
    .btn-cta { padding: 12px 30px; font-size: 0.9rem; }
    .btn-order { width: 100%; padding: 10px; }
    
    .carousel-content { width: 100%; padding: 40px 20px; position: relative; }
    .carousel-content h1 { font-size: 1.5rem; }
    .carousel-content p { font-size: 0.9rem; }

    /* Restauramos la posición absoluta para que flanqueen el texto horizontalmente */
    .png-left, .png-right { 
        display: block !important;
        position: absolute !important; 
        top: 62% !important; /* Subimos un poco la posición relativa para que queden centradas en el nuevo hueco */
        width: 190px !important; 
        height: 240px !important;
        opacity: 1 !important;
        z-index: 6;
        filter: drop-shadow(0 15px 25px rgba(0,0,0,0.2));
    }

    .png-left { 
        left: -10px !important; /* Acercamos las imágenes más al centro del contenedor */
        transform: translateY(-50%) rotate(-8deg) !important; 
    }
    .png-right { 
        right: -10px !important; /* Acercamos las imágenes más al centro del contenedor */
        transform: translateY(-50%) rotate(8deg) !important; 
    }

    .prev, .next { display: none; }
}