.products-page {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

.filters-sidebar {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: var(--shadow);
    height: fit-content;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    position: sticky;
    top: 100px;
    z-index: 100;
    display: block !important;
    order: -1; /* keep filters on the LEFT */
    grid-column: 1;
}


    .filters-sidebar.active {
        left: 0 !important;
    }
    
    .filter-section {
        padding: 15px 0 !important;
        margin-bottom: 15px !important;
        border-bottom: 1px solid #eee !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filter-section h3 {
        font-size: 18px !important;
        margin-bottom: 15px !important;
        color: #333 !important;
        display: block !important;
    }
    
    .filter-content {
        max-height: none !important;
        overflow-y: visible !important;
        display: block !important;
    }
    
    .filter-checkbox {
        padding: 12px 0 !important;
        font-size: 16px !important;
        display: flex !important;
        align-items: center !important;
        margin-bottom: 8px !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filter-checkbox input {
        width: 20px !important;
        height: 20px !important;
        margin-right: 12px !important;
        display: block !important;
        opacity: 1 !important;
    }
    
    .filter-checkbox span {
        font-size: 16px !important;
        color: #333 !important;
        display: block !important;
    }
    
    .price-range {
        padding: 15px 0 !important;
        display: block !important;
        visibility: visible !important;
    }
    
    .price-range input[type="range"] {
        width: 100% !important;
        margin: 15px 0 !important;
        display: block !important;
    }
    
    .price-values {
        display: flex !important;
        justify-content: space-between !important;
        font-size: 16px !important;
        visibility: visible !important;
    }
   .btn-apply-filters, .btn-clear-filters {
        width: 100% !important;
        padding: 15px !important;
        margin: 10px 0 !important;
        font-size: 16px !important;
        display: block !important;
        visibility: visible !important;
    }

.btn-apply-filters {
    background: var(--primary-yellow);
    color: var(--text-dark);
}

.btn-apply-filters:hover {
    background: var(--dark-yellow);
}

.btn-clear-filters {
    background: #f0f0f0;
    color: var(--text-dark);
}

.btn-clear-filters:hover {
    background: #e0e0e0;
}

.products-grid-section {
    flex: 1;
}

.products-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    position: sticky;
    top: 70px; 
    z-index: 100;
    background-color: white;
    transition: all 0.3s ease;
}
.products-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0;
}

#productsTitle {
    font-size: 24px;
    color: var(--text-dark);
    margin: 0;
}

.sort-options select {
    padding: 10px 15px;
    border: 1px solid var(--gray-border);
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.sort-options select:hover {
    border-color: var(--primary-yellow);
}

.sort-options select:focus {
    border-color: var(--dark-yellow);
}


.products-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important; 
    gap: 25px !important;
    margin-bottom: 40px !important;
}

@media (max-width: 1200px) {
   .products-grid {
        grid-template-columns: repeat(3, 1fr) !important; 
    }
}
@media (max-width: 992px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
     .products-header {
        flex-direction: row !important; 
        padding: 12px 15px !important;
        position: sticky !important; 
        top: 110px !important; 
        z-index: 100 !important;
        background: white !important;
        border-radius: 8px !important;
        margin: 10px 0 15px 0 !important;
        gap: 10px !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
        width: 100% !important;
        left: 0 !important;
        right: 0 !important;
    }
    
    .products-header h2 {
        font-size: 16px !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 50% !important;
        margin: 0 !important;
    }
    
    .sort-options {
        flex: 0 0 auto !important;
        max-width: 50% !important;
    }
    
    .sort-options select {
        padding: 8px 10px !important;
        font-size: 13px !important;
        width: 100% !important;
        background-color: #f8f8f8 !important;
        border-radius: 6px !important;
        border: 1px solid #e0e0e0 !important;
    }
    
    .products-grid-section {
        padding-top: 10px !important;
        position: relative !important;
        z-index: 90 !important;
    }
    
   
    
    @supports (-webkit-touch-callout: none) {
        .products-header {
            top: 0px !important;
        }
    }
     .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important;
    }
       .product-card, .skeleton-product-card {
        height: 350px; 
    }
    
    .product-image, .skeleton-product-image {
        height: 180px !important;
    }
    .products-page {
        grid-template-columns: 1fr;
        position: relative;
        padding-bottom: 80px; 
    }
    
   .filters-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 85% !important;
        height: 100vh !important;
        z-index: 1002 !important; 
        background: white !important;
        overflow-y: auto !important;
        transition: left 0.3s ease !important;
        padding: 20px !important;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1) !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .filters-sidebar.active {
        left: 0 !important;
    }
     .filter-overlay {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 1001 !important;
    }
    
    .filter-overlay.active {
        display: block !important;
    }
    
    .filter-content {
        max-height: none !important;
        overflow-y: visible !important;
    }
    
    .filter-checkbox {
        padding: 10px 0;
        font-size: 16px; 
    }
    
    .filter-checkbox input {
        width: 20px;
        height: 20px;
        margin-right: 12px;
    }
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
}

