/* ==========================================================================
   PSX Printer Solutions Xpress - Estilos del Catálogo (Metodología BEM)
   Google Ads Compliant - Sin Marcas ni Términos Prohibidos
   ========================================================================== */

/* 1. SECCIÓN HERO DEL CATÁLOGO */
.catalog-hero {
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
    color: #FFFFFF;
    padding: 3.5rem 0 3rem 0;
    text-align: center;
    border-bottom: 3px solid #0284C7;
}

.catalog-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(2, 132, 199, 0.2);
    color: #38BDF8;
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.catalog-hero__title {
    font-size: 2.3rem;
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.catalog-hero__title span {
    color: #38BDF8;
}

.catalog-hero__subtitle {
    font-size: 1.05rem;
    color: #94A3B8;
    max-width: 750px;
    margin: 0 auto 2rem auto;
    line-height: 1.6;
}

/* NAVEGACIÓN RÁPIDA DE CATEGORÍAS */
.catalog-nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.catalog-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.08);
    color: #F1F5F9;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.catalog-nav__link:hover {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #0284C7;
    transform: translateY(-2px);
}

/* 2. ESTRUCTURA DE CATEGORÍAS (BEM) */
.catalog {
    padding: 3rem 0;
    background-color: #F8FAFC;
}

.catalog__category {
    margin-bottom: 3.5rem;
}

.catalog__category:last-child {
    margin-bottom: 1rem;
}

/* ENCABEZADO DE CATEGORÍA DESTACADO EN AZUL */
.catalog__category-header {
    background: linear-gradient(135deg, #0284C7 0%, #1D4ED8 100%);
    color: #FFFFFF;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.25);
}

.catalog__category-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.catalog__category-title i {
    font-size: 1.2rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
}

.catalog__category-count {
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

/* 3. CARRUSEL DE PRODUCTOS (BEM) */
.product-carousel {
    position: relative;
    padding: 0 0.5rem;
}

.product-carousel__viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 12px;
    padding: 0.5rem 0;
}

.product-carousel__track {
    display: flex;
    gap: 1.25rem;
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform;
}

.product-carousel__item {
    flex: 0 0 calc(25% - 0.94rem); /* 4 ítems por fila en desktop */
    min-width: 0;
}

/* BOTONES DE NAVEGACIÓN DEL CARRUSEL */
.product-carousel__btn {
    position: absolute;
    top: calc(50% - 22px);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #FFFFFF;
    color: #0F172A;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
    font-size: 1.1rem;
}

.product-carousel__btn:hover {
    background: #0284C7;
    color: #FFFFFF;
    border-color: #0284C7;
    transform: scale(1.08);
}

.product-carousel__btn--prev {
    left: -18px;
}

.product-carousel__btn--next {
    right: -18px;
}

.product-carousel__btn--disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* INDICADORES (DOTS) DEL CARRUSEL */
.product-carousel__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
}

.product-carousel__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #CBD5E1;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.product-carousel__dot--active {
    width: 24px;
    border-radius: 10px;
    background: #0284C7;
}

/* 4. TARJETA DE PRODUCTO (BEM) */
.product-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12);
    border-color: #BAE6FD;
}

.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #10B981;
    color: #FFFFFF;
    font-size: 0.725rem;
    font-weight: 700;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.product-card__image-box {
    width: 100%;
    height: 180px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow: hidden;
}

.product-card__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.product-card:hover .product-card__image {
    transform: scale(1.05);
}

.product-card__content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card__category-tag {
    font-size: 0.775rem;
    font-weight: 600;
    color: #0284C7;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

.product-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 0.5rem 0;
    line-height: 1.35;
    min-height: 2.7rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__description {
    font-size: 0.875rem;
    color: #64748B;
    margin: 0 0 1.2rem 0;
    line-height: 1.5;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card__footer {
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid #F1F5F9;
}

.product-card__stock {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #059669;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.product-card__btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: #25D366;
    color: #FFFFFF;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25);
}

.product-card__btn-whatsapp:hover {
    background-color: #1EBE5D;
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

.product-card__btn-whatsapp i {
    font-size: 1.1rem;
}

/* RESPONSIVE BREAKPOINTS PARA EL CARRUSEL */
@media (max-width: 1024px) {
    .product-carousel__item {
        flex: 0 0 calc(33.333% - 0.84rem); /* 3 ítems por fila */
    }
}

@media (max-width: 768px) {
    .catalog-hero__title {
        font-size: 1.75rem;
    }
    
    .product-carousel__item {
        flex: 0 0 calc(50% - 0.625rem); /* 2 ítems por fila */
    }
    
    .product-carousel__btn--prev {
        left: -10px;
    }
    
    .product-carousel__btn--next {
        right: -10px;
    }
    
    .catalog__category-header {
        padding: 0.85rem 1.1rem;
    }
    
    .catalog__category-title {
        font-size: 1.15rem;
    }
}

@media (max-width: 480px) {
    .product-carousel__item {
        flex: 0 0 100%; /* 1 ítem completo en pantalla pequeña */
    }
    
    .catalog-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .catalog-nav__link {
        justify-content: center;
    }
}
