/* ============================================
   PRODUCTS PAGE STYLES
   ============================================ */

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1a4560 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="15" fill="rgba(0,177,167,0.1)"/><circle cx="80" cy="80" r="20" fill="rgba(0,177,167,0.05)"/></svg>');
}

.page-header-content {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: var(--white);
    font-size: var(--font-size-4xl);
    margin-bottom: var(--spacing-md);
}

.page-header .breadcrumb {
    justify-content: center;
    margin-bottom: 0;
}

.page-header .breadcrumb-item {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--font-size-sm);
}

.page-header .breadcrumb-item a {
    color: rgba(255, 255, 255, 0.7);
}

.page-header .breadcrumb-item a:hover {
    color: var(--primary-accent);
}

.page-header .breadcrumb-item.active {
    color: var(--primary-accent);
}

.page-header .breadcrumb-item+.breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
    content: '/';
}

/* Products Page Layout */
.products-page {
    background: var(--bg-light);
}

/* Sidebar */
.products-sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: var(--white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-card);
}

.widget-title {
    font-size: var(--font-size-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--primary-accent);
    display: inline-block;
}

/* Search Widget */
.search-widget {
    position: relative;
}

.search-widget input {
    width: 100%;
    padding: 12px 50px 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    transition: var(--transition-base);
}

.search-widget input:focus {
    border-color: var(--primary-accent);
    outline: none;
    box-shadow: 0 0 0 3px var(--primary-accent-light);
}

.search-widget button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-accent);
    color: var(--white);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-base);
}

.search-widget button:hover {
    background: var(--primary-accent-hover);
}

/* Category & Rating List */
.category-list,
.rating-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.custom-checkbox {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.custom-checkbox:hover {
    color: var(--primary-accent);
}

.custom-checkbox input {
    display: none;
}

.custom-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
    flex-shrink: 0;
}

.custom-checkbox input:checked+.checkmark {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
}

.custom-checkbox input:checked+.checkmark::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 10px;
    color: var(--white);
}

.custom-checkbox .count {
    margin-left: auto;
    color: var(--text-muted);
    font-size: var(--font-size-xs);
}

.custom-checkbox .stars {
    display: flex;
    gap: 2px;
}

.custom-checkbox .stars i {
    color: var(--star-color);
    font-size: var(--font-size-sm);
}

/* Price Range Widget */
.price-range-widget .price-inputs {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.price-range-widget .price-inputs input {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-sm);
    text-align: center;
}

.price-range-widget .price-inputs input:focus {
    border-color: var(--primary-accent);
    outline: none;
}

.price-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    outline: none;
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-accent);
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: var(--shadow-md);
}

/* Tags Widget */
.tags-widget {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--bg-light);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    color: var(--text-secondary);
    transition: var(--transition-base);
}

.tag:hover {
    background: var(--primary-accent);
    color: var(--white);
}

/* Products Toolbar */
.products-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    background: var(--white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-card);
}

.toolbar-left p {
    margin: 0;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.sort-by {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.sort-by label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.sort-by select {
    padding: 8px 35px 8px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: var(--font-size-sm);
    cursor: pointer;
    background: var(--white);
    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='%236C757D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.sort-by select:focus {
    border-color: var(--primary-accent);
    outline: none;
}

.view-mode {
    display: flex;
    gap: var(--spacing-xs);
}

.view-mode button {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-base);
}

.view-mode button:hover,
.view-mode button.active {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: var(--white);
}

/* Pagination */
.products-pagination {
    margin-top: var(--spacing-3xl);
    display: flex;
    justify-content: center;
}

.products-pagination .pagination {
    display: flex;
    gap: var(--spacing-sm);
}

.products-pagination .page-item .page-link {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: var(--font-medium);
    transition: var(--transition-base);
    background: var(--white);
}

.products-pagination .page-item .page-link:hover {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: var(--white);
}

.products-pagination .page-item.active .page-link {
    background: var(--primary-accent);
    border-color: var(--primary-accent);
    color: var(--white);
}

.products-pagination .page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 991.98px) {
    .products-sidebar {
        position: static;
        margin-bottom: var(--spacing-2xl);
    }

    .sidebar-widget {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 767.98px) {
    .page-header {
        padding: 60px 0;
    }

    .page-header h1 {
        font-size: var(--font-size-3xl);
    }

    .products-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .toolbar-right {
        justify-content: space-between;
    }
}