/* WSPF Modern Cards - CSS EXACTO del letter-size-folders-preview.html */
/* Solo aplicar a nuestros bloques CMS para evitar conflictos con Magento */

/* Aplicar solo dentro de nuestros contenedores */
.products-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Open Sans', sans-serif;
}

.products-container .wspf-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.products-container .product-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 420px;
    perspective: 1000px;
}

.products-container .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0, 107, 180, 0.15);
}

/* Clase para tarjetas clickeables - énfasis visual */
.products-container .product-card.clickeable-card {
    transition: all 0.2s ease;
}

.products-container .product-card.clickeable-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 107, 180, 0.2);
}

.products-container .card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.products-container .product-card.flipped .card-inner {
    transform: rotateY(180deg);
}

.products-container .card-front, 
.products-container .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
}

.products-container .card-back {
    transform: rotateY(180deg);
    background: #006bb4;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: white;
    text-align: center;
    padding: 30px;
}

.products-container .card-back h3 {
    font-size: 18px;
    margin-bottom: 15px;
    font-weight: 600;
}

.products-container .card-back p {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 20px;
}

.products-container .view-product-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
}

.products-container .view-product-btn:hover {
    background: white;
    color: #006bb4;
    text-decoration: none;
}

.products-container .product-image {
    width: 100%;
    height: 280px;
    object-fit: contain;
    padding: 20px;
    background: white;
    transition: transform 0.3s ease;
}

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

/* === MEJORAS DE IMAGEN SOLO PARA NUEVA CLASE custom-dropd === */
.custom-dropd .products-container .product-image {
    object-fit: cover;
    object-position: center;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 8px 8px 0 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.custom-dropd .products-container .product-card:hover .product-image {
    transform: scale(1.08);
    filter: brightness(1.05) contrast(1.02);
}

.custom-dropd .products-container .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: all 0.3s ease;
}

/* Para imágenes PNG con fondo transparente - solo custom-dropd */
.custom-dropd .products-container .product-image[src*=".png"] {
    background: radial-gradient(circle at center, #ffffff 0%, #f8f9fa 70%, #e9ecef 100%);
}

/* === MEJORAS PARA BLOQUES BOOTSTRAP (Business Cards) === */
.custom-dropd .dropdown-list-custom .card-img-top {
    object-fit: cover !important;
    object-position: center !important;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%) !important;
    border-radius: 8px !important;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.3s ease !important;
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
}

.custom-dropd .dropdown-list-custom .card:hover .card-img-top {
    transform: scale(1.08) !important;
    filter: brightness(1.05) contrast(1.02) !important;
}

.custom-dropd .dropdown-list-custom .card {
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
}

.custom-dropd .dropdown-list-custom .card:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 12px 25px rgba(0, 107, 180, 0.15) !important;
}

.products-container .product-info {
    padding: 20px;
    height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.products-container .product-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 42px;
}

.products-container .product-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.products-container .product-category {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.products-container .flip-indicator {
    background: #006bb4;
    color: white;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.products-container .flip-indicator:hover {
    background: #004a8a;
    transform: scale(1.1);
}

.products-container .image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 280px;
    background: linear-gradient(135deg, rgba(0, 107, 180, 0.1) 0%, rgba(0, 107, 180, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.products-container .product-card:hover .image-overlay {
    opacity: 1;
}

.products-container .section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    color: #006bb4;
    margin-bottom: 10px;
}

.products-container .section-subtitle {
    text-align: center;
    font-size: 16px;
    color: #666;
    margin-bottom: 40px;
}

/* Responsive - EXACTO del preview */
@media (max-width: 768px) {
    .products-container .wspf-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 20px;
    }
    
    .products-container {
        padding: 15px;
    }
    
    .products-container .product-card {
        height: 380px;
    }
    
    .products-container .product-image {
        height: 240px;
        padding: 15px;
    }
    
    .products-container .product-info {
        height: 140px;
        padding: 15px;
    }
    
    .products-container .product-title {
        font-size: 15px;
    }
    
    .products-container .section-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .products-container .wspf-products-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .products-container .product-card {
        height: 360px;
    }
    
    .products-container .product-image {
        height: 220px;
        padding: 10px;
    }
    
    .products-container .product-title {
        font-size: 14px;
    }
    
    .products-container .section-title {
        font-size: 24px;
    }
}

/* Asegurar que NO interfiera con elementos nativos de Magento */
/* NO aplicar estilos a: */
/* - .products-wrapper (nativo de Magento) */
/* - .product-items (nativo de Magento) */
/* - .product-item (nativo de Magento) */
/* - .category-products (nativo de Magento) */

/* Solo aplicar a nuestros contenedores específicos */

/* === COMPATIBILIDAD CON BOOTSTRAP Y MAGENTO === */
.dropdown-list-custom .product-card {
    height: 420px;
}

.dropdown-list-custom .card {
    display: none; /* Ocultar las cards Bootstrap viejas */
}

/* === ESTILOS PARA EL CONTENEDOR MAGENTO === */
.cms-block-container .products-container,
.block-static-block .products-container {
    background: transparent;
}

/* === RESET DE ESTILOS DE MAGENTO === */
.page-wrapper .products-container {
    max-width: 1200px;
    margin: 0 auto;
}

.main .products-container {
    padding: 20px;
} 