/* /assets/css/style.css */

/* ============================================ */
/* 1. PALETA DE COLORES "EARTH TONES" Y VARIABLES */
/* ============================================ */
:root {
    --color-darkest: #4A443F;
    --color-primary: #8E7C6F;
    --color-primary-hover: #6B6159;
    --color-secondary: #A3968F;
    --color-light-bg: #fdfdfb;
    --color-light-accent: #E6E2D3;
    --color-text-light: #f1f1f1;
    --color-marron-claro: #c8a27a; 
}

/* ============================================ */
/* 2. ESTILOS BASE Y TIPOGRAFÍA */
/* ============================================ */
body {
    background-color: var(--color-light-bg);
    color: var(--color-darkest);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-darkest); 
    font-weight: 500;
}

a, .btn-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover, .btn-link:hover {
    color: var(--color-primary-hover);
    text-decoration: underline;
}

/* ============================================ */
/* 3. NAVEGACIÓN STICKY (CONTRASTE FIX) */
/* ============================================ */
.navbar-custom {
    background-color: rgba(0, 0, 0, 0.4) !important;
    transition: background-color 0.4s ease, box-shadow 0.4s ease;
    padding-top: 15px;
    padding-bottom: 15px;
    z-index: 1040;
}

.navbar-custom.scrolled {
    background-color: #ffffff !important; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.navbar-custom.scrolled .nav-link {
    color: var(--color-darkest) !important;
}

.offset-navbar {
    top: 42px !important;
}

/* ============================================ */
/* 4. HERO Y SLIDER (EFECTO ZARA - SIN RECORTES) */
/* ============================================ */
/* 1. FIJAMOS LA ALTURA ESTRICTA EN LOS CONTENEDORES PRINCIPALES */
#heroSlider, .carousel-inner, .hero-category-section {
    height: 85vh; /* CRÍTICO: height en vez de min-height para bloquear el rebote */
    max-height: 1000px; 
    background-color: var(--color-light-accent);
    overflow: hidden; /* Corta cualquier desbordamiento en la transición */
}

/* 2. CADA SLIDE OCUPA EXACTAMENTE EL 100% DE ESE ESPACIO */
.carousel-item {
    height: 100%;
    background-color: var(--color-light-accent);
    /* Quitamos el flex de aquí para no romper la transición nativa de Bootstrap */
}

/* 3. LA IMAGEN ABSOLUTA (Tu efecto Zara intacto) */
.carousel-img-container {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    /* CRÍTICO: Muestra la foto entera sin cortar cabezas */
    background-size: contain !important; 
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.text-shadow { 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8) !important; 
}

/* 4. COMPORTAMIENTO EN MÓVIL (Fijamos la altura también) */
@media (max-width: 768px) { 
    #heroSlider, .carousel-inner, .hero-category-section {
        height: 60vh; /* Altura fija para móviles. Ajusta este número si lo ves muy alto/bajo */
    }
    .carousel-img-container { 
        background-size: cover !important; /* En móvil prefieres llenar pantalla */
    }
}

/* ============================================ */
/* 5. CARDS DE PRODUCTO Y COLECCIÓN */
/* ============================================ */
.card {
    border: none;
    transition: box-shadow 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.card-img-top {
    width: 100%;
    height: 350px; 
    object-fit: contain; 
    background-color: var(--color-light-accent);
}

.btn-dark {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-light); 
}