.pagination-btn {
    padding: 8px 15px;
    border: 1px solid var(--gray-border);
    background: white;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination-btn:hover {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}

.pagination-btn.active {
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
    font-weight: 500;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.products-page {
    position: relative;
}

.mobile-filter-toggle {
    display: none;
}
@media (max-width: 768px) {
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 8px !important;
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 1000 !important;
        background: var(--primary-yellow) !important;
        color: var(--text-dark) !important;
        border: none !important;
        padding: 15px 25px !important;
        border-radius: 50px !important;
        font-weight: 600 !important;
        font-size: 16px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.2) !important;
        cursor: pointer !important;
    }
    
    .products-page {
        grid-template-columns: 1fr;
        position: relative;
    }
    
    .filters-sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 85%;
        height: 100vh;
        z-index: 1002;
        background: white;
        overflow-y: auto;
        transition: left 0.3s ease;
        padding: 20px;
        box-shadow: 5px 0 15px rgba(0,0,0,0.1);
    }
    
    .filters-sidebar.active {
        left: 0;
    }
    
    .filter-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1001;
    }
    
    .filter-overlay.active {
        display: block;
    }
    
    .products-grid .product-card {
        min-width: 100%;
        max-width: 100%;
        
    }
    
    .skeleton {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: loading 1.5s infinite;
        border-radius: 4px;
    }
}
@media (max-width: 480px) {
    .products-header {
        top: 55px;
        padding: 10px 12px;
    }
    
    .products-header h2 {
        font-size: 14px;
        max-width: 45%;
    }
    
    .sort-options select {
        padding: 7px 8px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .products-header {
        padding: 8px 10px;
        gap: 8px;
    }
    
    .products-header h2 {
        font-size: 13px;
        max-width: 40%;
    }
    
    .sort-options select {
        padding: 6px 6px;
        font-size: 11px;
    }
}

.products-header.sticky {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.products-grid-section {
    padding-top: 10px;
}

@media (max-width: 768px) {
    body {
        padding-top: 0;
    }
    
    .navbar {
        position: sticky;
        top: 0;
        z-index: 1001;
    }
}
 .close-filters {
        display: block !important;
        position: absolute !important;
        top: 15px !important;
        right: 15px !important;
        background: none !important;
        border: none !important;
        font-size: 24px !important;
        color: #666 !important;
        cursor: pointer !important;
        z-index: 1003 !important;
        opacity: 1 !important;
        visibility: visible !important;
    }


.skeleton-product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 380px;
    width: 100% !important;
    position: relative;
}

.skeleton-product-image {
    height: 200px; 
    width: 100%;
    background: #f0f0f0;
    border-radius: 10px 10px 0 0;
}

.skeleton-product-info {
    padding: 15px;
    height: 180px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    min-height: 380px; 
    height: auto; 
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}
.product-image {
    width: 100%;
    height: 200px; 
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-info h3 {
    font-size: 16px;
    margin-bottom: 8px;
    font-weight: 500;
    line-height: 1.3;
    flex-shrink: 0;
}

.product-short-desc {
    color: #666;
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0;
    flex-grow: 1;
    min-height: 40px;
}

.product-price {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.product-actions {
    display: flex;
    gap: 10px;
    margin-top: auto; 
    flex-shrink: 0;
}


.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 15px !important;
    }
    
    .product-card, .skeleton-product-card {
        height: 350px; 
    }
    
    .product-image, .skeleton-product-image {
        height: 180px !important;
    }
}
@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important; 
        gap: 12px !important;
    }
    
    .product-card, .skeleton-product-card {
        height: auto; 
        min-height: 320px;
        max-width: 100%;
    }
    
    .product-image {
        height: 150px !important;
    }
    
    .product-info h3 {
        font-size: 13px;
        margin-bottom: 5px;
    }
    
    .product-price .current-price {
        font-size: 14px;
    }
    
    .product-price .original-price {
        font-size: 12px;
    }
    
    .discount {
        font-size: 10px;
        padding: 2px 5px;
    }
    
    .btn-cart, .btn-wishlist {
        font-size: 11px;
        padding: 6px;
    }
    
    .btn-cart i, .btn-wishlist i {
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .products-grid {
        gap: 8px !important;
    }
    
    .product-image {
        height: 130px !important;
    }
    
    .product-info h3 {
        font-size: 12px;
    }
}
.product-card, .skeleton-product-card {
    min-width: 0 !important; 
    max-width: 100% !important;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: flex;
    gap: 8px;
    align-items: center;
}

