/* Product List Page Styles */

/* Products Section */
.products-section {
    padding: 120px 0 60px;
    background: #ffffff;
    min-height: 100vh;
}

.products-section .container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Products Header */
.products-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.4s both;
}

.search-bar {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 15px 50px 15px 50px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-bar input:focus {
    outline: none;
    border-color: #4fd18b;
    box-shadow: 0 4px 20px rgba(79, 209, 139, 0.15);
}

.search-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.clear-search {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.clear-search:hover {
    color: #4fd18b;
    background: rgba(79, 209, 139, 0.1);
}

/* Products Layout - Sidebar Style */
.products-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Filters Sidebar */
/* Filters Sidebar */
.filters-sidebar {
    background: #ffffff !important;
    border-radius: 12px;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 120px;
    border: 1px solid #e2e8f0 !important;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02) !important;
}

/* Custom Scrollbar for Sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}
.filters-sidebar::-webkit-scrollbar-track {
    background: #f7fafc;
}
.filters-sidebar::-webkit-scrollbar-thumb {
    background: #4fd18b;
    border-radius: 3px;
}
.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #27ae60;
}

.filters-sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-sidebar-header h3 {
    font-size: 1.1rem;
    color: #2d3748;
    margin: 0;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-sidebar-icon {
    font-size: 1.2rem;
    display: none; /* remove emoji in favor of premium look if desired, or keep */
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #4a5568;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.sidebar-close:hover {
    background: #edf2f7;
    color: #1a202c;
}

.filters-sidebar-content {
    padding: 0;
}

.filters-actions {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.clear-filters {
    background: transparent;
    border: 1px solid #4fd18b;
    color: #4fd18b;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    width: 100%;
    font-size: 0.9rem;
}

.clear-filters:hover {
    background: #4fd18b;
    color: white;
}

.filters-list {
    padding: 0.5rem 0;
}

/* Mobile Filter Bar */
.mobile-filter-bar {
    display: none;
    position: fixed;
    bottom: 2rem;
    left: 1rem;
    z-index: 1001;
    padding: 0;
    margin: 0;
}

.mobile-filters-toggle {
    display: flex;
    background: #4fd18b;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    box-shadow: 0 6px 20px rgba(79, 209, 139, 0.4);
    position: relative;
}

.mobile-filters-toggle::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, #4fd18b, #3ab776);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-filters-toggle:hover::before {
    opacity: 1;
}

.mobile-filters-toggle:hover {
    background: #3ab776;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(79, 209, 139, 0.5);
}

.mobile-filters-toggle:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(79, 209, 139, 0.4);
}

.mobile-filters-toggle svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.mobile-filters-toggle span {
    display: none;
}

/* Active state when sidebar is open */
.filters-sidebar.mobile-open ~ .mobile-filter-bar .mobile-filters-toggle {
    background: #3ab776;
    transform: rotate(45deg);
}

/* Nested List Sidebar styling */
.filter-all-products {
    padding: 0.25rem 1rem 0.5rem;
}

.filter-all-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.filter-all-link:hover {
    background: #f7fafc;
    color: #2d3748;
    text-decoration: none;
}

.filter-all-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600;
}

.filter-category-group {
    border-bottom: 1px solid #f7fafc;
}

.filter-category-group:last-child {
    border-bottom: none;
}

.filter-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 1rem;
}

.filter-category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.filter-category-link:hover {
    background: #f7fafc;
    color: #2d3748;
    text-decoration: none;
}

.filter-category-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600;
}

.filter-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    flex-shrink: 0;
}

.filter-category-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #a0aec0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.filter-category-toggle:hover {
    background: #edf2f7;
    color: #4a5568;
}

.filter-category-toggle .filter-chevron {
    transition: transform 0.2s ease;
}

.filter-category-group.expanded .filter-chevron {
    transform: rotate(180deg);
    color: #27ae60;
}

.filter-subcategory-list {
    display: flex;
    flex-direction: column;
    margin-left: 1.95rem; /* align with category icon */
    border-left: 1.5px solid #e2e8f0;
    padding-left: 1rem;
    margin-bottom: 0.5rem;
    gap: 0.25rem;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    max-height: 1000px;
    opacity: 1;
}

.filter-subcategory-list.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-left-color: transparent;
}

.filter-subcategory-link {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-subcategory-link:hover {
    background: #f7fafc;
    color: #2d3748;
    text-decoration: none;
}

.filter-subcategory-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600;
}

/* Products Main */
.products-main {
    min-height: 600px;
}