/* ============================================ */
/* 6. SECCIÓN TOTAL LOOKS (FOTOS GRANDES) */
/* ============================================ */
.total-look-card .total-look-img, 
.look-card-image-container {
    width: 100%;
    height: 100%; /* Altura imponente para PC */
    object-fit: contain !important; 
    background-color: var(--color-light-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.look-card-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (max-width: 768px) {
    .total-look-card .total-look-img, 
    .look-card-image-container {
        height: 500px; /* Ajuste para que no sea excesivo en móvil */
    }
}

/* ============================================ */
/* 7. GALERÍA UNIVERSO SONIA B (CON VÍNCULOS) */
/* ============================================ */
.gallery-square-item { 
    padding-bottom: 100%; 
    position: relative; 
    overflow: hidden; 
    border-radius: 8px; 
}

.gallery-square-item img { 
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.3s ease;
}

.gallery-square-item:hover img {
    transform: scale(1.05);
}

.gallery-link-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 8px;
    font-size: 0.85rem;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-square-item:hover .gallery-link-overlay {
    opacity: 1;
}

/* ============================================ */
/* 8. FIX AJAX (LIMPIEZA DE MARCOS DE ERROR) */
/* ============================================ */
#ajaxProductContainer {
    min-height: 100px;
    border: none !important; /* Elimina cualquier marco rojo o borde */
    outline: none !important;
}

/* ============================================ */
/* 9. OTROS BLOQUES Y UTILIDADES */
/* ============================================ */
.home-block-img { width: 100%; height: 60vh; object-fit: cover; }
.bg-light { background-color: var(--color-light-accent) !important; }
.bg-dark { background-color: var(--color-darkest) !important; }
.bg-marron { background-color: var(--color-marron-claro) !important; }

/* Ajuste para las miniaturas en la página de producto/look */
.look-image-thumbnail { 
    width: 100%; 
    height: 120px; 
    object-fit: cover; 
    cursor: pointer; 
    border: 2px solid transparent; 
}
.look-image-thumbnail.active { border-color: var(--color-primary); }

/* --- ESTILOS POPUP REBAJAS --- */
.rebajas-popup-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: none; /* Se activa por JS */
    align-items: center;
    justify-content: center;
}

.rebajas-popup-content {
    position: relative;
    max-width: 500px;
    width: 90%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    animation: fadeInScale 0.4s ease-out;
}

.rebajas-close-btn {
    position: absolute;
    top: 10px; right: 15px;
    background: white; border: none;
    font-size: 30px; line-height: 1;
    cursor: pointer; z-index: 10;
    border-radius: 50%; width: 40px; height: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* /assets/css/style.css - ACTUALIZADO */

/* 1. MOVER WHATSAPP A LA IZQUIERDA */
.whatsapp-float, .whatsapp-btn, .whatsapp-fixed {
    left: 25px !important;
    right: auto !important;
}

/* 2. ASISTENTE IA CON AVISO */
#aiChatContainer {
    position: fixed;
    bottom: 25px; 
    right: 25px; 
    width: 320px; 
    background: #ffffff;
    border-radius: 16px; 
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0,0,0,0.12);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

#aiChatContainer.chat-minimized {
    height: 55px; width: 220px; cursor: pointer;
}

#chatHeader {
    background: var(--color-primary); /* #8E7C6F */
    color: #fff; padding: 14px 18px;
    display: flex; align-items: center; font-size: 0.9rem;
}

/* Notificación de aviso */
#chatNotification {
    background: #e74c3c; color: white;
    width: 20px; height: 20px;
    border-radius: 50%; font-size: 11px;
    display: flex; align-items: center; justify-content: center;
    margin-left: 10px;
    animation: pulseNotif 2s infinite;
}

@keyframes pulseNotif {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 10px rgba(231, 76, 60, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

#chatBody { height: 400px; display: flex; flex-direction: column; background: #fdfdfb; }
#chatMessages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }

.msg { padding: 10px 14px; border-radius: 18px; max-width: 85%; font-size: 0.88rem; }
.msg.bot { background: var(--color-light-accent); color: var(--color-darkest); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--color-darkest); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }

.chat-input-wrapper { padding: 15px; border-top: 1px solid #f0f0f0; display: flex; gap: 8px; background: #fff; }
#chatInput { flex: 1; border: 1px solid #e0e0e0; border-radius: 20px; padding: 8px 15px; outline: none; }
#chatSendBtn { background: var(--color-primary); color: #fff; border: none; border-radius: 50%; width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; }

/* 3. POPUP REBAJAS */
.rebajas-popup-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 99999;
    display: none; align-items: center; justify-content: center;
}
.rebajas-popup-content {
    position: relative; max-width: 500px; width: 90%; background: #fff;
    border-radius: 8px; overflow: hidden; animation: fadeInScale 0.4s;
}
.rebajas-close-btn {
    position: absolute; top: 10px; right: 15px; background: #fff;
    border: none; font-size: 30px; border-radius: 50%; width: 40px; height: 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
@keyframes fadeInScale { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

/* RESTO DE TUS ESTILOS ORIGINALES ABAJO */