.page-num {
    min-width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-num:hover {
    background: #f0f0f0;
    border-color: #999;
}

.page-num.active {
    background: var(--dark-yellow);
    color: white;
    border-color: #4F46E5;
}

.page-btn {
    padding: 10px 20px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-btn:hover:not(.disabled) {
    background: #f0f0f0;
    border-color: #999;
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-dots {
    padding: 0 5px;
    color: #666;
}

.wc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #7F54B3;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.skeleton-product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-product-image {
    width: 100%;
    background: #e0e0e0;
}

.skeleton-product-info {
    padding: 15px;
}

.skeleton-text {
    width: 100%;
    height: 16px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 5px 0;
}

.skeleton-text-sm {
    height: 20px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 5px 0;
}

.skeleton-btn {
    background: #e0e0e0;
    border-radius: 6px;
}

@media (max-width: 768px) {
    .pagination-wrapper {
        gap: 10px;
    }
    
    .page-num {
        min-width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .page-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .page-btn span {
        display: none;
    }
}

@media (max-width: 480px) {
    .page-numbers {
        gap: 4px;
    }
    
    .page-num {
        min-width: 32px;
        height: 32px;
        font-size: 13px;
    }
    
    .page-btn {
        padding: 6px 12px;
    }
}

.product-source-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 20px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4F46E5;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.product-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-image img[src*="data:image/svg+xml"] {
    object-fit: contain;
    padding: 20px;
    background: #f5f5f5;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.wc-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #7F54B3;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}


.product-image img {
    min-height: 200px;
    object-fit: cover;
    background: #f5f5f5;
}

.product-image img[src*="data:image/svg+xml"] {
    object-fit: contain;
    padding: 30px;
    background: #f5f5f5;
}

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}


.trending-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #FF6B6B;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}

.wc-badge {
    right: 10px;
    left: auto;
}

.in-stock {
    color: #2ecc71;
    font-weight: 600;
    font-size: 12px;
}

.out-of-stock {
    color: #e74c3c;
    font-weight: 600;
    font-size: 12px;
}

.brand {
    color: #7f8c8d;
    font-size: 12px;
}

.sales-count {
    display: inline-block;
    background: #f0f0f0;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
    margin-bottom: 8px;
}

.no-products {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.no-products i {
    color: #ccc;
    margin-bottom: 20px;
}

.no-products h3 {
    margin-bottom: 10px;
    color: #333;
}

.no-products p {
    color: #666;
}

.error-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.error-message i {
    color: #e74c3c;
    margin-bottom: 20px;
}

.error-message h3 {
    margin-bottom: 10px;
    color: #333;
}

.error-message p {
    color: #666;
    margin-bottom: 20px;
}

.btn-retry {
    background: #4F46E5;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-retry:hover {
    background: #4338CA;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}


.filter-section {
    margin-bottom: 20px;
}

.filter-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
    color: #333;
    font-weight: 600;
}

.category-container {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.category-header {
    padding: 15px;
    background: #f8f8f8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e0e0e0;
    transition: background-color 0.3s ease;
}

.category-header:hover {
    background: #f0f0f0;
}

.category-header span {
    font-weight: 500;
    color: #333;
}

.category-header i {
    transition: transform 0.3s ease;
    color: #666;
}

.category-header.active i {
    transform: rotate(180deg);
}

.category-item {
    border-bottom: 1px solid #e0e0e0;
}

.category-item:last-child {
    border-bottom: none;
}

.category-main {
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    transition: background-color 0.3s ease;
}

.category-main:hover {
    background: #f5f5f5;
}

.category-main.selected {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.category-main.selected .category-name {
    color: #000000;
    font-weight: 600;
}

.category-name {
    font-size: 14px;
    color: #000000;
}

.category-count {
    font-size: 12px;
    color: #999;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
}

.subcategories-container {
    background: #fafafa;
    padding-left: 30px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.subcategories-container.expanded {
    overflow-y: auto;
}

.subcategory-item {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.3s ease;
}

.subcategory-item:last-child {
    border-bottom: none;
}

.subcategory-item:hover {
    background: #f0f0f0;
}

.subcategory-item.selected {
    background: #e3f2fd;
}

.subcategory-item.selected .subcategory-name {
    color: #1976d2;
    font-weight: 500;
}

.subcategory-name {
    font-size: 13px;
    color: #555;
}

.subcategory-count {
    font-size: 11px;
    color: #999;
    background: #e0e0e0;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 25px;
    text-align: center;
}

.all-categories {
    padding: 12px 15px;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    transition: background-color 0.3s ease;
}

.all-categories:hover {
    background: #f0f0f0;
}

.all-categories.selected {
    background: #ff9800;
    color: rgb(0, 0, 0);
}

.all-categories.selected .category-count {
    background: white;
    color: #ff9800;
}

.no-subcategories {
    padding: 15px;
    text-align: center;
    color: #999;
    font-size: 13px;
    font-style: italic;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.subcategories-container.expanded .subcategory-item {
    animation: slideDown 0.2s ease-out;
}

@media (max-width: 768px) {
    .category-main {
        padding: 15px;
    }
    
    .category-name {
        font-size: 15px;
    }
    
    .subcategory-item {
        padding: 12px 15px;
    }
    
    .subcategory-name {
        font-size: 14px;
    }
    
    .subcategories-container {
        padding-left: 20px;
    }
}
.price-range-dual {
    padding: 20px 10px;
    width: 100%;
}

.price-slider-container {
    position: relative;
    height: 40px;
    margin-bottom: 20px;
}

.price-slider {
    position: absolute;
    width: 100%;
    height: 5px;
    background: none;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 50%;
    transform: translateY(-50%);
}

.price-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-yellow);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    margin-top: -8px;
}

.price-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-yellow);
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.price-slider::-webkit-slider-runnable-track {
    height: 5px;
    background: transparent;
}

.slider-track {
    position: absolute;
    width: 100%;
    height: 5px;
    background: #e0e0e0;
    border-radius: 5px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.price-values-dual {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
}

.price-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    min-width: 0; 
}

.price-input span {
    color: #666;
    font-size: 14px;
    margin-right: 5px;
    white-space: nowrap; 
}

.price-input input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    outline: none;
    padding: 0;
    width: auto; 
    min-width: 60px; 
}

.price-input input[type="number"]::-webkit-inner-spin-button,
.price-input input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 20px;
}

@media (max-width: 768px) {
    .price-values-dual {
        flex-direction: column; 
        gap: 10px;
    }
    
    .price-input {
        width: 100%;
    }
}

.category-main {
    padding: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    min-height: 60px;
    color: #333;
}

.category-main.has-image {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    position: relative;
    background-size: cover !important;
    background-position: center !important;
}

.category-main.has-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
    z-index: 1;
}

.category-main.has-image .category-name,
.category-main.has-image .category-count {
    position: relative;
    z-index: 2;
}

.category-main.has-image .category-count {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: white;
}

.category-main:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.category-main.selected {
    background: #fff3e0;
    border-left: 3px solid #ff9800;
}

.category-main.has-image.selected::before {
    background: linear-gradient(to right, rgba(255,152,0,0.8), rgba(0,0,0,0.4));
}

.category-name {
    font-size: 14px;
    font-weight: 500;
}

.category-count {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    min-width: 30px;
    text-align: center;
}

.all-categories {
    padding: 15px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
}

.all-categories:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.all-categories.selected {
    background: var(--primary-yellow);
    color: white;
}

.all-categories.selected .category-count {
    background: white;
    color: #ff9800;
}
.toast.info {
    background: var(--primary-yellow) !important;
}

@media (max-width: 768px) {
    .subcategory-item {
        cursor: pointer;
        transition: background-color 0.2s ease;
    }
    
    .subcategory-item.selected {
        background: #e3f2fd;
        border-left: 3px solid #2196F3;
    }
    
    .subcategory-item.selected .subcategory-name {
        color: #1976d2;
        font-weight: 500;
    }
    
    .category-main.selected,
    .subcategory-item.selected {
        position: relative;
    }
    
    .category-main.selected::after,
    .subcategory-item.selected::after {
        content: '⏺';
        position: absolute;
        right: 10px;
        color: #ff9800;
        font-size: 12px;
        animation: pulse 1.5s infinite;
    }
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
.title-with-clear {
    display: flex;
    align-items: center;
    gap: 10px;
}

.title-with-clear h2 {
    margin: 0;
}

.clear-title-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ff4d4d;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(255, 77, 77, 0.3);
}

.clear-title-btn:hover {
    background-color: #ff3333;
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 77, 77, 0.4);
}

.clear-title-btn i {
    pointer-events: none;
}

@media (max-width: 768px) {
    .title-with-clear {
        flex-wrap: wrap;
    }
    
    .clear-title-btn {
        width: 24px;
        height: 24px;
        font-size: 12px;
    }
}
.emoji-icon {
    font-style: normal;
    margin-right: 8px;
    font-size: 16px;
}

.category-name {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
}

.all-categories .category-name i {
    color: #FFA000;
}

.category-container.subcategory-view {
    background: white;
    border-radius: 12px;
    overflow: hidden;
}

.subcategory-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #FFD700, #FFA000);
    color: white;
    gap: 15px;
}

