/* Marketplace Styles */

.marketplace-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg);
}

.marketplace-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-xl);
}

/* ========== SIDEBAR FILTERS ========== */

.marketplace-sidebar {
    flex-shrink: 0;
}

.filters-header {
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filters-main-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Sidebar Header (desktop) */
.filters-sidebar-header {
    margin-bottom: 20px;
}

.filters-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

/* Sidebar Content */
.filters-sidebar-content {
    /* On desktop, no special styling needed */
}

/* Sidebar Footer */
.filters-sidebar-footer {
    margin-top: 24px;
}

.close-filters-btn {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 24px;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    transition: color 0.2s ease;
    line-height: 1;
}

.close-filters-btn:hover {
    color: #111827;
}

/* Sidebar Tabs */
.sidebar-content-tabs {
    display: none; /* Hidden on desktop */
}

/* Mobile Filter Button */
.mobile-filter-btn {
    display: none; /* Hidden on desktop */
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #8B1538;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(139, 21, 56, 0.2);
}

.mobile-filter-btn:hover {
    background: #a01842;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 21, 56, 0.3);
}

.mobile-filter-btn i {
    font-size: 16px;
}

/* Mobile Search Box (inside sidebar) */
.mobile-search-box {
    display: none; /* Hidden on desktop */
    margin-bottom: 20px;
}

.mobile-search-wrapper {
    display: flex;
    gap: 8px;
}

.mobile-search-input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: white;
}

.mobile-search-input:focus {
    outline: none;
    border-color: #8B1538;
    box-shadow: 0 0 0 3px rgba(139, 21, 56, 0.1);
}

.filter-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.filter-group {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.filter-group:hover {
    border-color: #d1d5db;
}

.filter-title {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid #e5e7eb;
}

/* Price Filter */
.price-filter {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 12px;
}

/* Dual Range Slider */
.dual-range-slider {
    position: relative;
    height: 6px;
    margin: 32px 0;
}

.range-track {
    position: absolute;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    top: 0;
    left: 0;
}

.range-fill {
    position: absolute;
    height: 6px;
    background: #111827;
    border-radius: 3px;
    top: 0;
    left: 0;
    transition: all 0.15s ease;
}

.range-min,
.range-max {
    position: absolute;
    width: 100%;
    height: 6px;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    top: 0;
    left: 0;
    margin: 0;
    padding: 0;
    border: 0 !important;
}

.range-min::-webkit-slider-thumb,
.range-max::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111827;
    cursor: pointer;
    pointer-events: auto;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
    margin-top: -6px;
}

.range-min::-moz-range-thumb,
.range-max::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #111827;
    cursor: pointer;
    pointer-events: auto;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.range-min::-webkit-slider-thumb:hover,
.range-max::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.range-min::-moz-range-thumb:hover,
.range-max::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.range-min::-webkit-slider-thumb:active,
.range-max::-webkit-slider-thumb:active {
    transform: scale(1.05);
}

.range-min::-moz-range-thumb:active,
.range-max::-moz-range-thumb:active {
    transform: scale(1.05);
}

.range-min::-webkit-slider-runnable-track,
.range-max::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
}

.range-min::-moz-range-track,
.range-max::-moz-range-track {
    width: 100%;
    height: 6px;
    cursor: pointer;
    background: transparent;
}

.range-max {
    z-index: 2;
}

