/* --- VARIABLES DE MARCA AVREN --- */
/* --- VARIABLES DE MARCA AVREN --- */
:root {
    --avren-negro: #0B0B0B;
    --avren-gris: #6B6B6B;
    --avren-beige: #E8E6DF;
    --avren-plata: #C0C0C0;
    --avren-blanco: #FFFFFF;
    --avren-dorado: #c9a74b;
}

/* Reseteo básico */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* --- FUENTE GLOBAL (SANS-SERIF MODERNA) --- */
body {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    color: var(--avren-negro);
    background-color: var(--avren-blanco);
    letter-spacing: 0.5px;
}

h1, h2, h3, h4, .logo h1, button, input {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400; /* Grosor regular para mantener la elegancia */
}

/* Solo para darle un toque extra al menú de categorías */
.categories a {
    letter-spacing: 1.5px; /* Espaciado idéntico a tu imagen de referencia */
}

a, a:link, a:visited { 
    text-decoration: none; 
    color: var(--avren-negro); 
}
a:hover {
    color: var(--avren-gris); /* Efecto sutil al pasar el mouse */
}

/* --- ACTUALIZANDO COLORES EXISTENTES --- */
/* (Busca estas clases en tu CSS y actualiza sus colores) */
.sub-nav { background-color: var(--avren-beige); }
.hero { background-color: var(--avren-beige); }
.features { background-color: var(--avren-beige); }
.feature-box p { color: var(--avren-gris); }
footer { background-color: var(--avren-negro); }
/* NAVEGACIÓN */
header { border-bottom: 1px solid #eaeaea; }

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
}

.logo-img {
    height: 45px; /* Altura principal para pantallas de computadora */
    width: auto;
    object-fit: contain;
}

.nav-links { display: flex; gap: 30px; }

/* Ajustes para el nuevo logo en imagen */
.logo {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-img {
    height: 45px; /* Altura controlada, ajusta cuando pongas tu diseño real */
    width: auto;
    display: block;
    object-fit: contain;
}

.sub-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 50px;
    background-color: #f7f6f2;
    font-size: 12px;
    letter-spacing: 1px;
}

.categories { display: flex; gap: 20px; }
.icons { display: flex; gap: 15px; font-size: 16px; cursor: pointer; }

/* --- HERO SECTION CON CARRUSEL DE FONDO --- */
.hero-section {
    position: relative;
    width: 100%;
    height: 520px; /* Altura ideal para la portada */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0B0B0B;
}

.hero-slider {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
}

/* Capa oscura (40%) para que el texto blanco siempre resalte */
.hero-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4); 
    z-index: 2;
}

.hero-slide-track {
    display: flex;
    height: 100%;
    width: 100%;
    /* Esta línea es la magia del desliz: inicia rápido y frena muy suavemente */
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1); 
}

