/* ESTILOS GENERALES */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: #10171f;
    margin: 0;
    color: #ffffff;
    overflow-x: hidden;
}

/* HEADER */
header {
    text-align: center;
    padding: 35px 10px;
    background: #10171f;
}

.logo {
    width: 65px;
    display: block;
    margin: 0 auto 12px auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5));
}

.titulo {
    font-size: 32px;
    margin: 10px 0 35px 0;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #ffffff;
    font-weight: 800;
}

.subtitulo {
    display: none;
}

/* 1. CONTENEDOR BUSCADOR */
.search-container {
    margin-bottom: 30px;
}

#search {
    width: 100%;
    max-width: 450px;
    padding: 14px 25px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #10171f;
    border: none;
    border-radius: 50px;
    outline: none;
    transition: 0.3s;
}

#search:focus {
    background: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

/* 2. FILTROS PRINCIPALES - ESTILO GLASS */
.filtros-principales {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.filtros-principales button {
    padding: 10px 22px;
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05); 
    color: #ffffff;
    cursor: pointer;
    backdrop-filter: blur(10px); 
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
}

.filtros-principales button.active {
    background: #ffffff; 
    color: #10171f;
    border-color: #ffffff;
}

/* 3. SECCIÓN DE MARCAS */
.contenedor-marcas-scroll {
    position: relative;
    max-width: 1000px;
    margin: 0 auto 25px auto;
    display: flex;
    align-items: center;
    padding: 0 40px; 
}

.grid-marcas {
    display: flex;
    flex-wrap: nowrap; 
    overflow-x: auto; 
    scroll-behavior: smooth;
    gap: 12px;
    padding: 10px 0;
    scrollbar-width: none;
}
.grid-marcas::-webkit-scrollbar { display: none; }

.btn-marca {
    flex: 0 0 auto; 
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    font-size: 11px;
    color: #a0aab4;
    cursor: pointer;
    text-transform: uppercase;
}

.btn-marca.active {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.15);
    border-bottom: 3px solid #ffffff; 
}

/* --- CAMBIO MINIMALISTA EN FLECHAS --- */
.flecha-scroll {
    background: none; 
    border: none; 
    font-size: 22px;
    color: #ffffff;
    cursor: pointer;
    padding: 0 10px;
    transition: 0.3s;
    opacity: 0.6; 
}
.flecha-scroll:hover { 
    opacity: 1; 
    transform: scale(1.2); 
}

/* --- 4. SECCIÓN TESTIMONIOS (CARRUSEL) --- */
.slider-testimonios {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    background: transparent;
}

.slider-track {
    display: flex;
    gap: 20px;
    padding: 0 20px;
    overflow-x: auto; 
    scroll-behavior: smooth;
    scrollbar-width: none;
}
.slider-track::-webkit-scrollbar { display: none; }

.slider-track img {
    flex: 0 0 auto;
    width: 280px; 
    height: 500px; 
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    background: #ffffff;
}

.btn-testimonios {
    display: inline-block;
    padding: 12px 30px;
    background: rgba(255,255,255,0.08);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    font-weight: bold;
    transition: 0.3s;
}

/* --- CATALOGO --- */
#catalogo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 40px;
    max-width: 1600px;
    margin: auto;
}

.card {
    background: #ffffff; 
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.card img { width: 100%; height: 300px; object-fit: contain; }
.card h3 { font-size: 15px; color: #10171f; margin: 15px 0; font-weight: 700; height: 40px; }

.btn {
    background: #10171f;
    color: #ffffff;
    border: none;
    padding: 14px 20px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

/* BOTONES FLOTANTES */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    z-index: 1000;
}
.whatsapp-float img { width: 45px; filter: drop-shadow(0 5px 15px rgba(0,0,0,0.4)); }

#btnArriba {
    position: fixed;
    bottom: 25px;
    right: 25px; 
    background: #ffffff;
    color: #10171f;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    z-index: 1000;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* VISOR */
#visorImagen {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(8, 12, 16, 0.98); display: none; align-items: center; justify-content: center; z-index: 2000;
}

/* =========================================
   NUEVOS ESTILOS: ASISTENTE IA "ENCUENTRA MI PERFUME"
   ========================================= */

/* Botón disparador principal */
.bot-launcher button {
    background: linear-gradient(135deg, #1a1a1a 0%, #000 100%);
    color: #ffffff;
    border: 1px solid rgba(255, 215, 0, 0.5); 
    padding: 16px 35px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s all;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    letter-spacing: 1px;
}

.bot-launcher button:hover {
    border-color: #ffd700;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 215, 0, 0.2);
}

/* Modal del Bot - CORREGIDO PARA SCROLL */
#bot-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95); 
    display: none; 
    justify-content: center; 
    align-items: center;     
    z-index: 3000;
    /* Cambio clave: permitir scroll en el fondo si el contenido es largo */
    overflow-y: auto; 
    padding: 20px 0;
}

/* Contenedor interno - AJUSTADO */
.bot-content {
    width: 90%;
    max-width: 500px;
    background: #10171f;
    border-radius: 20px;
    padding: 25px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    /* Cambio clave: margen auto para que flex trabaje bien con el scroll */
    margin: auto; 
}

/* Botones de las preguntas del Quiz */
.btn-pregunta {
    display: block;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: 600;
    text-align: left;
}

.btn-pregunta:hover {
    background: #ffffff;
    color: #10171f;
    border-color: #ffffff;
}

/* Tarjetas de Resultados IA (Estilo Match) */
.perfume-match-card {
    background: #ffffff !important;
    border-radius: 20px;
    padding: 15px;
    text-align: center;
    border: 3px solid #ffd700; 
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
    transition: 0.3s;
}

.perfume-match-card:hover {
    transform: scale(1.03);
}

/* Spinner de carga */
.loader-ia {
    border: 4px solid rgba(255, 255, 255, 0.1);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border-left-color: #ffd700;
    animation: spin 1s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================= */

@media (max-width: 600px) {
    #catalogo { grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 15px; }
    .card img { height: 180px; }
    .slider-track img { width: 220px; height: 400px; }
    .titulo { font-size: 24px; }
    
    /* Corregido: asegurar que la lista de matches siempre sea una sola columna en móviles */
    #lista-matches { 
        grid-template-columns: 1fr !important; 
        gap: 20px;
    } 
    
    .bot-content {
        padding: 20px 15px;
        width: 95%;
    }
}