/* Reset général */
body {
    background-color: #f8f8f8;
    margin: 0;
    padding: 0;
}

/* Conteneur principal */
article > .container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    max-width: 1440px;
    margin: auto;
}

/* Sidebar (Filtre) - Ne change pas */
.filter-container {
    width: 250px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Conteneur des produits */
.products-container {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Carte Produit */
.product-card {
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.product-card:hover {
    transform: translateY(-5px);
}

/* Image du produit en haut */
.product-image {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    background: #f8f8f8;
}

.product-image > a {
    width: 100%;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 1 / 1;
}

/* Détails du produit */
.product-details {
    padding: 15px;
	padding-top: 10px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	flex: 1;
}

.product-details > div:first-child {
	flex: 1;
}

.product-title a {
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
    height: 40px; /* Pour éviter que les cartes produits aient des tailles différentes */
    overflow: hidden;
}

.out-of-stock {
    color: red;
    font-size: 0.9rem;
    font-weight: bold;
}

.product-price {
    font-size: 1rem;
    font-weight: bold;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Boutons d'achat */
.product-actions {
    margin-top: 10px;
}

/* Responsive Design */

@media (min-width: 768px) {
    .product-card {
        max-width: 400px;
    }
}

/* Tablette Portrait */
@media (max-width: 1024px) {
    .container {
        flex-direction: column;
    }
    
    .filter-container {
        width: 100%;
        display: flex;
        justify-content: space-between;
        padding: 10px;
    }

    .products-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .filter-container {
        width: 100%;
        display: block;
        text-align: center;
    }

    .products-container {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        display: none;
    }

    .filter-container.active .filter-bar {
        display: block;
    }

    .filter-toggle {
        display: block;
        text-align: center;
        padding: 10px;
        background: #006400;
        color: white;
        border-radius: 5px;
        cursor: pointer;
    }
}



/* Filter Bar Styling */
.filter-container {
    padding-top: 10px;
}

.filter-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-radius: 8px;
	flex-wrap: wrap;
    width: 100%;
}

/* Individual filter group */
.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #d1d1d1;
}

/* Dropdown Styling */
.custom-select {
    width: 100%;
    min-width: 160px;
    padding: 6px 10px;
    font-size: 14px;
    border: none;
    background: transparent;
    outline: none;
    cursor: pointer;
}

/* Search Input & Button */
.search-group {
    display: flex;
    flex: 1;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #d1d1d1;
    background: white;
}

.custom-input {
    flex: 1;
    border: none;
    padding: 8px 12px;
    font-size: 14px;
    width: 180px;
}

.custom-input:focus {
    border: none;
    outline: none;
}

.custom-btn.search-btn {
	border: none;
    background-color: rgba(var(--primary-color-rgb), .7);
    color: white;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	height: 32px;
	line-height: 16px;
	font-size: 18px;
	width: 32px;
	text-align: center;
	padding: 0;
    margin: 0 4px;
	border-radius: 3px;
}

.custom-btn.search-btn:hover {
    background-color: var(--primary-color);
}

/* Icons
.icon-sort {
    background-image: url('/images/icons/filter.svg');
}

.icon-sort-alt-up {
    background-image: url('/images/icons/sort.svg');
}

.icon-search {
    background-image: url('/images/icons/search.svg');
} */

/* Large Screen Layout */
@media (min-width: 992px) {
    .filter-bar {
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 20px;
    }
    
    .filter-group, .search-group {
        max-width: 220px;
    }
}

/* Mobile Optimization */
@media (max-width: 768px) {
    .filter-group {
        position: absolute;
        width: 39px;
        padding: 8px 9px;
    }

    .filter-bar .filter-group:first-child + div {
        left: 74px;
    }

    .filter-group select {
        position: absolute;
        opacity: 0;
    }

    .search-group {
        margin-left: 88px;
        width: auto;
    }

    .filter-container {
        margin: 15px 0;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    /*
    .filter-group, .search-group {
        width: 100%;
    }*/

    .custom-input {
        width: 100%;
    }
}