﻿/* ========================================
   Product List - Modern Elegant Design
   ======================================== */

.product-list-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0 4rem;
}

/* ============ Page Header ============ */
.page-header-modern {
    background: linear-gradient(135deg, var(--cream-100) 0%, var(--cream-200) 100%);
    border-radius: 24px;
    padding: 2.5rem 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}

    .page-header-modern::before {
        content: '';
        position: absolute;
        top: -50%;
        right: -10%;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(201, 169, 122, 0.2) 0%, transparent 70%);
        border-radius: 50%;
    }

.page-header-content {
    position: relative;
    z-index: 1;
}

.breadcrumb-modern {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

    .breadcrumb-modern a {
        color: var(--text-muted);
        transition: color 0.25s ease;
    }

        .breadcrumb-modern a:hover {
            color: var(--brown-500);
        }

    .breadcrumb-modern .separator {
        color: var(--brown-200);
    }

    .breadcrumb-modern .current {
        color: var(--brown-500);
        font-weight: 600;
    }

.page-header-modern h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--brown-600);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.page-header-modern .subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .page-header-modern .subtitle strong {
        color: var(--brown-500);
        font-weight: 700;
    }

/* ============ Layout Grid ============ */
.product-list-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 991px) {
    .product-list-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* ============ Sidebar ============ */
.filter-sidebar {
    position: sticky;
    top: 100px;
}

.filter-sidebar-header {
    display: none;
}

@media (max-width: 991px) {
    .filter-sidebar-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #fff;
        border: 1px solid var(--cream-200);
        border-radius: 14px;
        padding: 1rem 1.25rem;
        margin-bottom: 1rem;
        cursor: pointer;
        font-weight: 600;
        color: var(--brown-600);
    }

        .filter-sidebar-header i {
            color: var(--accent);
        }

    .filter-sidebar-body {
        display: none;
    }

    .filter-sidebar.open .filter-sidebar-body {
        display: block;
    }
}

.filter-card {
    background: #fff;
    border: 1px solid var(--cream-200);
    border-radius: 18px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.25s ease;
}

    .filter-card:hover {
        box-shadow: 0 4px 16px rgba(125, 95, 62, 0.06);
    }

.filter-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    cursor: pointer;
    background: var(--cream-50);
    border-bottom: 1px solid transparent;
    transition: all 0.25s ease;
}

.filter-card.expanded .filter-card-header {
    border-bottom-color: var(--cream-200);
}

.filter-card-header h3 {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--brown-600);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .filter-card-header h3 i {
        color: var(--accent);
        font-size: 1.05rem;
    }

.filter-card-header .toggle-icon {
    color: var(--text-muted);
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.filter-card.expanded .filter-card-header .toggle-icon {
    transform: rotate(180deg);
}

.filter-card-body {
    padding: 1.25rem;
    display: none;
}

.filter-card.expanded .filter-card-body {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============ Price Range ============ */
.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
}

.price-input-group {
    position: relative;
}

    .price-input-group input {
        width: 100%;
        padding: 0.6rem 0.8rem;
        border: 1.5px solid var(--cream-300);
        border-radius: 10px;
        font-size: 0.85rem;
        background: var(--cream-50);
        color: var(--text-dark);
        transition: all 0.25s ease;
        text-align: center;
    }

        .price-input-group input:focus {
            border-color: var(--accent);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(201, 169, 122, 0.12);
            outline: none;
        }

    .price-input-group label {
        display: block;
        font-size: 0.75rem;
        color: var(--text-muted);
        margin-bottom: 0.3rem;
    }

/* ============ Checkbox Filter ============ */
.filter-option {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.6rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.2rem;
}

    .filter-option:hover {
        background: var(--cream-50);
    }

    .filter-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: var(--brown-400);
        cursor: pointer;
        flex-shrink: 0;
    }

    .filter-option label {
        font-size: 0.88rem;
        color: var(--text-dark);
        cursor: pointer;
        flex: 1;
        margin: 0;
    }

    .filter-option .count-badge {
        font-size: 0.72rem;
        color: var(--text-muted);
        background: var(--cream-100);
        padding: 0.15rem 0.5rem;
        border-radius: 8px;
    }

/* ============ Color Filter ============ */
.color-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.color-option {
    position: relative;
}

    .color-option input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .color-option label {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        padding: 0.45rem 0.85rem;
        border: 1.5px solid var(--cream-300);
        border-radius: 20px;
        font-size: 0.82rem;
        color: var(--text-dark);
        cursor: pointer;
        transition: all 0.25s ease;
        background: #fff;
    }

        .color-option label:hover {
            border-color: var(--brown-200);
            background: var(--cream-50);
        }

    .color-option input:checked + label {
        background: var(--brown-500);
        color: #fff;
        border-color: var(--brown-500);
    }