.hero-slide {
    min-width: 100%;
    height: 100%;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- TEXTO ESTÁTICO SOBRE EL CARRUSEL --- */
.hero-content {
    position: relative;
    z-index: 3; /* Asegura que el texto flote sobre todo */
    text-align: center;
    color: #FFFFFF;
}

.hero-title {
    font-size: 55px;
    letter-spacing: 8px;
    margin: 0 0 5px 0;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

.hero-subtitle {
    font-size: 13px;
    letter-spacing: 6px;
    margin: 0 0 25px 0;
}

.hero-description {
    font-size: 15px;
    letter-spacing: 3px;
    margin-bottom: 40px;
}

.hero-btn {
    background-color: #FFFFFF;
    color: var(--avren-negro);
    padding: 16px 35px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    transition: 0.3s;
    display: inline-block;
}

.hero-btn:hover {
    background-color: #c9a74b;
    color: #FFFFFF;
}

/* Adaptación para celular */
@media (max-width: 768px) {
    .hero-section { height: 420px; }
    .hero-title { font-size: 40px; }
    .hero-description { font-size: 12px; }
}

/* --- CUADRÍCULA ASIMÉTRICA (2 Arriba, 3 Abajo) --- */
.products-section { padding: 50px; max-width: 1200px; margin: 0 auto; }

.products-grid {
    display: grid;
    /* Creamos 6 columnas invisibles para jugar con las proporciones */
    grid-template-columns: repeat(6, 1fr);
    gap: 30px;
}

/* Los 2 primeros productos toman 3 columnas cada uno (mitad y mitad) */
.product-card:nth-child(1),
.product-card:nth-child(2) {
    grid-column: span 3;
}

/* Los 3 productos de abajo toman 2 columnas cada uno (tercios) */
.product-card:nth-child(3),
.product-card:nth-child(4),
.product-card:nth-child(5) {
    grid-column: span 2;
}

.product-card { text-align: center; }

/* Cajas de imagen más grandes para los 2 de arriba */
.product-card:nth-child(1) .img-placeholder,
.product-card:nth-child(2) .img-placeholder {
    height: 400px;
    background-color: #f4f4f4;
    margin-bottom: 15px;
}

/* Cajas de imagen un poco más pequeñas para los 3 de abajo */
.product-card:nth-child(n+3) .img-placeholder {
    height: 280px;
    background-color: #f4f4f4;
    margin-bottom: 15px;
}

.product-info { padding: 10px 0; }
.category-tag { font-size: 10px; color: #888; margin-bottom: 5px; letter-spacing: 1px; }
.product-title { font-size: 14px; font-weight: normal; margin-bottom: 5px; }
.product-price { font-size: 14px; color: #555; }

/* --- SECCIÓN DE BENEFICIOS --- */
.features {
    display: flex;
    justify-content: space-around;
    padding: 50px;
    background-color: #f7f6f2; /* Mismo tono crema del submenú superior */
    text-align: center;
    margin: 40px 0 0 0;
}

.feature-box h4 { 
    font-size: 16px; 
    margin-bottom: 10px; 
    font-weight: bold;
}

.feature-box p { 
    font-size: 13px; 
    color: #666; 
}

/* --- FOOTER OSCURO --- */
footer {
    background-color: #121212; /* Fondo casi negro */
    color: #ffffff;
    padding: 60px 50px 20px 50px;
}

.newsletter {
    text-align: center;
    border-bottom: 1px solid #333;
    padding-bottom: 40px;
    margin-bottom: 40px;
}

.newsletter h3 { 
    font-size: 18px; 
    letter-spacing: 2px; 
    margin-bottom: 10px; 
    font-weight: normal;
}

.newsletter p { 
    font-size: 12px; 
    color: #999; 
    margin-bottom: 20px; 
}

.news-form {
    display: flex;
    justify-content: center;
    gap: 0;
}

.news-form input {
    padding: 12px 15px;
    width: 250px;
    border: 1px solid #333;
    background: transparent;
    color: #fff;
    outline: none;
}

.news-form button {
    padding: 12px 25px;
    background-color: #c9a74b; /* Acento dorado estilo joyería */
    border: none;
    color: #121212;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.3s;
}

.news-form button:hover {
    background-color: #e0be5f;
}

.footer-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto 40px auto;
}

.footer-col { 
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
}

.footer-col h4 { 
    font-size: 12px; 
    letter-spacing: 1px; 
    color: #fff; 
    margin-bottom: 10px; 
}

.footer-col a { 
    color: #999; 
    font-size: 12px; 
    transition: color 0.3s; 
}

.footer-col a:hover { 
    color: #c9a74b; 
}

.social-icons { 
    display: flex; 
    gap: 15px; 
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 35px;
    border: 1px solid #333;
    border-radius: 50%;
    color: #999;
    font-size: 11px;
}

.social-icons a:hover {
    border-color: #c9a74b;
    color: #c9a74b;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 11px;
    color: #666;
    line-height: 1.8;
}


/* --- COLECCIÓN DESTACADA --- */
.featured-collection {
    display: flex;
    align-items: center;
    max-width: 1200px;
    margin: 60px auto;
    background-color: var(--avren-blanco);
    gap: 50px;
    padding: 0 50px;
}

.featured-img-box {
    flex: 1;
    height: 500px;
    background-color: var(--avren-plata); /* Tono plata de tu manual como placeholder */
}

.featured-content {
    flex: 1;
    padding: 40px;
}

.featured-content h3 {
    font-size: 36px;
    margin-bottom: 20px;
    letter-spacing: 2px;
}

.featured-content p {
    font-size: 14px;
    color: var(--avren-gris);
    margin-bottom: 30px;
    line-height: 1.8;
}

/* --- BOTÓN COLECCIÓN DESTACADA --- */
a.btn-dark {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--avren-negro);
    color: var(--avren-blanco) !important; /* Forzamos el texto blanco */
    font-size: 11px;
    letter-spacing: 2px;
    transition: background 0.3s;
}

a.btn-dark:hover {
    background-color: var(--avren-gris);
    color: var(--avren-blanco) !important;
}

/* --- ESTILOS PARA LA PÁGINA DE PRODUCTO INDIVIDUAL --- */
.product-detail-container {
    display: flex;
    max-width: 1200px;
    margin: 60px auto;
    padding: 0 50px;
    gap: 60px;
}

.product-image-large {
    flex: 1;
    background-color: transparent; /* Recuadro temporal */
    height: 600px;
}

.product-info-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-info-detail .meta-info {
    font-size: 11px;
    color: var(--avren-gris);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.product-info-detail h2 {
    font-size: 38px;
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.product-info-detail .price {
    font-size: 24px;
    color: var(--avren-dorado);
    margin-bottom: 30px;
}

.product-info-detail .description {
    font-size: 16px;
    line-height: 1.8;
    color: var(--avren-gris);
    margin-bottom: 40px;
}

.btn-add-cart { 
    padding: 18px 30px; 
    background-color: var(--avren-negro); 
    color: var(--avren-blanco); 
    border: none; 
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif; /* Fuente corregida */
    font-weight: 500;
    font-size: 13px; 
    letter-spacing: 3px; 
    cursor: pointer; 
    transition: background 0.3s; 
    width: 100%; 
    text-transform: uppercase; 
}

.btn-add-cart:hover {
    background-color: var(--avren-gris);
}

/* --- CARRITO LATERAL (DRAWER) --- */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cart-overlay.active {
    visibility: visible;
    opacity: 1;
}

.cart-drawer {
    position: fixed;
    top: 0;
    right: -420px; /* Oculto fuera de la pantalla a la derecha */
    width: 400px;
    height: 100%;
    background-color: var(--avren-blanco);
    box-shadow: -5px 0 25px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1); /* Animación suave tipo slide */
}

.cart-drawer.active {
    right: 0; /* Se desliza hacia adentro */
}

.cart-header-drawer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    border-bottom: 1px solid #eaeaea;
}

.cart-header-drawer h3 {
    font-size: 16px;
    letter-spacing: 2px;
}

.cart-close-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--avren-negro);
}

