/**
 * Diseño moderno para subcategorías
 */

/* Ocultar subcategorías que aparecen después del loop de productos */
.woocommerce-after-shop-loop .subcategories-list,
.products + .subcategories-list,
.woocommerce .products ~ ul.subcategories-list {
    display: none !important;
}

/* Título SUBCATEGORIAS */
.cv-subcategories-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
    margin: 40px 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
}

.cv-subcategories-title:after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Nombre de la categoría */
.cv-category-name {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    color: #6b7280;
    margin: 10px 0 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Grid de subcategorías */
.subcategories-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    list-style: none;
    padding: 0;
    margin: 30px 0 50px;
}

/* Tarjetas de subcategorías */
.subcategories-list li {
    margin: 0;
    padding: 0;
}

.subcategories-list a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    padding: 20px 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white !important;
    text-decoration: none !important;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Efecto de brillo al pasar el mouse */
.subcategories-list a:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.subcategories-list a:hover:before {
    left: 100%;
}

/* Hover effect */
.subcategories-list a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Iconos para subcategorías (opcional) */
.subcategories-list a:after {
    content: '→';
    margin-left: 8px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

.subcategories-list a:hover:after {
    opacity: 1;
    transform: translateX(0);
}

/* Responsive */
@media (max-width: 768px) {
    .subcategories-list {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 15px;
    }
    
    .cv-subcategories-title {
        font-size: 24px;
    }
    
    .cv-category-name {
        font-size: 18px;
    }
    
    .subcategories-list a {
        font-size: 14px;
        min-height: 80px;
        padding: 15px 10px;
    }
}

@media (max-width: 480px) {
    .subcategories-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Gradientes alternativos para variedad */
.subcategories-list li:nth-child(4n+1) a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.subcategories-list li:nth-child(4n+2) a {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.subcategories-list li:nth-child(4n+3) a {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.subcategories-list li:nth-child(4n+4) a {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.subcategories-list li:nth-child(4n+1) a:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.subcategories-list li:nth-child(4n+2) a:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.subcategories-list li:nth-child(4n+3) a:hover {
    background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
}

.subcategories-list li:nth-child(4n+4) a:hover {
    background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%);
}

