/* =========================================
   HERO DEL CATÁLOGO
========================================= */
.hero-catalogo {
    background: linear-gradient(135deg, rgba(43, 50, 69, 0.95) 0%, rgba(26, 30, 41, 0.95) 100%), url('../imagenes/fondo_deporte.jpg') center/cover;
    padding: 100px 20px 80px 20px;
    text-align: center;
    color: white;
}
.hero-catalogo h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 20px;
}
.hero-catalogo h1 span {
    color: var(--rojo-levalier);
}
.hero-catalogo p {
    font-size: 1.2rem;
    color: #cbd0d8;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* =========================================
   BARRA DE FILTROS PEGAJOSA
========================================= */
.contenedor-filtros {
    position: sticky;
    top: 70px; /* Queda justo debajo de la barra de navegación */
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #eee;
    z-index: 900;
    padding: 15px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}
.filtros-scroll {
    width: 90%;
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    padding: 0;
    overflow-x: auto;
    scrollbar-width: none;
}
.filtros-scroll::-webkit-scrollbar { display: none; } /* Oculta scrollbar en Chrome */

.btn-filtro {
    background-color: #f0f2f5;
    color: var(--texto-gris);
    border: none;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s ease;
}
.btn-filtro:hover { background-color: #e2e5ea; }
.btn-filtro.activo {
    background-color: var(--azul-levalier);
    color: white;
    box-shadow: 0 4px 10px rgba(43, 50, 69, 0.2);
}

/* =========================================
   GRILLA DE PRODUCTOS
========================================= */
.contenedor-catalogo {
    width: 90%; /* Misma proporción que la página principal */
    max-width: 1600px;
    margin: 0 auto;
    padding: 50px 0 100px 0;
}
.grupo-deporte { margin-bottom: 60px; }

/* Títulos con línea decorativa */
.titulo-deporte {
    font-size: 2.2rem;
    color: var(--azul-levalier);
    font-weight: 800;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 20px;
}
.linea-deporte {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, var(--rojo-levalier), transparent);
}
.titulo-prenda {
    font-size: 1.3rem;
    color: var(--texto-gris);
    margin-bottom: 20px;
    padding-left: 10px;
    border-left: 4px solid var(--rojo-levalier);
}

/* La Grilla CSS: Magia responsiva automática */
.grilla-productos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* =========================================
   TARJETAS DE PRODUCTO PREMIUM
========================================= */
.tarjeta-producto {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border: 1px solid #f0f2f5;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}
.tarjeta-producto:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #dce1eb;
}

/* Espacio temporal para tus fotos (Mantiene proporción 4:5 perfecta) */
.imagen-placeholder {
    width: 100%;
    aspect-ratio: 4 / 5;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #adb5bd;
    font-weight: bold;
    font-size: 1.2rem;
    transition: transform 0.5s ease;
}
/* Efecto de Zoom al pasar el mouse por la foto */
.tarjeta-producto:hover .imagen-placeholder {
    transform: scale(1.03);
}

/* =========================================
   CARRUSEL DE IMÁGENES (ESTILO INSTAGRAM)
========================================= */
.carrusel-producto {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden; /* Esconde las fotos que están hacia los costados */
}

.pista-carrusel {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.carrusel-producto .imagen-placeholder {
    min-width: 100%; /* Obliga a cada foto a ocupar todo el ancho */
    height: 100%;
}

/* Botones (Flechas) */
.btn-carrusel {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.85);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--azul-levalier);
    font-size: 1rem;
    opacity: 0; /* Ocultas por defecto */
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

/* Las flechas aparecen solo al pasar el mouse por encima de la foto */
.carrusel-producto:hover .btn-carrusel { opacity: 1; }
.btn-carrusel.prev { left: 10px; }
.btn-carrusel.next { right: 10px; }
.btn-carrusel:hover { background: white; transform: translateY(-50%) scale(1.1); }

/* Puntitos indicadores */
.indicadores-carrusel {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}
.punto {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}
.punto.activo {
    background: white;
    transform: scale(1.4);
}

.info-producto {
    padding: 25px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white; /* Asegura que el zoom de la foto no se escape */
    z-index: 2;
}

.etiquetas { margin-bottom: 12px; }
.tag-tech {
    background-color: rgba(43, 50, 69, 0.05);
    color: var(--azul-levalier);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.info-producto h4 {
    font-size: 1.4rem;
    color: var(--azul-levalier);
    margin-bottom: 10px;
    font-weight: 800;
}
.info-producto p {
    font-size: 0.95rem;
    color: var(--texto-gris);
    line-height: 1.6;
    margin-bottom: 25px;
    flex: 1; /* Empuja los botones hacia abajo */
}

/* Botones de Acción */
.acciones-producto {
    display: flex;
    gap: 10px;
    flex-direction: column;
}
.btn-accion {
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.primario {
    background-color: var(--azul-levalier);
    color: white;
}
.primario:hover { background-color: var(--rojo-levalier); }
.secundario {
    background-color: #25D366;
    color: white;
}
.secundario:hover { background-color: #1ebd5a; }

/* Animación para que los filtros suban cuando el menú se oculta */
.contenedor-filtros {
    transition: top 0.3s ease-in-out;
}
.contenedor-filtros.tope {
    top: 0 !important; 
}

/* Adaptación a celulares */
@media (max-width: 768px) {
    .hero-catalogo h1 { font-size: 2.8rem; }
    .contenedor-filtros { top: 60px; } /* Ajuste de altura de barra en móviles */
    .filtros-scroll { padding: 0 15px; }
    .titulo-deporte { font-size: 1.8rem; }
    .grilla-productos { grid-template-columns: 1fr; gap: 20px; }
}

/* =========================================
   ADAPTACIONES PARA MONITORES GRANDES (CATÁLOGO)
   (Escalado estricto y proporcional completo)
========================================= */

/* --- Pantallas Medias / Notebooks / 1080p con Escala (> 1200px) --- */
@media (min-width: 1200px) {
    /* Atrapamos tu monitor y forzamos las 4 columnas */
    .grilla-productos { 
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 2.5vw; 
    }
}

/* --- Pantallas Grandes (> 1440px) --- */
@media (min-width: 1440px) {
    /* Liberamos el ancho máximo para que la página pueda estirarse */
    .hero-catalogo-contenido, .filtros-scroll, .contenedor-catalogo { 
        max-width: 90vw !important; 
    }
    .grilla-productos { 
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 3vw; 
    }
}

/* --- Monitores Muy Grandes (> 1900px) --- */
@media (min-width: 1900px) {
    /* Escalado de textos y márgenes de la tarjeta */
    .titulo-deporte { font-size: 2.5vw; margin-bottom: 1.5vw; gap: 1vw; }
    .titulo-prenda { font-size: 1.5vw; margin-bottom: 1vw; }
    
    .info-producto { padding: 1.5vw; }
    .info-producto h4 { font-size: 1.2vw; margin-bottom: 0.8vw; }
    .info-producto p { font-size: 0.9vw; line-height: 1.6; margin-bottom: 1.5vw; }
    .tag-tech { font-size: 0.7vw; padding: 0.4vw 0.8vw; border-radius: 1vw; }

    /* Escalado de los botones pegajosos */
    .btn-filtro { 
        font-size: 0.8vw; 
        padding: 0.6vw 1.5vw; 
        border-radius: 2vw; 
    }
}

/* --- Pantallas 4K y Ultra Wide (> 2500px) --- */
@media (min-width: 2500px) {
    /* Hero */
    .hero-catalogo { padding: 8vw 2vw 6vw 2vw; }
    .hero-catalogo h1 { font-size: 4vw; margin-bottom: 1.5vw; }
    .hero-catalogo p { font-size: 1.2vw; max-width: 50vw; line-height: 1.6; }

    /* Barra de filtros (Botones pegajosos) */
    .contenedor-filtros { top: 3.5vw; padding: 1vw 0; border-bottom-width: 0.1vw; }
    .btn-filtro { font-size: 0.7vw; padding: 0.6vw 1.8vw; border-radius: 2vw; }

    /* Tarjetas y detalles */
    .contenedor-catalogo { padding: 4vw 0 8vw 0; }
    .tarjeta-producto { border-radius: 1vw; border-width: 0.1vw; box-shadow: 0 0.5vw 2vw rgba(0,0,0,0.05); }
    .tarjeta-producto:hover { transform: translateY(-0.8vw); box-shadow: 0 1.5vw 3vw rgba(0,0,0,0.1); }
    
    /* Grilla estricta en 4K */
    .grilla-productos { 
        gap: 2.5vw; 
        margin-bottom: 3vw; 
        grid-template-columns: repeat(4, 1fr) !important; 
    }

    /* Escalado del carrusel para monitores 4K */
    .btn-carrusel { width: 2.5vw; height: 2.5vw; font-size: 1vw; }
    .btn-carrusel.prev { left: 0.8vw; }
    .btn-carrusel.next { right: 0.8vw; }
    .indicadores-carrusel { bottom: 1vw; gap: 0.5vw; }
    .punto { width: 0.4vw; height: 0.4vw; }
}

/* --- Adaptación del carrusel para celulares --- */
@media (max-width: 768px) {
    .btn-carrusel {
        opacity: 0.8; /* Siempre visibles, un poco transparentes para no tapar la ropa */
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    .btn-carrusel:active {
        background: white;
        opacity: 1;
    }
}

/* =========================================
   BARRA DE FILTROS Y CONTROLES SLIDER (PREMIUM)
========================================= */

/* Contenedor central que encierra flechas y botones */
.filtros-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 90vw; /* Mismo margen y alineación exacta del catálogo */
    margin: 0 auto;
    position: relative;
    gap: 12px;
}

/* Tira deslizable de botones */
.filtros-scroll {
    flex: 1; /* Ocupa todo el espacio central disponible */
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    padding: 6px 0;
}

.filtros-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

/* Botones de flecha: Estética Deportiva Minimalista */
.flecha-filtro {
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #111111;
    color: #ffffff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.25s ease, 
                background-color 0.2s ease;
}

.flecha-filtro:hover {
    background-color: #2a2a2a;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}

.flecha-filtro:active {
    transform: scale(0.92);
}

/* Estado oculto: desvanece suavemente sin romper la estructura */
.flecha-filtro.oculto {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: scale(0.7);
}

/* En celulares se apagan porque la navegación es con el dedo */
@media (max-width: 768px) {
    .flecha-filtro {
        display: none !important;
    }
    .filtros-wrapper {
        max-width: 95vw;
    }
}

/* Escalado proporcional para monitores grandes (> 1900px) */
@media (min-width: 1900px) {
    .filtros-wrapper { gap: 0.8vw; }
    
    .flecha-filtro {
        width: 2.2vw;
        height: 2.2vw;
        font-size: 0.8vw;
    } /* <-- ESTA ES LA LLAVE QUE FALTABA */
}