/**
 * Override du slider horizontal pour transformer en grille 3 colonnes
 * Ce fichier corrige l'affichage des produits sur les pages catégories
 */

/* ====================
   CONTAINER DU SLIDER - DÉSACTIVÉ
==================== */
.construction-page .products-slider-container,
.category-page .products-slider-container {
    position: relative !important;
}

/* Cacher les flèches du slider */
.construction-page .slider-arrow,
.category-page .slider-arrow,
.slider-arrow.prev-arrow,
.slider-arrow.next-arrow {
    display: none !important;
}

/* ====================
   GRILLE PRODUITS - FORCE 3 COLONNES
==================== */
.construction-page .products-grid.category-products-grid,
.category-page .products-grid.category-products-grid,
.products-grid.category-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow-x: visible !important;
    overflow-y: visible !important;
    scroll-snap-type: none !important;
    -ms-overflow-style: auto !important;
    scrollbar-width: auto !important;
    scroll-behavior: auto !important;
    flex-direction: unset !important;
}

.construction-page .products-grid.category-products-grid::-webkit-scrollbar,
.category-page .products-grid.category-products-grid::-webkit-scrollbar {
    display: none !important;
}

/* ====================
   CARTES PRODUITS
==================== */
.construction-page .product-card.category-product-card,
.category-page .product-card.category-product-card,
.product-card.category-product-card {
    flex: unset !important;
    width: 100% !important;
    max-width: 100% !important;
    scroll-snap-align: none !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    background-color: white !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.08) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 450px !important;
}

.construction-page .product-card.category-product-card:hover,
.category-page .product-card.category-product-card:hover {
    transform: translateY(-6px) !important;
    box-shadow: 0 8px 24px rgba(122, 155, 63, 0.2) !important;
    border-color: #7a9b3f !important;
}

/* ====================
   IMAGE PRODUIT
==================== */
.construction-page .product-card .product-image,
.category-page .product-card .product-image,
.category-product-image {
    width: 100% !important;
    height: 300px !important;
    overflow: hidden !important;
    background: #f8f8f8 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1.5rem !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.construction-page .product-card .product-image img,
.category-page .product-card .product-image img,
.category-product-image img,
.category-product-img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease !important;
}

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

/* ====================
   INFO PRODUIT
==================== */
.construction-page .product-card .product-info,
.category-page .product-card .product-info,
.category-product-info {
    padding: 1.5rem !important;
    background: white !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    gap: 0.75rem !important;
}

.construction-page .product-card .product-title,
.category-page .product-card .product-title,
.category-product-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2a2a1f !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    min-height: 2.8em !important;
}

.product-card.category-product-card:hover .product-title,
.product-card.category-product-card:hover .category-product-title {
    color: #7a9b3f !important;
}

.construction-page .product-card .product-price,
.category-page .product-card .product-price,
.category-product-price {
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    color: #7a9b3f !important;
    margin: 0 !important;
    letter-spacing: -0.01em !important;
}

/* ====================
   RESPONSIVE - TABLETTE
==================== */
@media (max-width: 1024px) {
    .construction-page .products-grid.category-products-grid,
    .category-page .products-grid.category-products-grid,
    .products-grid.category-products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
    }
}

/* ====================
   RESPONSIVE - MOBILE
==================== */
@media (max-width: 768px) {
    .construction-page .products-grid.category-products-grid,
    .category-page .products-grid.category-products-grid,
    .products-grid.category-products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .construction-page .product-card.category-product-card,
    .category-page .product-card.category-product-card,
    .product-card.category-product-card {
        min-height: auto !important;
    }

    .construction-page .product-card .product-image,
    .category-page .product-card .product-image,
    .category-product-image {
        height: 250px !important;
        padding: 1rem !important;
    }
}