.subcategory-back-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.subcategory-back-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.subcategory-header-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
}

.subcategory-header-title i {
    font-size: 20px;
}

.view-all-category {
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
}

.view-all-category:hover {
    background: #f0f0f0;
    padding-left: 25px;
}

.view-all-category.selected {
    background: #e8f5e9;
    border-left: 4px solid #4CAF50;
}

.view-all-category.selected .category-name {
    color: #2E7D32;
    font-weight: 600;
}

.view-all-category .category-name i {
    color: #4CAF50;
    margin-right: 8px;
}

.subcategory-filter-item {
    padding: 12px 20px 12px 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.3s ease;
    position: relative;
}

.subcategory-filter-item:last-child {
    border-bottom: none;
}

.subcategory-filter-item:hover {
    background: #f5f5f5;
    padding-left: 45px;
}

.subcategory-filter-item.selected {
    background: #e8f5e9;
    border-left: 3px solid #4CAF50;
}

.subcategory-filter-item.selected .subcategory-name {
    color: #2E7D32;
    font-weight: 600;
}

.subcategory-name {
    font-size: 13px;
    color: #666;
}

.category-main .category-name i {
    transition: transform 0.3s ease;
}

.category-main:hover .category-name i {
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .subcategory-header {
        padding: 18px 20px;
    }
    
    .subcategory-header-title {
        font-size: 18px;
    }
    
    .view-all-category {
        padding: 18px 20px;
    }
    
    .subcategory-filter-item {
        padding: 15px 20px 15px 45px;
    }
    
    .subcategory-name {
        font-size: 15px;
    }
    
    .category-name {
        font-size: 15px;
    }
    
    .emoji-icon {
        font-size: 18px;
    }
}
.category-banner-top {
    width: 100%;
    margin-bottom: 25px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    display: none;
}