.cart-body-drawer {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
}

.cart-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f4f4f4;
}

.cart-item-details h4 {
    font-size: 14px;
    margin-bottom: 5px;
}

.cart-item-details p {
    font-size: 12px;
    color: var(--avren-gris);
}

.cart-footer-drawer {
    padding: 25px 30px;
    border-top: 1px solid #eaeaea;
    background-color: #faf9f6;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
}

.btn-whatsapp-drawer {
    display: block;
    width: 100%;
    text-align: center;
    padding: 15px;
    background-color: #25D366;
    color: white !important;
    font-size: 12px;
    letter-spacing: 2px;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-whatsapp-drawer:hover {
    background-color: #1ebe5d;
}

/* --- ICONO DEL CARRITO Y BOLITA FLOTANTE --- */
.cart-icon-wrapper {
    position: relative;
    display: inline-block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--avren-dorado);
    color: var(--avren-blanco);
    font-size: 10px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    border-radius: 50%;
    padding: 2px 5px;
    min-width: 16px;
    text-align: center;
}

/* --- BOTÓN ELIMINAR (BASURERO) --- */
.cart-item-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.btn-remove-item {
    color: var(--avren-gris);
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}

.btn-remove-item:hover {
    color: #ff4d4d; /* Se pone rojo al pasar el mouse */
}

