/**
 * Shop Sidebar Component Styles
 * Styled filters sidebar for the shop page
 */

/* Sidebar Container */
.shop-sidebar {
    position: sticky;
    top: 90px;
    z-index: 10;
}

/* Sidebar Card */
.shop-sidebar-card {
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.shop-sidebar-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Card Header */
.shop-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(to right, #f8f9fa, #ffffff);
    border-bottom: 1px solid #f0f0f0;
}

.shop-sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0;
    display: flex;
    align-items: center;
}

.shop-sidebar-title i {
    margin-right: 0.5rem;
    color: #7A8769;
}

/* Card Body */
.shop-sidebar-body {
    padding: 1rem 1.25rem;
}

.shop-sidebar-body.no-padding {
    padding: 0;
}

/* Category List */
.shop-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Category Item */
.shop-category-item {
    border-bottom: 1px solid #f5f5f5;
}

.shop-category-item:last-child {
    border-bottom: none;
}

/* Category Toggle Button */
.shop-category-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: transparent;
    border: none;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-category-toggle:hover {
    background: #f8f9fa;
}

.shop-category-toggle:hover .shop-category-name {
    color: #7A8769;
    transform: translateX(4px);
}

/* Category Name */
.shop-category-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    transition: all 0.3s ease;
    display: inline-block;
}

/* Category Icon (chevron) */
.shop-category-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.shop-category-toggle[aria-expanded="true"] .shop-category-icon {
    transform: rotate(180deg);
}

.shop-category-toggle:hover .shop-category-icon {
    color: #7A8769;
}

/* Subcategory List */
.shop-subcategory-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
    background: #fafbfc;
}

/* Subcategory Item */
.shop-subcategory-item {
    border-bottom: 1px solid #f0f0f0;
}

.shop-subcategory-item:last-child {
    border-bottom: none;
}

/* Subcategory Link */
.shop-subcategory-link {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.25rem 0.6rem 1.75rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.25s ease;
}

.shop-subcategory-link:hover {
    background: #f0f4ff;
    color: #7A8769;
    padding-left: 2rem;
}

.shop-subcategory-link i {
    font-size: 0.7rem;
    margin-right: 0.5rem;
    color: #ccc;
    transition: color 0.25s ease;
}

.shop-subcategory-link:hover i {
    color: #7A8769;
}

/* "View All" Link */
.shop-subcategory-all {
    font-weight: 600;
    color: #7A8769;
    background: #f0f4ff;
}

.shop-subcategory-all:hover {
    background: #e8edff;
    color: #5a67d8;
}

/* Price Filter Section */
.shop-price-filter {
    padding: 0.5rem 0;
}

.shop-price-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #555;
}

.shop-price-value {
    font-weight: 700;
    color: #7A8769;
    font-size: 1rem;
}

/* NoUiSlider Custom Styling */
.shop-sidebar .noUi-target {
    border: none;
    background: #e9ecef;
    border-radius: 4px;
    height: 8px;
    box-shadow: none;
}

.shop-sidebar .noUi-connect {
    background: linear-gradient(135deg, #7A8769 0%, #5d6b50 100%);
    border-radius: 4px;
}

.shop-sidebar .noUi-handle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #7A8769;
    box-shadow: 0 2px 8px rgba(122, 135, 105, 0.3);
    cursor: grab;
    top: -6px;
    right: -10px;
}

.shop-sidebar .noUi-handle:active {
    cursor: grabbing;
}

.shop-sidebar .noUi-handle:before,
.shop-sidebar .noUi-handle:after {
    display: none;
}

.shop-sidebar .noUi-tooltip {
    background: #7A8769;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Attribute Filter Section */
.shop-attribute-group {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.shop-attribute-group:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Attribute Header */
.shop-attribute-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.shop-attribute-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.shop-attribute-toggle {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    border: none;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.shop-attribute-toggle:hover {
    background: #7A8769;
    color: #fff;
}

.shop-attribute-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.shop-attribute-toggle i {
    transition: transform 0.3s ease;
}

/* Attribute Values */
.shop-attribute-values {
    padding-top: 0.5rem;
}

/* Custom Checkbox */
.shop-checkbox {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.5rem;
    margin: 0.25rem 0;
    border-radius: 8px;
    transition: background 0.2s ease;
    cursor: pointer;
}

.shop-checkbox:hover {
    background: #f8f9fa;
}

.shop-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.75rem;
    cursor: pointer;
    accent-color: #7A8769;
    border-radius: 4px;
}

.shop-checkbox label {
    font-size: 0.9rem;
    color: #555;
    cursor: pointer;
    margin-bottom: 0;
    transition: color 0.2s ease;
}

.shop-checkbox:hover label {
    color: #333;
}

.shop-checkbox input[type="checkbox"]:checked + label {
    color: #7A8769;
    font-weight: 500;
}

/* Reset Filters Button */
.shop-reset-filters {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.shop-reset-filters:hover {
    background: #7A8769;
    border-color: #7A8769;
    color: #fff;
}

.shop-reset-filters i {
    margin-right: 0.5rem;
}

/* Active Filter Badge */
.shop-active-filter {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    background: #f0f4ff;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #7A8769;
    margin: 0.25rem;
}

.shop-active-filter-remove {
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    background: rgba(122, 135, 105, 0.2);
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shop-active-filter-remove:hover {
    background: #7A8769;
    color: #fff;
}

/* Scrollbar for sidebar */
.shop-sidebar-scroll {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
}

.shop-sidebar-scroll::-webkit-scrollbar {
    width: 6px;
}

.shop-sidebar-scroll::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 3px;
}

.shop-sidebar-scroll::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.shop-sidebar-scroll::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* Responsive */
@media (max-width: 991.98px) {
    .shop-sidebar {
        position: relative;
        top: auto;
    }
}
