/* Page Header */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Products Section */
.products-page-section {
    padding: 30px 0 80px;
}

/* Sidebar Filters */
.filter-sidebar {
    position: sticky;
    top: 100px;
    background: #fff;
    padding: 30px;
    border: 1px solid whitesmoke;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--text-color);
}

.filter-header h3 {
    font-size: 24px;
    font-weight: 500;
    margin: 0;
}

.filter-clear {
    color: var(--text-color);
    font-size: 13px;
    text-decoration: underline;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-clear:hover {
    color: var(--tertory-color);
}

.filter-group {
    margin-bottom: 35px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--text-color);
}

.filter-group:last-child {
    border-bottom: none;
}

.filter-group-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filter-group-title i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.filter-group-title.collapsed i {
    transform: rotate(-90deg);
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.filter-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-option:hover {
    color: var(--tertory-color);
}

.filter-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 12px;
    cursor: pointer;
    accent-color: var(--tertory-color);
}

.filter-option label {
    font-size: 14px;
    cursor: pointer;
    letter-spacing: 0.3px;
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.filter-count {
    font-size: 13px;
}

/* Price Range Slider */
.price-range-inputs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.price-input {
    flex: 1;
}

.price-input label {
    font-size: 12px;
    margin-bottom: 5px;
    display: block;
}

.price-input input {
    width: 100%;
    padding: 10px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    text-align: center;
    color: var(--text-color);
}

.price-input input:focus{
    border-color:var(--tertory-color);
    outline: none;
}

.no-results{
    display:none;grid-column:1/-1;text-align:center;padding:60px 20px;
}

.no-results-search-icon{
    font-size:1.7rem;margin-bottom:14px;display:block;
}

.price-slider {
    margin: 20px 0;
}

.price-slider input[type="range"] {
    width: 100%;
    height: 6px;
    background: var(--base-color);
    outline: none;
    border-radius: 3px;
}

.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: var(--tertory-color);
    cursor: pointer;
    border-radius: 50%;
}

.price-slider input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--tertory-color);
    cursor: pointer;
    border-radius: 50%;
    border: none;
}

/* Color Swatches */
.color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.color-swatch:hover {
    transform: scale(1.1);
    border-color: #1a1a1a;
}

.color-swatch.active {
    border-color: #d4af37;
    border-width: 3px;
}

.color-swatch.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 14px;
    font-weight: bold;
}

/* Products Header */
.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--tertory-color);
}

.products-count {
    font-size: 14px;
    color: var(--text-color);
    letter-spacing: 0.5px;
}

.products-sort {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sort-dropdown select {
    padding: 10px 40px 10px 15px;
    border: 1px solid #e0e0e0;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    background: var(--base-color);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232c2c2c' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}


/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.pagination-custom {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pagination-custom button,
.pagination-custom span {
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 45px;
    text-align: center;
}

.pagination-custom button:hover {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.pagination-custom button.active {
    background: #1a1a1a;
    color: #fff;
    border-color: #1a1a1a;
}

.pagination-custom button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Mobile Filter Toggle */
.mobile-filter-toggle {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 15px;
    background: #1a1a1a;
    color: #fff;
    padding: 13px 20px;
    border-radius: 30px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
}

.mobile-filter-toggle i {
    margin-right: 8px;
}

.filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
}

.filter-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 1199px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 991px) {
    .filter-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 320px;
        height: 100%;
        overflow-y: auto;
        z-index: 1001;
        transition: left 0.3s ease;
    }

    .filter-sidebar.active {
        left: 0;
    }

    .mobile-filter-toggle {
        display: block;
    }

    .page-header h1 {
        font-size: 38px;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .page-header {
        padding: 40px 0 30px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .products-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .products-sort {
        width: 100%;
        justify-content: space-between;
    }

    .filter-sidebar {
        width: 280px;
    }
}

@media (max-width: 576px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 28px;
    }
}