/* ==============================================
   MODAL DE CATEGORÍAS DE PRODUCTOS - CARRUSELES
   ============================================== */

/* Adaptación del estilo timeline para productos */
.category-section {
    margin-bottom: 3rem !important;
}

.category-section:last-child {
    margin-bottom: 0 !important;
}

/* Año de categoría (usa la clase del timeline) */
.category-year {
    font-size: 1.8rem !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
    text-align: center;
    margin-bottom: 1rem;
}

/* Wrapper del carrusel para productos */
.category-carousel-wrapper {
    position: relative;
    padding: 0 3rem;
    width: 100%;
}

/* Carousel de categorías usa las clases del timeline */
.category-carousel {
    overflow: hidden;
    border-radius: 8px;
    width: 100%;
}

.category-track {
    display: flex !important;
    gap: 2rem !important;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 1rem 0;
    will-change: transform;
}

/* Cards de productos usando estructura timeline */
.product-card {
    flex: 0 0 calc(50% - 1rem) !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    min-height: 300px;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Imagen del producto con estilo timeline */
.product-image {
    border-radius: 8px;
    overflow: hidden;
    background: transparent !important; /* totalmente transparente */
}

.product-image img {
    width: 100%;
    height: 140px; /* Antes 300px */
    object-fit: contain;
    padding: 0.5rem;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Info del producto */
.product-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.product-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1.3;
    margin: 0;
}

.product-info p {
    font-size: 1rem;
    color: var(--color-text);
    line-height: 1.6;
    margin: 0;
}

/* Scroll personalizado para el modal body */
.categories-scroll {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 1rem;
}

.categories-scroll::-webkit-scrollbar {
    width: 8px;
}

.categories-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

.categories-scroll::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 4px;
}

.categories-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* Botones de navegación del timeline adaptados */
.timeline-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    background: var(--color-primary, #009490);
    color: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 3px 16px rgba(36,75,90,0.18), 0 1px 2px rgba(0,0,0,0.08);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    opacity: 0.92;
}
.timeline-nav:hover {
    background: var(--color-accent, #ffda00);
    color: var(--color-primary, #009490);
    transform: translateY(-50%) scale(1.17);
    box-shadow: 0 6px 24px rgba(36,75,90,0.28), 0 2px 8px rgba(0,0,0,0.18);
    opacity: 1;
}
.timeline-nav--prev { left: 0; }
.timeline-nav--next { right: 0; }

.timeline-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==============================================
   RESPONSIVE DESIGN
   ============================================== */

/* Tablets grandes */
@media (max-width: 1200px) {
    .product-card {
        flex: 0 0 calc(50% - 1rem) !important;
    }
    
    .product-image img {
        height: 110px;
    }
}

/* Tablets */
@media (max-width: 768px) {
    .category-carousel-wrapper {
        padding: 0 2.5rem;
    }

    .product-card {
        flex: 0 0 100% !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 1.5rem;
    }

    .product-image img {
        height: 120px;
    }

    .category-year {
        font-size: 1.5rem !important;
    }

    .product-info {
        text-align: center;
    }

    .product-info h4 {
        font-size: 1.3rem;
    }

    .product-info p {
        font-size: 1.1rem;
    }
    .timeline-nav { width: 38px; height: 38px; font-size: 19px; }
}

/* Móviles */
@media (max-width: 480px) {
    .category-section {
        margin-bottom: 2rem !important;
    }

    .category-carousel-wrapper {
        padding: 0 2rem;
    }

    .product-card {
        padding: 1.5rem;
        min-height: auto;
    }

    .product-image img {
        height: 100px;
    }

    .category-year {
        font-size: 1.4rem !important;
    }

    .product-info {
        text-align: center;
    }

    .product-info h4 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .product-info p {
        font-size: 1rem;
    }

    .categories-scroll {
        max-height: 60vh;
    }
    .timeline-nav { width: 32px; height: 32px; font-size: 15px; }
}

/* Animación de entrada para los productos */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: fadeInUp 0.5s ease-out;
}

.modal-title--fancy {
    color: #009490 !important;
    font-family: var(--font-family-heading, 'Montserrat', sans-serif);
    font-size: 2.5rem;
    text-align: center;
    font-weight: 900;
    margin-bottom: 2.5rem;
    margin-top: 0.2em;
    letter-spacing: -1px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
    text-shadow: 0 6px 24px rgba(36,75,90,.07), 0 0px 2px rgba(0,0,0,0.07);
    position: relative;
}
.modal-title--fancy::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    margin: 1rem auto 0 auto;
    background: linear-gradient(90deg,#ffd900 0,#009490 100%);
    border-radius: 2px;
    opacity: 0.8;
    box-shadow: 0 2px 8px #ffd90044;
}
@media (max-width: 600px) {
  .modal-title--fancy{
    font-size:1.35rem;
    margin-bottom:1.2rem
  }
  .modal-title--fancy::after{
    width:60px;height:3px;
  }
}

/* ÚNICO FONDO para el modal de Categorías */
#categoriesModal .modal__content {
    background: transparent !important;
    position: relative;
}
#categoriesModal .modal__content::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url('../images/fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
/* Sin overlay adicional */
#categoriesModal .modal__content::after { content: none !important; }

/* Body del modal completamente transparente, sin overlays */
#categoriesModal .modal__body { background: transparent !important; }
#categoriesModal .modal__body::before { content: none !important; }

/* Tarjeta/section del carrusel completamente transparente, sin fondos ni overlays */
#categoriesModal .category-section {
    background: transparent !important;
}
#categoriesModal .category-section::before { content: none !important; }
#categoriesModal .category-section::after { content: none !important; }

/* Tarjetas de producto 100% transparentes y sin sombra para respetar el único fondo */
#categoriesModal .product-card {
    background: transparent !important;
    box-shadow: none !important;
}

/* Pista del carrusel transparente */
#categoriesModal .category-track { background: transparent !important; }

/* Botones sobre el único fondo (sin cambios de fondo al hover que generen parches) */
#categoriesModal .timeline-nav { background: rgba(0,148,144,0.95); }
#categoriesModal .timeline-nav:hover { background: rgba(255,218,0,0.95); }