/* Price Values Display */
.price-values {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.price-min-value,
.price-max-value {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-min-value {
    align-items: flex-start;
}

.price-max-value {
    align-items: flex-end;
}

.price-label {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.price-amount {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 9px 10px;
    border-radius: 6px;
    transition: background-color 0.15s ease;
}

.checkbox-item:hover,
.radio-item:hover {
    background-color: #f9fafb;
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #111827;
    flex-shrink: 0;
}

input[type="checkbox"]:indeterminate {
    accent-color: #9ca3af;
}

.checkbox-label,
.radio-label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    flex: 1;
    font-weight: 400;
    line-height: 1.5;
}

.checkbox-item:has(input:checked) .checkbox-label,
.radio-item:has(input:checked) .radio-label {
    color: #111827;
    font-weight: 500;
}

/* ========== MAIN MARKETPLACE ========== */

.marketplace-main {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

/* Search Results Header */
.search-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-lg);
    background: linear-gradient(135deg, #8B1538 0%, #a01842 100%);
    border-radius: var(--border-radius-lg);
    margin-bottom: var(--spacing-lg);
    color: white;
}

.search-results-info {
    flex: 1;
}

.search-results-title {
    margin: 0 0 var(--spacing-xs) 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.search-results-title i {
    font-size: 1.25rem;
}

.search-results-title strong {
    color: #fef3c7;
}

.search-results-count {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    opacity: 1;
}

.clear-search-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius-md);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.clear-search-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Results Header */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-lg);
    flex-wrap: wrap;
}

.results-info {
    flex: 1;
    min-width: 250px;
}

.results-title {
    margin: 0 0 var(--spacing-sm) 0;
    font-size: 1.75rem;
}

.results-count {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Content Tabs */
/* Content Tabs */
.content-tabs {
    display: flex;
    gap: 0;
    background: white;
    padding: 4px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    width: 100%;
    max-width: 500px;
}

.tab-button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 16px;
    background: transparent;
    color: #6b7280;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.tab-button:hover {
    color: #374151;
    background: #f9fafb;
}

.tab-button.active {
    background: #8B1538;
    color: white;
    box-shadow: 0 2px 8px rgba(139, 21, 56, 0.3);
}

.tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    font-size: 0.75rem;
    font-weight: 700;
    background: rgba(139, 21, 56, 0.1);
    color: #8B1538;
    border-radius: 11px;
    line-height: 1;
}

.tab-button.active .tab-count {
    background: rgba(255, 255, 255, 0.25);
    color: white;
}

/* ========== PRODUCTS GRID ========== */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--spacing-lg);
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== PRODUCT CARD ========== */

.product-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    position: relative;
}

.product-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary-color);
}

.product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product Image */
.product-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 240px;
    background-color: var(--bg-secondary);
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.product-card:hover .product-image {
    transform: scale(1.08);
}

