/**
 * Category Pages CSS - Version Finale Professionnelle
 * Construction, Isolation, Décoration, Équipements
 */

/* ====================
   GENERAL
==================== */
body.page main.category-page,
main.category-page {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.page #content,
body.page #wrapper,
body.page #container {
    padding: 0 !important;
    margin: 0 !important;
}

/* ====================
   HERO SECTION
==================== */
.category-hero {
    padding: 5rem 0;
    min-height: 400px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
}

.construction-hero {
    background: linear-gradient(135deg, #8B7355 0%, #A0826D 50%, #B8956A 100%);
}

.isolation-hero {
    background: linear-gradient(135deg, #7B8E6F 0%, #8FA582 50%, #A8BF9A 100%);
}

.decoration-hero {
    background: linear-gradient(135deg, #9B7E6F 0%, #B39482 50%, #CAAD9A 100%);
}

.equipement-hero {
    background: linear-gradient(135deg, #6F7E8B 0%, #8294A0 50%, #9AABB8 100%);
}

.category-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.category-hero-content {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.category-hero-text h1 {
    color: white;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}

.category-hero-text p {
    color: rgba(255,255,255,0.95);
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.category-hero-icon {
    width: 200px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-hero-icon img {
    width: 200px;
    height: 200px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(0,0,0,0.25));
}

/* ====================
   CONTENT
==================== */
.category-content-wrapper {
    background: #f9f6f1;
    padding: 5rem 0;
}

.category-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

.category-intro {
    background: white;
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.category-intro h2 {
    color: #2a2a1f;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.category-intro p {
    color: #3a3a3a;
    font-size: 1.1rem;
    line-height: 1.8;
    margin: 0;
}

/* ====================
   PRODUCT CATEGORIES
==================== */
.product-categories {
    margin-bottom: 4rem;
}

.product-categories .section-title {
    color: #2a2a1f !important;
    font-size: 2.5rem !important;
    font-weight: 800 !important;
    margin-bottom: 3rem !important;
    text-align: center !important;
    background: none !important;
    -webkit-background-clip: initial !important;
    -webkit-text-fill-color: initial !important;
}

.product-category-section {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.category-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #7a9b3f;
}

.category-header-bar h3 {
    color: #2a2a1f;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
}

.view-all-link {
    color: #7a9b3f;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.view-all-link:hover {
    color: #8bb350;
    transform: translateX(4px);
}

/* ====================
   PRODUCTS GRID
==================== */
.category-products-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ====================
   PRODUCT CARD
==================== */
.category-product-card {
    background: white !important;
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 450px !important;
}

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

.category-product-link {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    text-decoration: none !important;
    color: inherit !important;
}

/* ====================
   PRODUCT IMAGE
==================== */
.category-product-image {
    width: 100% !important;
    height: 300px !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;
}

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

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

/* ====================
   PRODUCT INFO
==================== */
.category-product-info {
    padding: 1.5rem !important;
    background: white !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.category-product-title {
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    color: #2a2a1f !important;
    margin: 0 0 1rem 0 !important;
    line-height: 1.4 !important;
    display: block !important;
    min-height: 2.8em !important;
}

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

.category-product-price {
    font-size: 1.3rem !important;
    font-weight: 700 !important;
    color: #7a9b3f !important;
    margin-top: 0.5rem !important;
}

/* ====================
   CTA SECTION
==================== */
.category-cta {
    background: linear-gradient(135deg, #7a9b3f 0%, #8bb350 100%);
    border-radius: 20px;
    padding: 4rem 3rem;
    text-align: center;
    box-shadow: 0 8px 32px rgba(122, 155, 63, 0.3);
}

.cta-content h3 {
    color: white;
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    color: rgba(255,255,255,0.95);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: white;
    color: #7a9b3f;
    padding: 1.25rem 3rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.2);
    background: #f9f6f1;
}

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

    .category-hero-text h1 {
        font-size: 2.75rem;
    }
}

@media (max-width: 768px) {
    .category-products-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    .category-hero {
        padding: 3rem 0;
    }

    .category-hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .category-hero-text h1 {
        font-size: 2rem;
    }

    .category-hero-icon {
        width: 120px;
        height: 120px;
        margin: 0 auto;
    }

    .category-hero-icon img {
        width: 120px;
        height: 120px;
    }

    .category-intro {
        padding: 2rem;
    }

    .product-category-section {
        padding: 1.5rem;
    }

    .category-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .category-product-image {
        height: 250px !important;
    }

    .category-cta {
        padding: 3rem 2rem;
    }

    .cta-content h3 {
        font-size: 1.75rem;
    }
}
