/* Produits Page Styles */
.page-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Catégories principales */
.main-categories-section {
    background: #fff;
    padding: 3rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.main-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    align-items: center;
}

.main-category-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 2rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    font-size: 0.95rem;
    color: #333;
}

.main-category-btn i {
    font-size: 2rem;
    color: #2c3e50;
    transition: color 0.3s ease;
}

.main-category-btn:hover {
    border-color: #2c3e50;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.main-category-btn.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

.main-category-btn.active i {
    color: white;
}

/* Sous-catégories (filtres) */
.sub-filters-section {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.sub-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.sub-filter-btn {
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}

.sub-filter-btn:hover {
    border-color: #2c3e50;
    color: #2c3e50;
    transform: translateY(-2px);
}

.sub-filter-btn.active {
    background: #2c3e50;
    border-color: #2c3e50;
    color: white;
}

.filters-section {
    background: #f8f9fa;
    padding: 2rem 0;
    border-bottom: 1px solid #e5e5e5;
}

.filters {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.search-bar {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.search-bar input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 25px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: #2c3e50;
}

.search-bar i {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid #e5e5e5;
    background: white;
    color: #666;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2c3e50;
    color: white;
    border-color: #2c3e50;
}

.products-section {
    padding: 3rem 0;
    background: white;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.product-info p {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
}

.close:hover {
    color: #2c3e50;
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}

.modal-image {
    height: 400px;
    overflow: hidden;
    position: relative;
    background: #f8f9fa;
}

.image-gallery {
    position: relative;
    width: 100%;
    height: 100%;
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.gallery-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-prev {
    left: 15px;
}

.gallery-next {
    right: 15px;
}

.gallery-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.gallery-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background: white;
    transform: scale(1.2);
}

.gallery-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
}

.modal-info {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.modal-info h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 1.3rem;
    font-weight: 600;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.modal-info p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.modal-features h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.modal-features ul {
    list-style: none;
    padding: 0;
}

.modal-features li {
    padding: 0.3rem 0;
    color: #666;
    position: relative;
    padding-left: 1.5rem;
}

.modal-features li:before {
    content: "âœ“";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

.modal-note {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    font-size: 0.9rem;
    color: #666;
}

.modal-actions {
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }

    .main-categories-section {
        padding: 2rem 0;
    }

    .main-categories {
        gap: 0.75rem;
    }

    .main-category-btn {
        min-width: 100px;
        padding: 1rem 1rem;
        font-size: 0.85rem;
    }

    .main-category-btn i {
        font-size: 1.5rem;
    }

    .sub-filters-section {
        padding: 1.5rem 0;
    }

    .sub-filters {
        gap: 0.5rem;
    }

    .sub-filter-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image {
        height: 250px;
    }

    .modal-info {
        padding: 1.5rem;
    }

    .gallery-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-indicators {
        bottom: 10px;
    }
}

@media (max-width: 480px) {
    .main-category-btn {
        min-width: 80px;
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }

    .main-category-btn i {
        font-size: 1.25rem;
    }

    .sub-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}