.category-banner-wrapper {
    width: 100%;
    cursor: default;
    transition: transform 0.3s ease;
}

.category-banner-wrapper:hover {
    transform: translateY(-3px);
}

.category-banner-image {
    width: 100%;
    height: 200px;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    border-radius: 12px;
}

.category-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.5), rgba(0,0,0,0.2));
    display: flex;
    align-items: flex-end;
    padding: 30px;
    border-radius: 12px;
}

.category-banner-content {
    color: white;
    max-width: 80%;
}

.category-banner-content h2 {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.category-banner-content p {
    font-size: 16px;
    margin-bottom: 15px;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.banner-shop-now {
    display: inline-block;
    background: #FFD700;
    color: #333;
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.banner-shop-now i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.category-banner-wrapper:hover .banner-shop-now {
    background: #FFA000;
    transform: scale(1.05);
}

.category-banner-wrapper:hover .banner-shop-now i {
    transform: translateX(5px);
}

@media (max-width: 768px) {
    .category-banner-image {
        height: 150px;
    }
    
    .category-banner-overlay {
        padding: 20px;
    }
    
    .category-banner-content h2 {
        font-size: 20px;
    }
    
    .category-banner-content p {
        font-size: 14px;
    }
    
    .banner-shop-now {
        padding: 8px 20px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .category-banner-image {
        height: 120px;
    }
    
    .category-banner-overlay {
        padding: 15px;
    }
    
    .category-banner-content h2 {
        font-size: 18px;
        margin-bottom: 5px;
    }
    
    .banner-shop-now {
        padding: 6px 15px;
        font-size: 12px;
    }
}