/* Catalog Page Specific Styles */
.catalog-section {
    padding: 4rem 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

.catalog-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.catalog-sidebar {
    position: sticky;
    top: 120px;
    padding: 1.5rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    height: calc(100vh - 140px);
    overflow-y: auto;
}

.catalog-content-wrapper {
    background-color: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.catalog-header {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.catalog-title {
    font-size: 2rem;
    color: var(--dark);
    margin: 0;
    line-height: 1.3;
}

.catalog-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.sort-control {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.sort-control label {
    font-weight: 600;
    color: var(--dark);
}

.sort-control select {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--gray);
    background-color: white;
    color: var(--dark);
    font-size: 0.95rem;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-btn {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    color: var(--gray);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn.active {
    background-color: var(--primary);
    color: white;
}

.view-btn:hover:not(.active) {
    background-color: #e2e8f0;
}

/* Filter Styles */
.sidebar-title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
}

.filter-group {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.filter-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.filter-title {
    font-size: 1rem;
    color: var(--dark);
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    position: relative;
    padding-left: 28px;
    cursor: pointer;
    font-size: 0.95rem;
    color: var(--dark);
    user-select: none;
}

.filter-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: white;
    border: 1px solid var(--gray);
    border-radius: 4px;
    transition: all 0.2s;
}

.filter-option:hover input~.checkmark {
    border-color: var(--primary);
}

.filter-option input:checked~.checkmark {
    background-color: var(--primary);
    border-color: var(--primary);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.filter-option input:checked~.checkmark:after {
    display: block;
}

.filter-option .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Price Range */
.price-range {
    margin-top: 1rem;
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.range-inputs input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray);
    border-radius: 4px;
    text-align: center;
}

.range-inputs span {
    color: var(--gray);
}

.range-slider {
    position: relative;
    height: 4px;
    background-color: #e2e8f0;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.range-slider input[type="range"] {
    position: absolute;
    width: 100%;
    height: 4px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    border: none;
}

.range-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: var(--primary);
    cursor: pointer;
    border: none;
}

/* Filter Actions */
.filter-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.filter-btn {
    flex: 1;
    padding: 0.8rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.filter-btn.apply {
    background-color: var(--primary);
    color: white;
}

.filter-btn.apply:hover {
    background-color: var(--primary-dark);
}

.filter-btn.reset {
    background-color: transparent;
    border: 1px solid var(--gray);
    color: var(--dark);
}

.filter-btn.reset:hover {
    background-color: #f1f5f9;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.products-grid.list-view {
    grid-template-columns: 1fr;
}

.products-grid.list-view .product-card {
    display: flex;
    flex-direction: row;
    height: auto;
}

.products-grid.list-view .product-image {
    width: 300px;
    height: 200px;
    flex-shrink: 0;
}

.products-grid.list-view .product-info {
    flex: 1;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    color: var(--dark);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn:hover:not(:disabled) {
    background-color: var(--primary);
    color: white;
}

.page-numbers {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--light);
    color: var(--dark);
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.page-btn.active {
    background-color: var(--primary);
    color: white;
}

.page-btn:hover:not(.active) {
    background-color: #e2e8f0;
}

/* Mobile Catalog Menu */
.catalog-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    background-color: var(--secondary);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
    gap: 0.5rem;
    align-items: center;
}

.catalog-menu-toggle:hover {
    background-color: #e07d0b;
    transform: translateY(-3px);
}

.catalog-sidebar.mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    padding-top: 80px;
    background-color: white;
}

.catalog-sidebar.mobile.active {
    transform: translateX(0);
}

.catalog-sidebar.mobile .sidebar-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 992px) {
    .catalog-section {
        grid-template-columns: 1fr;
    }

    .catalog-sidebar:not(.mobile) {
        display: none;
    }

    .catalog-menu-toggle {
        display: flex;
    }

    body.menu-catalog-open {
        overflow: hidden;
    }

    body.menu-catalog-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }
}

@media (max-width: 768px) {
    .products-grid.list-view .product-card {
        flex-direction: column;
    }

    .products-grid.list-view .product-image {
        width: 100%;
    }
}

@media (min-width: 993px) {
    .catalog-sidebar.mobile {
        position: sticky;
        transform: none;
        width: auto;
        height: calc(100vh - 140px);
        padding-top: 1.5rem;
    }

    .catalog-sidebar.mobile .sidebar-close {
        display: none;
    }

    .catalog-menu-toggle {
        display: none !important;
    }
}