/* --- ADAPTACIÓN PARA DISPOSITIVOS MÓVILES (CORREGIDA) --- */
@media (max-width: 768px) {
    
    /* 1. NAVEGACIÓN SUPERIOR (Logo y enlaces) */
    .top-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 15px 10px 5px 10px;
        justify-content: center;
        gap: 15px;
    }
    .top-nav .logo {
        width: 100%; /* Forzamos al logo a tomar toda la fila */
        order: -1;   /* Lo empujamos al primer lugar pase lo que pase */
        text-align: center;
        margin-bottom: 5px;
    }
    .top-nav .nav-links {
        font-size: 11px;
        gap: 15px;
    }

    /* 2. SUBMENÚ (Íconos arriba, categorías abajo) */
    .sub-nav {
        flex-direction: column-reverse; /* Invertimos el orden */
        padding: 10px 0; /* Quitamos padding lateral para el scroll */
        gap: 15px;
    }
    .icons {
        justify-content: center;
        gap: 40px; /* Más separación para no equivocarse de botón al tocar */
        font-size: 20px;
    }

    /* 3. MENÚ DE CATEGORÍAS DESLIZABLE (Swipeable) */
    .categories {
        flex-wrap: nowrap;
        overflow-x: auto; /* Permite deslizar horizontalmente con el dedo */
        justify-content: flex-start;
        padding: 0 20px 10px 20px;
        gap: 20px;
        -webkit-overflow-scrolling: touch; /* Suavidad nativa en iPhone/Android */
    }
    .categories::-webkit-scrollbar {
        display: none; /* Oculta la barra gris fea de scroll */
    }
    .categories a {
        white-space: nowrap; /* Evita que "Colecciones" se rompa en dos líneas */
        font-size: 11px;
    }

    /* --- RESTO DE LA VISTA MÓVIL --- */
    .hero { height: 300px; }
    .hero-text h2 { font-size: 32px; }
    .products-grid { display: flex; flex-direction: column; }
    .product-card:nth-child(n) .img-placeholder { height: 350px; }
    .featured-collection { flex-direction: column; gap: 20px; padding: 20px; margin: 30px auto; }
    .featured-img-box { height: 300px; width: 100%; }
    .featured-content { padding: 20px 0; text-align: center; }
    .product-detail-container { flex-direction: column; padding: 20px; gap: 30px; margin: 30px auto; }
    .product-image-large { height: 400px; }
    .features { flex-direction: column; gap: 30px; padding: 40px 20px; }
    .footer-links { flex-direction: column; gap: 30px; align-items: center; text-align: center; }
    .cart-drawer { width: 100%; right: -100%; }

    .top-nav .logo-img {
        height: 38px; /* Un tamaño más compacto para celular */
    }
}

/* --- ICONOS MINIMALISTAS Y BUSCADOR ANIMADO --- */
.icons {
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--avren-negro); /* Aseguramos que el color base sea negro */
}

.nav-icon {
    cursor: pointer;
    transition: opacity 0.3s;
    vertical-align: middle;
}

.nav-icon:hover {
    opacity: 0.6; /* En vez de cambiar el color, lo hacemos semitransparente al pasar el mouse */
}

.search-wrapper {
    display: flex;
    align-items: center;
}

/* El input está oculto inicialmente */
.search-input {
    width: 0 !important;
    opacity: 0;
    visibility: hidden;
    border: none;
    border-bottom: 1px solid var(--avren-gris);
    background: transparent;
    padding: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    outline: none;
    transition: all 0.4s ease;
}

