﻿/* ══════════════════════════════════════════
   CATALOG SEARCH PAGE — New UI
   Matches testui.css design language
══════════════════════════════════════════ */

/* ── Layout ── */
.shop-wrap {
    display: flex;
    min-height: calc(100vh - 58px);
    background: #f8f8f6;
}

/* ══ SIDEBAR ══════════════════════════════ */
.sidebar {
    width: 258px;
    min-width: 258px;
    background: #ffffff;
    border-right: 1px solid #ebebeb;
    padding: 2rem 1.5rem;
    height: calc(100vh - 58px);
    overflow-y: auto;
    position: sticky;
    top: 50px;
    margin-bottom: 30px;
}

    .sidebar::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: #ddd;
        border-radius: 2px;
    }

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1.2rem;
    letter-spacing: -.01em;
}

/* Filter sections */
.filter-section {
    margin-bottom: 1.6rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 1.4rem;
}

    .filter-section:last-of-type {
        border-bottom: none;
    }

.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: .9rem;
    user-select: none;
}

    .filter-header h6 {
        font-weight: 600;
        font-size: .82rem;
        letter-spacing: .05em;
        text-transform: uppercase;
        color: #0005ff;
        margin: 0;
    }

    .filter-header i {
        font-size: .75rem;
        color: #0005ff;
        transition: transform .3s;
    }

/* Category links */
.cat-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .32rem 0;
    font-size: .84rem;
    font-weight: 400;
    color: #444;
    cursor: pointer;
    transition: color .2s;
}

    .cat-item:hover, .cat-item.active {
        color: #1a1a1a;
        font-weight: 600;
    }

/* Price range */
.price-range-wrap {
    padding: .2rem 0;
}

.price-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, #1a1a1a 0%, #1a1a1a);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
}

    .price-slider::-webkit-slider-thumb {
        -webkit-appearance: none;
        width: 14px;
        height: 14px;
        border-radius: 50%;
        background: #1a1a1a;
        cursor: pointer;
        border: 2px solid #fff;
        box-shadow: 0 0 0 1.5px #1a1a1a;
    }

.price-inputs {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: .9rem;
}

.price-box {
    display: flex;
    align-items: center;
    gap: .3rem;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: .35rem .6rem;
    flex: 1;
}

    .price-box span {
        font-size: .78rem;
        color: #888;
    }

    .price-box input {
        width: 100%;
        border: none;
        outline: none;
        font-size: .82rem;
        color: #1a1a1a;
        background: transparent;
    }

/* Checkbox / radio items */
.check-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .83rem;
    color: #444;
    cursor: pointer;
    padding: .28rem 0;
    user-select: none;
}

    .check-item input[type="checkbox"],
    .check-item input[type="radio"] {
        width: 15px;
        height: 15px;
        accent-color: #1a1a1a;
        cursor: pointer;
        flex-shrink: 0;
    }

    .check-item.disabled {
        opacity: .4;
        pointer-events: none;
    }

/* Apply / Clear buttons */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: .6rem;
    margin-top: 1.2rem;
}

.btn-apply {
    display: block;
    width: 100%;
    padding: .65rem 1rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .2s;
}

    .btn-apply:hover {
        background: #333;
        color: #fff;
    }

.btn-clear {
    display: block;
    width: 100%;
    padding: .6rem 1rem;
    background: #fff;
    color: #1a1a1a;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: border-color .2s, background .2s;
}

    .btn-clear:hover {
        border-color: #1a1a1a;
        background: #f8f8f6;
        color: #1a1a1a;
    }

/* Sidebar close (mobile) */
.sidebar-close {
    display: none;
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: #555;
}

/* ══ MAIN CONTENT ═════════════════════════ */
.main-content {
    flex: 1;
    padding: 1.8rem 2rem;
    min-width: 0;
}

/* Sort bar */
.sort-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.8rem;
    flex-wrap: wrap;
    gap: .8rem;
    background: #fff;
    border: 1px solid #ebebeb;
    border-radius: 10px;
    padding: .85rem 1.2rem;
}

.result-count {
    font-size: .82rem;
    color: #888;
}

.sort-select {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: .45rem 1rem;
    font-size: .82rem;
    font-weight: 500;
    color: #1a1a1a;
    background: #fff;
    cursor: pointer;
    outline: none;
}

    .sort-select:focus {
        border-color: #1a1a1a;
    }

/* Active filter pills */
.active-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
    border-radius: 100px;
    padding: .25rem .75rem;
    font-size: .75rem;
    font-weight: 500;
    color: #333;
}

.pill-remove {
    color: #888;
    text-decoration: none;
    font-size: .9rem;
    line-height: 1;
    transition: color .15s;
}

    .pill-remove:hover {
        color: #e74c3c;
    }

/* Mobile filter toggle */
.filter-toggle-btn {
    display: none;
    align-items: center;
    gap: .5rem;
    padding: .41rem 1.2rem;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    background: #fff;
    font-size: .82rem;
    font-weight: 500;
    cursor: pointer;
    color: #1a1a1a;
    transition: background .2s;
}

    .filter-toggle-btn:hover {
        background: #f8f8f6;
    }

/* ══ PRODUCT GRID ═════════════════════════ */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.4rem;
}

@media (max-width: 1100px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: .8rem;
    }
}

/* ══ EMPTY STATE ══════════════════════════ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #888;
}

    .empty-state i {
        font-size: 2.5rem;
        display: block;
        margin-bottom: 1rem;
    }

    .empty-state h5 {
        color: #1a1a1a;
        font-weight: 600;
        margin-bottom: .5rem;
    }

    .empty-state p {
        font-size: .9rem;
    }

/* ══ PAGINATION ═══════════════════════════ */
.catalog-pagination {
    margin-top: 2.5rem;
}

    .catalog-pagination .pagination {
        justify-content: center;
        gap: .35rem;
        flex-wrap: wrap;
    }

    .catalog-pagination .page-link {
        border: 1px solid #e0e0e0;
        border-radius: 8px !important;
        color: #1a1a1a;
        font-size: .82rem;
        font-weight: 500;
        padding: .5rem .9rem;
        transition: background .2s, border-color .2s;
        background: #fff;
    }

        .catalog-pagination .page-link:hover {
            background: #f0f0f0;
            border-color: #c0c0c0;
            color: #1a1a1a;
        }

    .catalog-pagination .page-item.active .page-link {
        background: #1a1a1a;
        border-color: #1a1a1a;
        color: #fff;
    }

    .catalog-pagination .page-item.disabled .page-link {
        color: #ccc;
        pointer-events: none;
    }

/* ══ RESPONSIVE ═══════════════════════════ */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 9999;
        width: 280px;
        transition: left .35s ease;
        padding-top: 1rem;
    }

        .sidebar.open {
            left: 0;
        }

    .sidebar-close {
        display: block;
    }

    .filter-toggle-btn {
        display: flex;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,.45);
        z-index: 199;
    }

        .sidebar-overlay.show {
            display: block;
        }

    .main-content {
        padding: 1.2rem 1rem;
    }

    .sort-bar {
        flex-direction: row;
        align-items: flex-start;
        display: flex;
    }
}



