/* =========================================
   STABLE GRID LAYOUT (Desktop & Mobile)
   ========================================= */

.collection-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
}

@media (min-width: 992px) {
    .collection-layout {
        grid-template-columns: 280px 1fr;
        gap: 3rem;
    }
}

/* Sidebar / Drawer Container Una Sola Fuente */
.filter-sidebar {
    background-color: var(--color-bg);
}

@media (min-width: 992px) {
    .filter-sidebar {
        position: sticky;
        top: calc(var(--header-height) + 2rem);
        align-self: start;
        border-right: 1px solid var(--color-border);
        padding-right: 2rem;
    }
}

@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100%;
        max-width: 320px;
        z-index: 2000;
        padding: 1.5rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        border-right: 1px solid var(--color-border);
    }

    .filter-sidebar.active {
        transform: translateX(0);
    }
}

/* Overlay Backdrop */
.filters-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.filters-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Header within Drawer */
.filters-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 1.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

/* =========================================
   Filter Component Styling (Kirdah Inspired)
   ========================================= */

.product-filters-component {
    font-size: 0.9375rem;
}

.filter-group {
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.group-details summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
    color: var(--color-primary);
}

.group-details summary::-webkit-details-marker {
    display: none;
}

.icon-toggle {
    font-size: 1.1rem;
    font-weight: 300;
}

/* Custom Size Badges */
.size-badge-wrapper {
    position: relative;
}

.size-option-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 38px;
    border: 1px solid var(--color-border);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-size-input:checked+.size-option-label {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.size-option-label:hover {
    border-color: var(--color-primary);
}

.btn-size-input {
    display: none;
}

/* Price Inputs */
.price-inputs {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.price-input-group {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    padding: 0 0.75rem;
    flex: 1;
    height: 40px;
    background: white;
}

.price-symbol {
    color: var(--color-text-light);
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.price-field {
    border: none;
    width: 100%;
    height: 100%;
    font-size: 0.875rem;
    outline: none;
    font-family: var(--font-primary);
}

/* Filter Options (Sort) */
.filter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.filter-option input[type="radio"] {
    accent-color: var(--color-primary);
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.filter-option label {
    font-size: 0.875rem;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition);
}

.filter-option:hover label {
    color: var(--color-primary);
}

/* Mobile Trigger Button */
.btn-mobile-filter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background: var(--color-primary);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    margin-bottom: 2rem;
    border-radius: 4px;
}

/* Products Layout Safety */
.products-col {
    min-width: 0;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    padding-top: 3rem;
}

/* Utilities (minimal set) */
.pt-2 {
    padding-top: 0.5rem;
}

.d-lg-none {
    display: block;
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
}