.filter-products-container {
    display: flex;
    gap: 1.5rem;
    padding: 0 1.5rem;
}

.filter-sidebar {
    width: 280px;
    flex-shrink: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    position: sticky;
    top: 5rem;
    align-self: flex-start;
    margin-top: 1rem;
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
}

/* Custom scrollbar */
.filter-sidebar::-webkit-scrollbar {
    width: 8px;
}

.filter-sidebar::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.filter-sidebar::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Mobile filter scrollbar - more visible */
@media (max-width: 768px) {
    .filter-sidebar::-webkit-scrollbar {
        width: 10px;
    }

    .filter-sidebar::-webkit-scrollbar-track {
        background: #e5e7eb;
    }

    .filter-sidebar::-webkit-scrollbar-thumb {
        background: #6b7280;
    }
}

/* Mobile filter modal scrollbar */
.m-sidebar__filter::-webkit-scrollbar {
    width: 10px;
}

.m-sidebar__filter::-webkit-scrollbar-track {
    background: #e5e7eb;
    border-radius: 5px;
}

.m-sidebar__filter::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 5px;
}

.m-sidebar__filter::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

.filter-heading {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    padding: 10px 0;
}

.filter-actions {
    padding: 1rem;
    border-top: 1px solid #edf2f7;
    text-align: center;
}

.clear-filters-btn {
    background: #fff;
    color: #ef394e;
    border: 1px solid #ef394e;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.clear-filters-btn:hover {
    background: #ef394e;
    color: #fff;
}


.category-filter {
    padding: 1rem;
    border-bottom: 1px solid #e1e1e1;
}

.category-list,
.brand-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 0.75rem 1rem;
    position: relative;
    box-shadow: inset 0 10px 8px -8px rgba(0, 0, 0, 0.08),
                inset 0 -10px 8px -8px rgba(0, 0, 0, 0.08);
}

.category-list::-webkit-scrollbar,
.brand-list::-webkit-scrollbar {
    width: 6px;
}

.category-list::-webkit-scrollbar-track,
.brand-list::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb,
.brand-list::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 3px;
}

.category-list::-webkit-scrollbar-thumb:hover,
.brand-list::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.category-item,
.brand-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.category-item input[type="checkbox"],
.brand-item input[type="checkbox"] {
    margin-left: 0.5rem;
}

.category-item label,
.brand-item label {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    color: #212529;
    cursor: pointer;
}

.category-checkbox,
.brand-checkbox {
    cursor: pointer;
}

.subcategory-list {
    margin-right: 1.5rem;
    margin-top: 0.5rem;
    padding-right: 0.75rem;
    border-right: 1px solid #edf2f7;
}

.subcategory-item {
    margin-bottom: 0.3rem;
}

/* Mobile Filter Modal */
.m-sidebar__filter {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 1000;
    top: 0;
    right: 0;
    background-color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
    transition: width 0.3s ease;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
}

.m-sidebar__filter .close-btn {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 36px;
    color: #ef394e;
    text-decoration: none;
    z-index: 1001;
}

.m-filter-auction-content {
    padding: 50px 20px 20px;
}

/* Mobile filter toggle button - Hidden on desktop */
.categoryName-sorting {
    display: none !important;
    padding: 1rem;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 1rem;
}

.m-filter-icon {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    background: #f7fafc;
    border-radius: 8px;
    transition: background 0.2s;
}

.m-filter-icon:hover {
    background: #edf2f7;
}