/* Product Badge */
.product-badge {
    position: absolute;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.discount-badge {
    top: var(--spacing-md);
    left: var(--spacing-md);
    background-color: var(--danger-color);
    color: white;
}

.fast-shipping-badge {
    position: absolute;
    bottom: var(--spacing-md);
    left: var(--spacing-md);
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius-full);
    background-color: var(--success-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

/* Wishlist Button */
.wishlist-button {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.wishlist-button:hover {
    background: white;
    color: #ef4444;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.wishlist-button.active {
    background: #8B1538;
    color: white;
    box-shadow: 0 4px 12px rgba(139, 21, 56, 0.4);
}

.wishlist-button.active:hover {
    background: #a01842;
    transform: scale(1.1);
}

.wishlist-button i {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.wishlist-button:hover i {
    transform: scale(1.1);
}

.wishlist-button.active i {
    font-weight: 900;
}

/* Product Content */
.product-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.vendor-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-sm);
}

.vendor-name {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.vendor-badge {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
}

.vendor-badge.verified {
    background-color: #3b82f6;
}

.vendor-badge.premium {
    background-color: #f59e0b;
}

/* Product Name */
.product-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card:hover .product-name {
    color: var(--primary-color);
}

/* Rating */
.product-rating {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.stars {
    display: flex;
    gap: 2px;
}

.star {
    width: 16px;
    height: 16px;
    color: #d1d5db;
}

.star.filled {
    color: var(--primary-color);
}

.rating-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* Price Section */
.product-price-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.price-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.current-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.original-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

.stock-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.stock-badge.in-stock {
    background-color: #dcfce7;
    color: #166534;
}

.stock-badge.low-stock {
    background-color: #fef3c7;
    color: #d97706;
}

.stock-badge.out-of-stock {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* Product Tags */
.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.product-tag {
    padding: var(--spacing-xs) var(--spacing-sm);
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--border-radius-sm);
    font-size: 0.8rem;
}

/* Add to Cart Button */
.add-to-cart-button {
    width: calc(100% - 32px);
    padding: var(--spacing-sm);
    margin: 0 16px 16px 16px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.add-to-cart-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.add-to-cart-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.add-to-cart-button:disabled {
    background-color: var(--text-light);
    cursor: not-allowed;
    transform: none;
}

.add-to-cart-button.in-cart {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    cursor: default;
    transform: none;
    position: relative;
    padding-left: 35px;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.add-to-cart-button.in-cart::before {
    content: '✓';
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    font-weight: 700;
}

.add-to-cart-button.in-cart:hover {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%) !important;
    transform: none;
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

/* ========== VOUCHER CARD ========== */

.voucher-card {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.voucher-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.voucher-card .product-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.voucher-image-wrapper {
    position: relative;
    height: 240px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.voucher-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.voucher-badge {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);  /* Changed from right to left */
    background-color: var(--secondary-color);
    color: white;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius-full);
    font-weight: 600;
    font-size: 0.85rem;
    z-index: 5;  /* Ensure it's visible */
}

.voucher-content {
    padding: var(--spacing-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.voucher-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 var(--spacing-sm) 0;
}

.voucher-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0 0 var(--spacing-md) 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.voucher-footer {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-top: auto;
}

.voucher-price-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.voucher-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.voucher-original-price {
    font-size: 0.9rem;
    color: var(--text-light);
    text-decoration: line-through;
}

/* ========== EMPTY STATE ========== */

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-3xl) var(--spacing-lg);
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    margin: 0 auto var(--spacing-lg);
    color: var(--text-light);
}

.empty-icon svg {
    width: 64px;
    height: 64px;
}

.empty-title {
    font-size: 1.5rem;
    margin: 0 0 var(--spacing-sm) 0;
}

.empty-description {
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .marketplace-wrapper {
        grid-template-columns: 250px 1fr;
        gap: var(--spacing-lg);
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: var(--spacing-md);
    }
}

@media (max-width: 768px) {
    /* Prevent horizontal scroll */
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }

    .marketplace-container {
        padding: var(--spacing-sm);
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }

    .marketplace-wrapper {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        overflow-x: hidden;
        max-width: 100%;
        width: 100%;
    }

    /* Show mobile filter button */
    .mobile-filter-btn {
        display: flex;
        width: 100%;
        max-width: 100%;
        flex-shrink: 0;
    }

    /* Show mobile search box in sidebar */
    .mobile-search-box {
        display: block;
        width: 100%;
        overflow-x: hidden;
    }

    /* Show close button in sidebar */
    .close-filters-btn {
        display: block;
        flex-shrink: 0;
    }

    /* Show tabs in sidebar */
    .sidebar-content-tabs {
        display: flex;
        gap: 8px;
        width: 100%;
        overflow-x: hidden;
    }

    .sidebar-tab-button {
        flex: 1;
        padding: 10px 12px;
        background: #f9fafb;
        border: none;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 600;
        color: #6b7280;
        text-decoration: none;
        text-align: center;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .sidebar-tab-button.active {
        background: #8B1538;
        color: white;
        box-shadow: 0 2px 8px rgba(139, 21, 56, 0.3);
    }

    .tab-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        font-size: 0.75rem;
        font-weight: 700;
        background: rgba(139, 21, 56, 0.1);
        color: #8B1538;
        border-radius: 11px;
        line-height: 1;
    }

    .sidebar-tab-button.active .tab-badge {
        background: rgba(255, 255, 255, 0.25);
        color: white;
    }

    /* Sidebar as full-screen overlay */
    .marketplace-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 100%;
        height: 100vh;
        background-color: #ffffff;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: none;
        padding: 0;
        display: flex;
        flex-direction: column;
    }

    .marketplace-sidebar.active {
        left: 0;
    }

    /* Fixed Header */
    .filters-sidebar-header {
        position: sticky;
        top: 0;
        background: white;
        padding: 16px 20px;
        border-bottom: 1px solid #e5e7eb;
        z-index: 10;
        margin-bottom: 0;
    }

    .filters-header-top {
        margin-bottom: 16px;
    }

    /* Scrollable Content */
    .filters-sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px;
        -webkit-overflow-scrolling: touch;
    }

    /* Fixed Footer */
    .filters-sidebar-footer {
        position: sticky;
        bottom: 0;
        background: white;
        padding: 16px 20px;
        border-top: 1px solid #e5e7eb;
        display: flex;
        gap: 12px;
        z-index: 10;
        margin-top: 24px;
    }

    .btn-apply-filters,
    .btn-reset-filters {
        flex: 1;
        padding: 14px 20px;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .btn-apply-filters {
        background: #8B1538;
        color: white;
    }

    .btn-apply-filters:hover {
        background: #a01842;
    }

    .btn-reset-filters {
        background: #f3f4f6;
        color: #6b7280;
    }

    .btn-reset-filters:hover {
        background: #e5e7eb;
    }

    /* Overlay backdrop */
    .filters-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .filters-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: var(--spacing-md);
        overflow-x: hidden;
        width: 100%;
    }

    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
        overflow-x: hidden;
        width: 100%;
    }

    .results-info {
        width: 100%;
        overflow-x: hidden;
        min-width: 0; /* Remove min-width on mobile */
    }

    .results-title {
        font-size: 1.25rem;
        word-break: break-word;
    }

    .results-count {
        font-size: 0.9rem;
    }

    .content-tabs {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .tab-button {
        font-size: 0.85rem;
        padding: 10px 8px;
        white-space: nowrap;
    }

    .tab-count {
        font-size: 0.7rem;
    }

    /* Search results header mobile */
    .search-results-header {
        flex-direction: column;
        gap: var(--spacing-md);
        padding: var(--spacing-md);
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }

    .search-results-info {
        width: 100%;
        overflow-x: hidden;
    }

    .search-results-title {
        font-size: 1.25rem;
        flex-wrap: wrap;
        word-break: break-word;
        overflow-x: hidden;
        width: 100%;
    }

    .search-results-count {
        font-size: 0.9rem;
    }

    .clear-search-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .marketplace-container {
        padding: var(--spacing-sm);
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
        width: 100%;
        max-width: 100%;
    }

    .product-card,
    .voucher-card {
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .product-image-wrapper,
    .voucher-image-wrapper {
        width: 100%;
        overflow: hidden;
    }

    .product-image,
    .voucher-image {
        width: 100%;
        max-width: 100%;
    }

    /* Search results header small mobile */
    .search-results-header {
        padding: var(--spacing-sm);
    }

    .search-results-title {
        font-size: 1.1rem;
    }

    .search-results-title i {
        font-size: 1rem;
    }

    .search-results-count {
        font-size: 0.8rem;
    }

    .clear-search-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.875rem;
    }
}

    .product-card {
        border-radius: var(--border-radius-md);
    }

    .product-image-wrapper {
        height: 180px;
    }

    .product-content {
        padding: var(--spacing-sm);
    }

    .product-name {
        font-size: 0.9rem;
    }

    .current-price {
        font-size: 1.1rem;
    }

    .results-title {
        font-size: 1.5rem;
    }

    .results-count {
        font-size: 0.85rem;
    }

    .content-tabs {
        overflow-x: auto;
        scroll-behavior: smooth;
    }

    .tab-button {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.85rem;
    }

    .marketplace-sidebar {
        width: 100%;
        left: -100%;
        top: 52px;
        height: calc(100vh - 52px);
        border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    }
}

