* {
    margin: 0;
    padding: 0;
}
  
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}
  
.container * {
    box-sizing: border-box;
}

.container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    gap: 30px;
}
  
  /* Filters Sidebar */
.filtres {
    overflow: auto;
    position: absolute;
    width: 280px;
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    height: calc(100vh - 110px);
}
  
#filtre {
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.filter-group {
    margin-bottom: 24px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}
  
.filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
  
.filter-group h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    color: #4a4a4a;
}
  
  /* Checkbox Styles */
.checkbox-container {
    display: block;
    position: relative;
    padding: 8px 0;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}
  
.checkbox-container input {
    margin-right: 8px;
}
  
  /* Size Buttons */
.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.size-grid input {
    display: none;
}

.size-grid input:checked ~ label {
    border: #8a8a8a40 2px solid;
	box-shadow: inset 4px 4px 5px #8a8a8a;
}
  
.size-grid div {
    text-align: center;
    border: 1px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.size-label {
    border: #000 2px solid;
    border-radius: 6px;
    padding: 8px;
    display: block;
    width: 100%;
}
  
.size-label:hover {
    background: #f5f5f5;
}
  
  /* Color Options */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-options div {
    display: flex;
}
  
.color-label {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: transform 0.2s;
}

#colors input {
    display: none;
}

label[for="red"] { background: red; }
label[for="blue"] { background: blue; }
label[for="black"] { background: black; }
label[for="purple"] { background: purple; }
label[for="green"] { background: green; }
label[for="orange"] { background: orange; }
label[for="yellow"] { background: yellow; }
label[for="pink"] { background: pink; }
label[for="white"] { background: white; border: 1px solid black; }
label[for="brown"] { background: #644117; }
label[for="grey"] { background: grey; }

#colors div input:checked ~ label {
    transform: scale(1.2);
}
  
.color-label:hover {
    transform: scale(1.1);
}
  
  /* Results Section */
.results {
    height: calc(100vh - 110px);
    overflow: auto;
    margin-left: 300px;
    flex: 1;
}

.filter-title {
    cursor: pointer;
    margin-bottom: 12px;
    color: #4a4a4a;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
}

.filter-title span {
    font-size: 1.2rem;
    font-weight: normal;
}

.toggle:checked ~ .checkbox-container {
    display: block;
}

.toggle:checked ~ .size-grid {
    display: grid;
}

.toggle:checked ~ .color-options {
    display: flex;
}

.filter-title span::before {
    content: "+";  
}

.toggle:checked + .filtre-title span::before{
    content: "-";
}

#filtre span::before {
    content: "-";
}

.toggle:checked + #filtre span::before {
    content: "+";
}

.toggle:checked + .filtre-title span::before {
    content: "-";
}

#toggle-filtre:checked ~ .filter-group {
    display: none;
}

.checkbox-container, .size-grid, .color-options {
    display: none;
}
  
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
  
.results-header h1 {
    font-size: 1.8rem;
    color: #1a1a1a;
}
  
.sort-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    color: #666;
}
  
  /* Products Grid */
.products-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
  
.product-card {
    text-decoration: none;
    color: #000;
    width: 250px;
    height: 400px;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #ddd;
    padding: 10px;
    box-sizing: border-box;
}
  
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
  
.product-card img {
    width: 100%;
    object-fit: cover;
    display: block;
}
  
.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    text-align: center;
}
  
.product-info h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: #1a1a1a;
}
  
.price {
    font-weight: bold;
    color: #2c5282;
    margin-bottom: 4px;
}

@media (max-width: 1130px) {
    .results-header {
        flex-direction: column;
    }

    .container {
        flex-direction: column;
    }

    .filtres {
        position: relative;
        height: max-content;
        width: 100%;
    }

    .filtres h2 {
        margin-bottom: 1rem;
    }

    .filtres .checkbox-container {
        margin-right: 1rem;
        display: inline;
    }

    .toggle:checked ~ .checkbox-container {
        display: none;
        margin-right: 1rem;
    }

    .results {
        margin: 0;
    }

    .results-header h1 {
        font-size: 1.25rem;
    }

    .products-grid {
        justify-content: center;
    }

    .size-grid {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .size-grid div {
        width: 5rem;
    }

    .toggle:checked ~ .size-grid {
        display: none;
    }

    .toggle:checked ~ .color-options {
        display: none;
    }

    #filtre span::before {
        content: "+";
    }
    
    .toggle:checked + #filtre span::before {
        content: "-";
    }

    .filter-group {
        display: none;
    }

    #toggle-filtre:checked ~ .filter-group {
        display: inherit;
    }
}