/* Results Info */
.results-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    animation: fadeInUp 1s ease 0.8s both;
}

#resultsCount {
    font-weight: 500;
    color: #666;
}

.sort-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sort-section label {
    font-weight: 500;
    color: #666;
}

#sortSelect {
    padding: 8px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#sortSelect:focus {
    outline: none;
    border-color: #4fd18b;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    animation: fadeInUp 1s ease 1s both;
}

/* Enhanced Product Card */
.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

/* Enhanced Product Clickable Area */
.product-clickable {
    flex: 1;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.product-clickable:hover {
    color: inherit;
    text-decoration: none;
}

.product-clickable:focus {
    outline: 2px solid #4fd18b;
    outline-offset: 2px;
    border-radius: 15px;
}

/* Enhanced Product Image */
.product-image {
    aspect-ratio: 4 / 3;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    position: relative;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    padding: 8px;
    transition: transform 0.3s ease;
}

.product-clickable:hover .product-image img {
    transform: scale(1.05);
}

.no-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: #ffffff;
    color: #999;
    font-size: 1.1rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
}

/* Product Hover Overlay */
.product-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.product-clickable:hover .product-hover-overlay {
    opacity: 1;
}

.view-detail-text {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    padding: 0.5rem 1rem;
    border: 2px solid white;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 2;
}