/* Cuando se le da clic a la lupa, toma esta clase */
.search-input.active {
    width: 150px !important;
    opacity: 1;
    visibility: visible;
    padding: 5px 10px;
    margin-right: 15px;
}

/* Quita los bordes del botón y lo hace perfectamente clickeable */
.btn-search-icon {
    background: transparent;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    color: inherit;
    cursor: pointer;
    outline: none;
}

.cart-badge {
    top: -5px;
    right: -8px;
}

/* --- HEADER COMPACTO (Para páginas interiores) --- */
.header-compact {
    background-color: #FFFFFF;
    border-bottom: 1px solid #eaeaea;
    padding: 15px 40px;
}

.compact-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-group {
    display: flex;
    align-items: center;
}

.compact-categories {
    display: flex;
    gap: 30px;
    align-items: center;
}

.compact-categories a {
    text-decoration: none;
    color: var(--avren-negro);
    font-size: 11px;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.mobile-only { display: none; }

/* Adaptación Móvil del Header Compacto */
@media (max-width: 768px) {
    .header-compact {
        padding: 15px 20px 5px 20px;
    }
    
    .desktop-only { display: none; }
    .mobile-only { display: flex; }
    
    .logo-group .nav-icon { margin-right: 15px !important; }
    
    .swipeable {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        padding-top: 15px;
        padding-bottom: 10px;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .swipeable::-webkit-scrollbar { display: none; }
}

/* ESTILO CARRUSEL DE IMAGENES*/
.product-gallery { 
            display: flex; 
            flex-direction: column; 
            gap: 15px; 
            width: 100%; 
            min-width: 0; /* ¡Esta es la línea mágica que evita que la foto desborde! */
        }
        .main-image-container { 
            background: transparent; 
            width: 100%; 
            aspect-ratio: 4/5; /* Sustituimos los 500px por una proporción dinámica */
            border-radius: 4px; 
            overflow: hidden; 
            display: flex;
            justify-content: center;
            align-items: center;
            cursor: zoom-in; /* Muestra el cursor como lupa */
        }
        .main-image-container img { 
            width: 100%; 
            height: 100%; 
            object-fit: contain; 
            display: block;
            transition: transform 0.2s ease-out; /* Hace que el acercamiento y alejamiento sea suave */
        }
        .thumbnails { 
            display: flex; 
            gap: 10px; 
            flex-wrap: wrap; /* Permite que las miniaturas bajen de línea si no caben */
        }
        .thumb-img { 
            width: 80px; 
            height: 80px; 
            object-fit: cover; 
            border-radius: 4px; 
            cursor: pointer; 
            border: 2px solid transparent; 
            opacity: 0.6; 
            transition: 0.3s; 
        }
        .thumb-img:hover, .thumb-img.active { 
            border-color: var(--avren-negro); 
            opacity: 1; 
        }

/* --- MENÚ LATERAL (DRAWER IZQUIERDO) --- */
.menu-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
}
.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.menu-lateral {
    position: fixed;
    top: 0; left: -300px; /* Oculto a la izquierda */
    width: 280px;
    height: 100%;
    background: #FFFFFF;
    z-index: 1001;
    box-shadow: 2px 0 15px rgba(0,0,0,0.15);
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animación suave como el carrito */
    display: flex;
    flex-direction: column;
}
.menu-lateral.active {
    left: 0; /* Entra a la pantalla */
}

.menu-lateral-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eaeaea;
}
.menu-lateral-header h3 { margin: 0; font-size: 15px; letter-spacing: 2px; }
.close-menu { font-size: 22px; cursor: pointer; color: #888; transition: 0.3s; }
.close-menu:hover { color: var(--avren-negro); }

.menu-lateral-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    overflow-y: auto;
}
.menu-lateral-content a {
    text-decoration: none;
    color: var(--avren-negro);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    transition: 0.2s;
}
.menu-lateral-content a:hover { color: #c9a74b; } /* Acento dorado */
.menu-lateral-content hr { border: none; border-top: 1px solid #eaeaea; margin: 5px 0; }

