:root{
    --coffee-dark: #3E2723;
    --coffee-medium: #6F4E37;
    --coffee-light: #C4A484;
    --coffee-accent: #D2B48C;
    --coffee-cream: #F5F5DC;
    --coffee-gold: #D4AF37;
    --text-dark: #2C2416;
    --text-light: #f3f3f3;
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;;
}

body{
    font-family: 'Monserrat', sans-serif;
    background: var(--coffee-cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

.container{
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

header{
    background: #161515;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 10px 0;
    transition: all 0.4s ease;
}

.header-container{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo{
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.logo-img {
    height: 50px; /* Ajusta este tamaño según tu imagen */
    width: auto;
    object-fit: contain;
}

.logo-icon{
    color: var(--coffee-gold);
    font-size: 28px;
}

.logo-text{
    font-family: 'Playfair Display', serif;
    font-size: 28px;
    font-weight: 900;
    color: gray;
    letter-spacing: 1px;
}

.logo-text span{
    color: white;
}

nav ul{
    display: flex;
    list-style: none;
    gap: 35px;
}

nav a{
    text-decoration: none;
    color: gray;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

nav a:after{
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width:0;
    height:2px;
    background: var(--coffee-gold);
    transition: width 0.3s ease;
}

nav a:hover:after{
    width: 100%;
}

.nav-buttons{
    display: flex;
    gap: 15px;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 16px;
}

.btn-primary{
    background: var(--coffee-medium);
    color: white; 
}

.btn-primary:hover{
    background: var(--coffee-dark);
    transform: translateY(-3px);
}

.btn-secondary{
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover{
    background: rgba(111, 78, 55, 0.05);
    transform: translateY(-3px);
}

.hero{
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before{
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0b0705 0%, #010000 50%);
    z-index: -1;
}

.hero-content{
    width: 750px;
    color: var(--text-light);
    animation: fadeInUp 1s ease-out;
}

.hero .container{
    display: flex;
}

.hero-subtitle{
    font-size: 20px;
    color: var(--coffee-accent);
    margin-top: 20px;
    margin-bottom: 60px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-subtitle::before{
    content: '';
    width: 50px;
    height: 2px;
    background: var(--coffee-gold);
}

.hero-title{
    font-size: 58px;
    line-height: 1.1;
    margin-bottom: 25px;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.hero-title span{
    color: var(--coffee-gold);
    position: relative;
}

.hero-text{
    font-size: 16px;
    margin-bottom: 120px;
    max-width: 700px;
}

.hero-buttons{
    display: flex;
    gap: 20px;
    margin-top: 30px;
}

.products{
    padding: 120px 0;
    position: relative;
    background-color: #161515;
    border-top: 4px solid gray;
}

.section-header{
    text-align: center;
    max-width: 700px;
    margin: 0 auto 70px;
}

.section-subtitle{
    font-size: 20px;
    color: var(--coffee-gold);
    margin-bottom: 15px;
}

.section-title{
    font-size: 42px;
    color: var(--coffee-gold);
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
}

.section-title::after{
    content: '';
    position: absolute;
    bottom: -10px;
    left: 46%;
    transform: translateY(-50%);
    width: 80px;
    height: 3px;
    background: var(--coffee-gold);
}

.section-desc{
    font-size: 18px;
    color: var(--text-light);
}

.product-grid{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
    gap: 40px;
}

.product-card{
    background: var(--coffee-dark);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.4s ease;
    position: relative;
    top: 0;
}

.product-card:hover{
    transform: translateY(-15px);
    border: 2px solid var(--coffee-gold);
}

.product-img{
    height: 200px;
    overflow: hidden;
}

.product-img img{
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-img img{
    transform: scale(1.05);
}

.product-info{
    padding: 25px;
    position: relative;
}

.product-tag {
    position: absolute;
    top: -20px;
    right: 25px;
    background: var(--coffee-gold);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.product-title{
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: 10px;
}

.product-desc{
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 16px;
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    letter-spacing: 0.5px;
}

footer{
    background: var(--coffee-dark);
    color: var(--text-light);
    padding: 70px 0 30px;
    position: relative;
    border-top: 4px solid gray;
}
.footer-content{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3{
    font-size: 22px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 15px;
}

.footer-column h3::after{
    content: '';
    position: absolute;
    bottom:0;
    left:0;
    width: 50px;
    height: 2px;
    background: var(--coffee-gold);
}

.footer-links{
    list-style: none;
}

.footer-links li{
    margin-bottom: 15px;
}

.footer-links a{
    color: var(--coffee-accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover{
    color: var(--coffee-gold);
    padding-left: 5px;
}

.social-links{
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-links a{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color:var(--coffee-cream);
    font-size: 18px;
    transition: all 0.3s ease;
}

.social-links a:hover{
    background:var(--coffee-gold);
    transform: translateY(-3px);
}

.copyright{
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--coffee-accent);
    font-size: 15px;
}

@keyframes fadeInUp {
    from{
        opacity: 0;
        transform: translateY(40px);
    }
    to{
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
    margin-bottom: 20px;
}

.tab-btn {
    background: transparent;
    border: 2px solid white;
    color: var(--text-light);
    padding: 10px 25px;
    border-radius: 30px;
    font-family: 'Monserrat', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tab-btn:hover {
    background: rgba(212, 175, 55, 0.1);
}

/* Estado activo del botón */
.tab-btn.active {
    background: var(--coffee-medium);
    color: white;
    border: 2px solid var(--coffee-medium);
}

/* Lógica de visualización */
.tab-content {
    display: none; /* Oculto por defecto */
    animation: fadeIn 0.5s ease-in-out;
}

.tab-content.active {
    display: grid; /* Se muestra si tiene la clase active */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}


/* 1. Transición para el color del texto */
#dynamic-span {
    /* Esto suaviza el cambio de color cuando JS lo actualiza */
    transition: color 0.5s ease-in-out; 
}

/* 2. Estado base de la imagen */
#hero-image {
    opacity: 1;
    /* Asegura que cualquier cambio de opacidad sea animado */
    transition: opacity 0.5s ease-in-out; 
}

/* 3. Clase para el efecto de desvanecimiento */
/* (Asegúrate de que esta clase NO esté comentada como en tu archivo actual) */
.fade-out {
    opacity: 0 !important; /* El !important asegura que sobreescriba cualquier otra regla */
}

/* Estado inicial (invisible) */
/* .reveal {
    opacity: 0;
    filter: blur(5px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
} */
.reveal {
    opacity: 0;
    /* filter: blur(5px);  <--- ELIMINADO */
    transition: all 1s ease-out; /* Transición suave de posición y opacidad */
}
.reveal-up {
    transform: translateY(50px); /* Viene de abajo (clásico) */
}

.reveal-left {
    transform: translateX(-50px); /* Viene de la izquierda */
}

.reveal-right {
    transform: translateX(50px); /* Viene de la derecha */
}

/* Estado final (visible) */
.reveal.active {
    opacity: 1;
    transform: translate(0, 0);/* Regresa a su posición original */
}

.delay-200 { transition-delay: 0.2s; }
.delay-400 { transition-delay: 0.4s; } 

/* Opcional: Para que las cards aparezcan una tras otra (efecto cascada) */
/* .product-card.reveal:nth-child(1) { transition-delay: 0.1s; }
.product-card.reveal:nth-child(2) { transition-delay: 0.2s; }
.product-card.reveal:nth-child(3) { transition-delay: 0.3s; }
 */

/* Solución para el conflicto de especificidad del Hero Image */
#hero-image.reveal {
    opacity: 0; /* Ahora sí se ocultará */
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

#hero-image.reveal.active {
    opacity: 1; /* Y aparecerá cuando deba */
}
nav a.active {
    color: white; /* Texto blanco */
}

/* Mantiene la línea dorada al 100% siempre */
nav a.active::after {
    width: 100%; 
}

/* =========================================
   DISEÑO RESPONSIVO (MÓVIL)
   ========================================= */

/* Por defecto, ocultamos el menú móvil en PC */
.mobile-nav-container {
    display: none;
}

/* =========================================
   MEDIA QUERY: TABLETS Y LAPTOPS PEQUEÑAS (1150px hacia abajo)
   Aquí arreglamos que el Hero se rompa antes de llegar a móvil
   ========================================= */
@media (max-width: 1150px) {
    /* 1. Arreglo del Hero que se corta/desaparece */
    .hero {
        height: auto; /* Dejamos que crezca lo que necesite */
        min-height: 100vh; /* Pero que al menos cubra la pantalla */
        padding-top: 120px; /* Espacio para que el header no tape el título */
        padding-bottom: 60px;
    }

    .hero .container {
        flex-direction: column-reverse; 
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .hero-content {
        width: 100%;
        margin-bottom: 50px; /* Espacio entre texto e imagen */
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hero-text {
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    .hero-subtitle {
        justify-content: center; /* Centrar subtítulo */
    }

    .hero-buttons {
        justify-content: center; /* Centrar botones */
    }

    /* 2. Control de la Imagen Hero */
    #hero-image {
        width: 60%; /* Tamaño controlado */
        max-width: 400px;
        margin: 0 auto 40px auto; /* ESTO CENTRA LA IMAGEN */
        display: block; /* Asegura que respete el margin auto */
    }
}

/* =========================================
   AJUSTE DE LAS CARDS (Para que la última se centre)
   ========================================= */
@media (max-width: 1090px) {
    .product-grid.active {
        /* Cambiamos Grid por Flex para poder centrar la card que sobra abajo */
        display: flex;
        flex-wrap: wrap;
        justify-content: center; /* Esto centra horizontalmente los elementos */
        gap: 40px;
    }

    .product-grid:not(.active) {
        display: none;
    }

    .product-card {
        /* Le damos un ancho fijo o flexible para simular el grid */
        width: 45%; 
        min-width: 300px; /* Que no se hagan demasiado pequeñas */
    }
}

@media (max-width: 768px) {
    
    /* 1. AJUSTES DEL BODY Y HEADER */
    body {
        /* Padding extra abajo para que el menú flotante no tape el footer */
        padding-bottom: 0px; 
    }
    footer {
    /* Agregamos el padding AQUÍ. */
    /* Como el footer tiene fondo oscuro, el espacio extra será oscuro */
        padding-bottom: 130px; 
    }

    /* Ocultar navegación de escritorio y botón de factura */
    nav, .nav-buttons {
        display: none;
    }

    /* Centrar logo en móvil */
    .header-container {
        justify-content: center;
    }

    /* 2. AJUSTES DE LA HERO SECTION */
    .hero .container {
        flex-direction: column-reverse; /* Texto arriba, imagen abajo? O al revés. */
        text-align: center;
        justify-content: center;
    }

    .hero {
        height: auto; /* Quitar altura fija */
        min-height: 100vh;
        padding-top: 120px; /* Más espacio para el header fijo */
        padding-bottom: 50px;
    }

    .hero-content {
        width: 100%; /* Ancho completo */
        padding: 0 20px;
        margin-top: 30px;
    }

    .hero-title {
        font-size: 38px; /* Título más pequeño */
    }

    .hero-subtitle {
        justify-content: center; /* Centrar subtítulo */
        margin-bottom: 20px;
    }

    .hero-buttons {
        justify-content: center; /* Centrar botones */
        flex-wrap: wrap; /* Si no caben, que bajen */
    }

    /* Ajuste de la imagen Hero */
    #hero-image {
        width: 80%; /* Que no se salga de la pantalla */
        max-width: 350px;
        height: auto;
        margin-top: 20px;
    }

    /* 3. AJUSTES DE PRODUCTOS (GRID) */
    .product-grid {
        grid-template-columns: 1fr; /* Una sola columna */
        padding: 0 20px;
    }

    .section-title {
        font-size: 32px;
    }
    
    .section-title::after {
        left: 50%; /* Re-centrar la línea decorativa */
        transform: translateX(-50%);
    }

    /* 4. MENÚ MÓVIL FLOTANTE (Adaptado a tu tema) */
    .mobile-nav-container {
        display: flex;
        justify-content: center;
        position: fixed;
        bottom: 20px; /* Flotando un poco arriba del borde */
        left: 0;
        width: 100%;
        z-index: 1000;
        pointer-events: none; /* Para que el container no bloquee clicks a los lados */
    }

    .navigation {
        pointer-events: auto; /* Reactivar clicks en el menú */
        position: relative;
        width: 320px; /* Un poco más ancho para acomodar iconos */
        height: 70px;
        background: #161515; /* Fondo oscuro (Header color) */
        border-radius: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    }

    .navigation ul {
        display: flex;
        width: 350px;
        padding: 0;
        margin: 0;
    }

    .navigation ul li {
        position: relative;
        list-style: none;
        width: 106px; /* 320px / 3 items aprox */
        height: 70px;
        z-index: 1;
    }

    .navigation ul li a {
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        width: 100%;
        text-align: center;
        font-weight: 500;
        text-decoration: none;
    }

    .navigation ul li a .icon {
        position: relative;
        display: block;
        line-height: 75px;
        font-size: 1.5em;
        text-align: center;
        transition: 0.5s;
        color: var(--coffee-light); /* Iconos color claro */
    }

    .navigation ul li.active a .icon {
        transform: translateY(-32px);
        color: var(--text-dark); /* Color del icono cuando sube (dentro del círculo dorado) */
    }

    .navigation ul li a .text {
        position: absolute;
        color: var(--coffee-gold);
        font-weight: 400;
        font-size: 0.75em;
        letter-spacing: 0.05em;
        transition: 0.5s;
        opacity: 1;
        transform: translateY(20px);
    }

    .navigation ul li.active a .text {
        opacity: 0;
        transform: translateY(10px);
        
    }

    /* La bola dorada */
    .indicator {
        position: absolute;
        top: -50%;
        width: 70px; /* Ajustado */
        height: 70px;
        background: var(--coffee-gold);
        border-radius: 50%;
        border: 6px solid #161515; /* IMPORTANTE: Color del fondo de tu web */
        transition: 0.5s;
        /* Inicializar posición */
        left: 18px; /* Ajuste manual inicial */
    }

    /* Las curvas de la bola */
    .indicator::before {
        content: '';
        position: absolute;
        top: 50%;
        left: -22px;
        width: 20px;
        height: 20px;
        background: transparent;
        border-top-right-radius: 20px;
        box-shadow: 1px -10px 0 0 transparent; /* Color del fondo de tu web */
    }

    .indicator::after {
        content: '';
        position: absolute;
        top: 50%;
        right: -22px;
        width: 20px;
        height: 20px;
        background: transparent;
        border-top-left-radius: 20px;
        box-shadow: -1px -10px 0 0 transparent; /* Color del fondo de tu web */
    }

    /* Ajuste del ICONO cuando está activo */
    .navigation ul li.active a .icon {
        /* Ajustamos cuánto sube el icono para que quede al centro de la bola */
        transform: translateY(-35px); 
        color: var(--text-dark);
    }
    
    /* Ajuste del TEXTO cuando está activo */
    .navigation ul li.active a .text {
        opacity: 1;
        transform: translateY(10px);
        font-weight: 900;
    }

    /* Posiciones del indicador según el hijo activo */
    /* Calculado basado en width: 106px aprox por item */
    .navigation ul li:nth-child(1).active ~ .indicator { transform: translateX(calc(106px * 0)); }
    .navigation ul li:nth-child(2).active ~ .indicator { transform: translateX(calc(106px * 1)); }
    .navigation ul li:nth-child(3).active ~ .indicator { transform: translateX(calc(106px * 2)); }
}