.filter-text {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

.landing__content {
    flex: 1;
    min-width: 0;
}

.brand-filter {
    padding: 1rem;
}

/* اصلاح اسلایدر اصلی */
.landing__slider {
    margin: 1rem 1.5rem 0 1.5rem;
    overflow: hidden;
    border-radius: 10px;
    height: auto;
}

.landing__slider swiper-slide {
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing__slider img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    display: block;
}

.landing__dou-banner {
    display: flex;
    margin: .5rem 1.5rem;
    gap: .5rem;
}

.landing__dou-banner div {
    width: calc(50% - 0.3rem);
    overflow: hidden;
    border-radius: 10px;
}

.landing__dou-banner div img {
    width: 100%;
    height: auto;
    display: block;
}

.landing__carousel {
    overflow: hidden;
    margin: .5rem 1.5rem;
}

.landing__carousel swiper-container {
    border: 1px solid #e1e1e1;
    border-radius: 10px;
}

.landing__carousel--head {
    padding: 0.5rem;
    border: 1px solid #e01a38;
    text-align: center;
    background-color: #e01a38;
    border-radius: 10px;
}

.landing__carousel--head strong {
    font-size: 1.8rem;
    font-weight: 500;
}

/* اصلاح کارت‌های محصول در اسلایدر */
.landing__card {
    width: 210px;
    background-color: #fff;
    border-left: 1px solid #e1e1e1;
    position: relative;
    transition: all .2s;
    display: flex;
    flex-direction: column;
    padding: 0.75rem;
}

.landing__card-top swiper-slide {
    width: auto !important;
    height: auto !important;
}

.landing__card-top swiper-slide:hover .landing__card {
    box-shadow: 0 0 30px 0 #0000001a;
    z-index: 10;
}

.landing__card--img {
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.landing__card--img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.landing__card--content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.landing__card small {
    display: block;
    text-align: left;
    font-size: 15px;
    font-weight: 600;
    color: #424242;
    margin: 0;
}

.real-price-off-percent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 3px 0;
    margin-top: auto;
}

.real-price-off-percent > span {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    height: 22px;
    min-width: 38px;
    background-color: #d32f2f;
    color: #fff;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
}

.landing__card s {
    display: block;
    text-align: left;
    font-size: 14px;
    color: #9d9da4;
    font-weight: 500;
    margin: 0;
}

.product-name {
    color: #212529;
    font-size: 13px;
    line-height: 1.5;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0;
    padding: 0;
    word-wrap: break-word;
}

.product-name a {
    color: inherit;
    text-decoration: none;
}

.discount-details {
    display: flex;
    flex-direction: row-reverse;
    padding: 0 0.5rem;
    align-items: center;
}

.discount-details-carousel {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.rest-number {
    color: #000;
    padding: 0.25rem 0;
    border-radius: 10px;
    font-size: 0.8rem;
    white-space: nowrap;
    line-height: 1.2;
    font-weight: 500;
}

.rest-time-off-price {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: space-between;
}

.off-percent {
    background-color: #ef394e;
    color: #fff;
    border-radius: 50% !important;
    font-size: .9rem;
    padding: 5px;
    position: absolute;
    top: 3%;
    right: 10px;
    min-width: 30px;
    min-height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.text-card {
    position: absolute;
    top: 7px;
    right: 10px;
}

.landing__single-banner {
    margin: 1.5rem 1.5rem 0 1.5rem;
    width: calc(100% - 3rem);
}

.landing__single-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.landing__products {
    margin: 1rem auto;
    overflow: hidden;
}

.landing__products--header {
    width: 100%;
    height: 4rem;
    padding: 0 0.5rem;
    background-color: #f5f6f6;
    display: flex;
    align-items: center;
    overflow-x: auto;
}

.landing__products--header span {
    font-size: 1.2rem;
    padding: 1rem;
    height: 4rem;
    flex-shrink: 0;
}

.landing__products--header span a {
    color: #828282;
}

.landing__products--header>.selected {
    border-bottom: 2px solid #2ab88d;
}

.landing__products--header>.selected a {
    color: #2ab88d;
}

.landing__products--main {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
}

.landing__products--card.landing__card {
    width: 100%;
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    background: #fff;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.landing__products--card .landing__card--img {
    height: 300px;
    margin-bottom: 0.75rem;
}

.landing__products--card .landing__card--content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 140px;
}

.landing__products--card .product-name {
    height: 40px;
}

.landing__products--card small {
    font-size: 15px;
    font-weight: 600;
    margin: 0.25rem 0;
}

.landing__products--card {
    transition: all .2s;
    position: relative;
}

.landing__products--card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

/* Discount badge */
.discount-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #d32f2f;
    color: #fff;
    border-radius: 16px;
    width: 44px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    z-index: 10;
}

/* Enhanced price section */
.price-section {
    margin-top: auto;
    padding-top: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.current-price {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.price-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2c3e50;
}

.price-currency {
    font-size: 0.85rem;
    color: #718096;
}

.original-price s {
    font-size: 0.9rem;
    color: #a0aec0;
}

@media (max-width: 768px) {
    .price-section {
        flex-direction: row-reverse;
    }
}

/* Inventory badge */
.inventory-info {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #edf2f7;
}

.inventory-info .rest-number {
    background: #ef394e;
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.page-counter {
    background: #ffffff;
    border-radius: 8px;
    padding: 1.25rem 1rem;
    margin-top: 2rem !important;
    border: 1px solid #e2e8f0;
}

.page-counter__scroll {
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.page-counter nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.page-counter .pagination {
    display: flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
    list-style: none;
    align-items: center;
}

.page-counter .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #4b5563;
    text-decoration: none;
    min-width: 40px;
    text-align: center;
    font-weight: 400;
    font-size: 0.95rem;
    background: #ffffff;
    cursor: pointer;
}

.page-counter .page-link:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.page-counter .page-item.active .page-link {
    background: #ef394e;
    border-color: #ef394e;
    color: #ffffff;
    font-weight: 500;
}

.page-counter .page-item.disabled .page-link {
    color: #d1d5db;
    background: #f9fafb;
    border-color: #e5e7eb;
    pointer-events: none;
    cursor: not-allowed;
}

/* Responsive design */
@media (max-width: 768px) {
    .page-counter {
        padding: 1rem 0.5rem;
    }

    .page-counter .pagination {
        gap: 0.4rem;
    }

    .page-counter .page-link {
        padding: 0.5rem 0.8rem;
        min-width: 36px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .page-counter .pagination {
        gap: 0.3rem;
    }

    .page-counter .page-link {
        padding: 0.45rem 0.7rem;
        min-width: 34px;
        font-size: 0.85rem;
    }
}

.category-filter {
    padding: 1rem;
    border-bottom: 1px solid #e1e1e1;
}

.category-list {
    max-height: 300px;
    overflow-y: auto;
}

.category-item {
    margin-bottom: 0.5rem;
}

.category-item label {
    font-size: 0.9rem;
    color: #212529;
    cursor: pointer;
    margin-right: 0.5rem;
}

.subcategory-list {
    margin-right: 1.5rem;
    margin-top: 0.5rem;
}

.subcategory-item {
    margin-bottom: 0.3rem;
}

.category-item input[type="checkbox"] {
    margin-left: 0.5rem;
}

.category-checkbox {
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .landing__products--main {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.25rem;
    }

    .filter-sidebar {
        width: 260px;
    }
}

@media (max-width: 1000px) {
    .landing__products--main {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .filter-products-container {
        gap: 1rem;
    }

    .filter-sidebar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .filter-products-container {
        flex-direction: column;
        padding: 0;
    }

    .filter-sidebar {
        display: none;
    }

    .categoryName-sorting {
        display: block !important;
    }

    .landing__products--main {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 0;
    }

    .discount-badge {
        width: 40px;
        height: 26px;
        font-size: 0.75rem;
    }

    .landing__slider {
        margin: 1rem 1rem 0 1rem;
    }

    .landing__slider img {
        max-height: 350px;
    }
}

@media (max-width: 550px) {
    .landing__dou-banner {
        flex-direction: column;
        margin: .5rem;
    }

    .landing__dou-banner div {
        width: auto;
    }

    .landing__slider,
    .landing__carousel {
        margin: 0.5rem;
    }

    .landing__slider img {
        max-height: 250px;
    }

    .landing__products--card .landing__card--img {
        height: 180px;
    }

    .landing__products--main {
        gap: 0.5rem;
        padding: 0.75rem;
    }

    .landing__card {
        width: 180px;
    }

    .landing__card--img {
        height: 150px;
    }

    .landing__card--content {
        gap: 0.4rem;
    }

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

    .landing__card small {
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .landing__products--main {
        grid-template-columns: 1fr;
        max-width: 320px;
        margin: 0 auto;
    }

    .filter-products-container {
        padding: 0;
    }

    .landing__single-banner {
        margin: 1rem 0.5rem 0 0.5rem;
        width: calc(100% - 1rem);
    }

    .landing__card {
        width: 160px;
    }

    .landing__card--img {
        height: 130px;
    }

    .landing__card small {
        font-size: 12px;
    }

    .real-price-off-percent > span {
        font-size: 11px;
        min-width: 32px;
        height: 20px;
    }

    .inventory-info .rest-number {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }

    .discount-badge {
        width: 38px;
        height: 24px;
        font-size: 0.7rem;
    }
}