/* ============ Filter Actions ============ */
.filter-actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 1rem 0;
    position: sticky;
    bottom: 0;
    background: linear-gradient(to top, var(--cream-50) 60%, transparent);
    padding-top: 1.5rem;
}

.btn-apply-filter {
    width: 100%;
    padding: 0.85rem 1.25rem;
    background: linear-gradient(135deg, var(--brown-500) 0%, var(--brown-600) 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    box-shadow: 0 4px 14px rgba(125, 95, 62, 0.2);
}

    .btn-apply-filter:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(125, 95, 62, 0.3);
    }

.btn-clear-filter {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: #fff;
    color: var(--text-muted);
    border: 1.5px solid var(--cream-300);
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    text-decoration: none;
}

    .btn-clear-filter:hover {
        background: var(--cream-100);
        border-color: var(--brown-200);
        color: var(--brown-500);
    }

/* ============ Active Filters ============ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.active-filters-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.75rem;
    background: var(--cream-100);
    color: var(--brown-600);
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid var(--cream-300);
}

    .filter-chip i {
        font-size: 0.85rem;
        cursor: pointer;
        color: var(--text-muted);
        transition: color 0.2s ease;
    }

        .filter-chip i:hover {
            color: #b8553e;
        }

/* ============ Toolbar ============ */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--cream-200);
    border-radius: 14px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.toolbar-info {
    font-size: 0.88rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

    .toolbar-info strong {
        color: var(--brown-600);
        font-weight: 700;
    }

.toolbar-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .toolbar-sort label {
        font-size: 0.85rem;
        color: var(--text-muted);
        white-space: nowrap;
    }

.sort-select {
    padding: 0.5rem 0.9rem;
    border: 1.5px solid var(--cream-300);
    border-radius: 10px;
    font-size: 0.85rem;
    background: var(--cream-50);
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.25s ease;
    min-width: 160px;
}

    .sort-select:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(201, 169, 122, 0.12);
        outline: none;
        background: #fff;
    }

/* ============ Product Grid ============ */
.products-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .products-grid-modern {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

/* ============ Empty State ============ */
.empty-state-modern {
    text-align: center;
    padding: 4rem 1.5rem;
    background: #fff;
    border: 1px solid var(--cream-200);
    border-radius: 20px;
}

.empty-state-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--cream-100) 0%, var(--brown-100) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

    .empty-state-icon i {
        font-size: 2.5rem;
        color: var(--brown-400);
    }

.empty-state-modern h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--brown-600);
    margin-bottom: 0.5rem;
}

.empty-state-modern p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.empty-state-modern .btn {
    padding: 0.75rem 1.75rem;
    background: var(--brown-500);
    color: #fff;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .empty-state-modern .btn:hover {
        background: var(--brown-600);
        transform: translateY(-2px);
        color: #fff;
    }

/* ============ Pagination ============ */
.pagination-modern {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    margin-top: 2.5rem;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1.5px solid var(--cream-300);
    background: #fff;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    padding: 0 0.8rem;
}

    .page-btn:hover {
        background: var(--cream-100);
        border-color: var(--brown-200);
        color: var(--brown-500);
        transform: translateY(-2px);
    }

    .page-btn.active {
        background: linear-gradient(135deg, var(--brown-500) 0%, var(--brown-600) 100%);
        color: #fff;
        border-color: var(--brown-500);
        box-shadow: 0 4px 12px rgba(125, 95, 62, 0.25);
    }

    .page-btn.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        pointer-events: none;
    }

    .page-btn.nav-btn {
        font-size: 0.85rem;
        padding: 0 1rem;
        gap: 0.35rem;
    }

.page-dots {
    color: var(--text-muted);
    padding: 0 0.3rem;
    user-select: none;
}

/* ============ Responsive ============ */
@media (max-width: 768px) {
    .page-header-modern {
        padding: 1.75rem 1.25rem;
        border-radius: 18px;
    }

        .page-header-modern h1 {
            font-size: 1.4rem;
        }

    .products-toolbar {
        padding: 0.65rem 0.75rem;
    }

    .sort-select {
        min-width: 130px;
        font-size: 0.82rem;
    }

    .toolbar-info {
        font-size: 0.82rem;
    }
}