.product-badge {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-new {
    background: rgba(46, 204, 113, 0.9);
    color: white;
}

.badge-popular {
    background: rgba(231, 76, 60, 0.9);
    color: white;
}

.badge-featured {
    background: rgba(52, 152, 219, 0.9);
    color: white;
}

.badge-low-stock {
    background: rgba(243, 156, 18, 0.9);
    color: white;
}

/* Enhanced Product Content */
.product-content {
    padding: 1.5rem 1.5rem 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.clickable-title {
    transition: color 0.3s ease;
}

.product-clickable:hover .clickable-title {
    color: #4fd18b;
}

.product-id {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    flex: 1;
}

.product-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-feature {
    background: #f5f9f5;
    color: #666;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.product-price {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 0.5rem;
}

.product-stock {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.stock-in-stock {
    color: #27ae60;
}

.stock-out-of-stock {
    color: #e74c3c;
}

/* Enhanced Product Actions */
.product-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0 1.5rem 1.5rem;
    margin-top: auto;
}

.add-to-cart-btn {
    width: 100%;
    background: #4fd18b;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.85rem;
}

.add-to-cart-btn:hover:not(:disabled) {
    background: #3ab776;
    transform: translateY(-1px);
}

.add-to-cart-btn:disabled {
    background: #bdc3c7;
    color: #7f8c8d;
    cursor: not-allowed;
    transform: none;
}

/* Fast Button States */
.fast-add-btn.adding {
    background: #f39c12;
    transform: none;
}

.fast-add-btn.success {
    background: #27ae60;
    transform: none;
}

.fast-add-btn.error {
    background: #e74c3c;
    transform: none;
}

/* Navigation Feedback */
.navigation-feedback {
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 10001;
    transform: translate(-50%, -50%);
    background: rgba(79, 209, 139, 0.95);
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-align: center;
    min-width: 200px;
}

.navigation-spinner {
    margin-bottom: 8px;
}

.navigation-spinner div {
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-radius: 50%;
    border-top: 2px solid transparent;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Fast Product Message */
.fast-product-message {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 10000;
    background: #4fd18b;
    color: white;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform: translateX(100%);
    transition: transform 0.2s ease;
}

.fast-product-message.success {
    background: #27ae60;
}

.fast-product-message.error {
    background: #e74c3c;
}

.fast-product-message.warning {
    background: #f39c12;
}

.fast-product-message.show {
    transform: translateX(0);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

.no-results p {
    font-size: 1rem;
    color: #666;
}

/* Sidebar Overlay for Mobile */
.filters-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Loading State */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #4fd18b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter Animation */
.filter-animation {
    animation: filterFade 0.5s ease;
}

@keyframes filterFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 1400px) {
    .products-layout {
        max-width: 1400px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 1200px) {
    .products-layout {
        grid-template-columns: 300px 1fr;
        gap: 2rem;
        padding: 0 1.5rem;
    }
    
    .products-section .container {
        max-width: 1200px;
        padding: 0 1.5rem;
    }
}

@media (max-width: 1024px) {
    .products-layout {
        grid-template-columns: 280px 1fr;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .filters-sidebar {
        position: sticky;
        top: 100px;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .products-section .container {
        max-width: 1024px;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .products-section {
        padding: 100px 0 40px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .products-layout {
        display: block;
        padding: 0 1rem;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 320px;
        height: 100vh;
        z-index: 9999;
        transition: left 0.3s ease;
        border-radius: 0;
        border: none;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .filters-sidebar.mobile-open {
        left: 0;
    }
    
    .sidebar-close {
        display: block;
    }
    
    .mobile-filter-bar {
        display: block;
    }
    
    .products-main {
        width: 100%;
    }
    
    .results-info {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
        margin-bottom: 1.5rem;
        padding: 1rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    /* product-image ใช้ aspect-ratio แล้ว ไม่ต้องกำหนด height */
    
    .product-content {
        padding: 1.25rem;
    }
    
    .filters-sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 480px) {
    .products-layout {
        padding: 0 0.5rem;
    }
    
    .filters-sidebar {
        width: 100%;
        left: -100%;
    }
    
    .filters-sidebar.mobile-open {
        left: 0;
    }
    
    .results-info {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .mobile-filters-toggle {
        width: 45px;
        height: 45px;
        padding: 10px;
    }
    
    .mobile-filters-toggle svg {
        width: 18px;
        height: 18px;
    }
    
    .mobile-filter-bar {
        bottom: 1.5rem;
        left: 0.75rem;
    }
    
    .filter-group-header {
        padding: 0.875rem 1rem;
    }
    
    .filter-group-title {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .filter-icon {
        font-size: 1rem;
    }
    
    .filter-options.expanded {
        padding: 0.75rem 1rem 1rem;
        max-height: none;
    }
    
    .search-bar {
        margin: 0 0.5rem;
    }
    
    .add-to-cart-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
}

@media (min-width: 769px) {
    .mobile-filter-bar {
        display: none !important;
    }
    
    .sidebar-close {
        display: none !important;
    }
    
    .filters-sidebar {
        position: sticky !important;
        left: auto !important;
    }
    
    .filters-sidebar-overlay {
        display: none !important;
    }
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 3rem 0 2rem;
    gap: 0.5rem;
}

.pagination-btn {
    background: white;
    border: 1px solid #e0e0e0;
    color: #333;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pagination-btn:hover:not(.active) {
    background: #f5f9f5;
    border-color: #4fd18b;
    color: #4fd18b;
}

.pagination-btn.active {
    background: #4fd18b;
    border-color: #4fd18b;
    color: white;
}

.pagination-btn:disabled {
    background: #f5f9f5;
    color: #ccc;
    cursor: not-allowed;
}

/* ==========================================================================
   ⭐ HAMONIC CUSTOM FILTER SIDEBAR STYLES (Bright White & Mint Green Theme)
   ========================================================================== */

/* Overrides to clean up default styles */
.filters-sidebar {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03) !important;
    max-height: calc(100vh - 165px) !important;
    overflow-y: auto !important;
}

.filters-sidebar-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1.25rem 1.5rem !important;
}

.filters-sidebar-header h3 {
    color: #2d3748 !important;
    font-weight: 600 !important;
}

.filters-actions {
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 1rem 1.5rem !important;
}

.clear-filters {
    border: 1px solid #e2e8f0 !important;
    color: #4a5568 !important;
    background: #ffffff !important;
    transition: all 0.2s ease !important;
}

.clear-filters:hover {
    background: #f7fafc !important;
    color: #e53e3e !important;
    border-color: #feb2b2 !important;
}

/* Custom Scrollbar for Sidebar */
.filters-sidebar::-webkit-scrollbar {
    width: 6px;
}
.filters-sidebar::-webkit-scrollbar-track {
    background: #f7fafc;
}
.filters-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}
.filters-sidebar::-webkit-scrollbar-thumb:hover {
    background: #4fd18b;
}

/* 1. All Products Link */
.filter-all-products {
    padding: 1rem 1.5rem 0.25rem;
}

.filter-all-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.filter-all-link:hover {
    background: #f7fafc;
    color: #2d3748;
}

.filter-all-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600 !important;
}

/* 2. Main Category Groups */
.filter-category-group {
    border-bottom: 1px solid #e2e8f0;
}

.filter-category-group:last-child {
    border-bottom: none;
}

.filter-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 1.5rem;
}

.filter-category-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 0.5rem;
    color: #4a5568;
    text-decoration: none;
    font-weight: 500;
    flex: 1;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-size: 0.95rem;
}

.filter-category-link:hover {
    background: #f7fafc;
    color: #2d3748;
}

.filter-category-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600 !important;
}

.filter-icon-svg {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    transition: color 0.2s ease;
}

.filter-category-link.active .filter-icon-svg,
.filter-all-link.active .filter-icon-svg {
    color: #27ae60 !important;
}

.filter-category-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: #a0aec0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.25rem;
}

.filter-category-toggle:hover {
    background: #edf2f7;
    color: #4a5568;
}

.filter-category-toggle .filter-chevron {
    transition: transform 0.2s ease;
}

.filter-category-group.expanded .filter-chevron {
    transform: rotate(180deg);
    color: #27ae60;
}

/* 3. Nested Subcategory List & Connectors */
.filter-subcategory-list {
    display: flex;
    flex-direction: column;
    margin-left: 2.15rem; /* align under parent icon */
    border-left: 1.5px solid #e2e8f0;
    padding-left: 0.75rem;
    margin-bottom: 0.75rem;
    gap: 0.25rem;
    transition: max-height 0.3s cubic-bezier(0, 1, 0, 1), opacity 0.25s ease;
    max-height: 1000px;
    opacity: 1;
}

.filter-subcategory-list.collapsed {
    max-height: 0;
    opacity: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-left-color: transparent;
    overflow: hidden;
}

.filter-subcategory-link {
    display: block;
    padding: 0.45rem 0.75rem;
    color: #718096;
    text-decoration: none;
    font-size: 0.9rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.filter-subcategory-link:hover {
    background: #f7fafc;
    color: #2d3748;
}

.filter-subcategory-link.active {
    background: rgba(79, 209, 139, 0.1) !important;
    color: #27ae60 !important;
    font-weight: 600 !important;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .filters-sidebar {
        background: #ffffff !important;
        max-height: 100vh !important;
        height: 100vh !important;
        z-index: 2000 !important;
    }
    
    .filters-sidebar-overlay {
        z-index: 1999 !important;
    }
    
    .filters-sidebar-content {
        max-height: calc(100vh - 70px) !important;
        overflow-y: auto !important;
        padding-bottom: 3rem !important;
    }
    
    .filters-list {
        max-height: none !important;
        overflow: visible !important;
    }
    
    .sidebar-close {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: #f7fafc;
        border: 1px solid #edf2f7;
    }
    
    .sidebar-close:hover {
        background: #edf2f7;
    }
}

/* Category Banner Slider */
.product-list-slider {
    position: relative;
    width: 100%;
    max-width: 1600px;
    height: 350px;
    margin: 0 auto 2.5rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    background: #111827;
}

.slider-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.product-list-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}

.product-list-slider .slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s ease;
}

.slide.active .slide-img {
    transform: scale(1.05); /* Ken Burns effect */
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 100%);
    display: flex;
    align-items: center;
    padding: 0 4rem;
}

.slide-content {
    max-width: 650px;
    color: white;
    font-family: 'Kanit', sans-serif;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.6s ease;
    transition-delay: 0.2s;
    z-index: 3;
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide-content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    line-height: 1.2;
    color: white;
}

.slide-content p {
    font-size: 1.1rem;
    font-weight: 400;
    color: #e2e8f0;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.slide-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(79, 209, 139, 0.2);
    border: 1px solid rgba(79, 209, 139, 0.5);
    color: #4fd18b;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* Slider buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 1.2rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-btn:hover {
    background: #4fd18b;
    border-color: #4fd18b;
    box-shadow: 0 0 15px rgba(79, 209, 139, 0.4);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Dots Indicators */
.slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.slider-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dots .dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dots .dot.active {
    background: #4fd18b;
    width: 24px;
    border-radius: 5px;
}

@media (max-width: 992px) {
    .product-list-slider {
        height: 280px;
        margin-bottom: 2rem;
    }
    .slide-overlay {
        padding: 0 2.5rem;
    }
    .slide-content h2 {
        font-size: 1.75rem;
    }
    .slide-content p {
        font-size: 1rem;
    }
    .slider-btn {
        width: 36px;
        height: 36px;
        font-size: 0.9rem;
    }
    .prev-btn {
        left: 15px;
    }
    .next-btn {
        right: 15px;
    }
}

@media (max-width: 768px) {
    .product-list-slider {
        height: 200px;
        border-radius: 12px;
        margin-bottom: 1.5rem;
    }
    .slide-overlay {
        padding: 0 1.5rem;
        background: rgba(15, 23, 42, 0.75);
    }
    .slide-content h2 {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }
    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .slide-badge {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
    .slider-btn {
        display: none; /* Hide arrows on mobile */
    }
    .slider-dots {
        bottom: 12px;
    }
}