.category-hero {
    padding: 10px 0 34px
}

.category-banner {
    min-height: 360px;
    border-radius: 36px;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: radial-gradient(circle at 14% 16%, rgba(255, 212, 59, .45), transparent 24%), radial-gradient(circle at 82% 30%, rgba(217, 72, 15, .42), transparent 26%), linear-gradient(135deg, #080b10 0%, #151923 38%, #d9480f 73%, #ffd43b 100%);
    color: #fff;
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    gap: 20px;
    align-items: center;
    padding: 42px;
    position: relative;
    isolation: isolate
}

.category-banner:before {
    content: "";
    position: absolute;
    inset: 18px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 28px;
    z-index: -1
}

.category-banner:after {
    content: "KAIMONO";
    position: absolute;
    left: 36px;
    bottom: -12px;
    font-size: clamp(56px, 11vw, 150px);
    font-weight: 950;
    color: rgba(255, 255, 255, .08);
    letter-spacing: -4px;
    z-index: -1
}

.kicker {
    display: inline-flex;
    padding: 9px 14px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .1);
    border-radius: 999px;
    margin-bottom: 18px;
    font-size: 13px;
    font-weight: 900
}

.category-hero-text h1 {
    margin: 0 0 16px;
    font-size: clamp(34px, 5vw, 62px);
    line-height: 1.22
}

.category-hero-text p {
    margin: 0 0 22px;
    color: rgba(255, 255, 255, .78);
    line-height: 2.05;
    font-size: 15px
}

.subcats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px
}

.subcat-btn {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    border-radius: 999px;
    padding: 12px 16px;
    font-weight: 900;
    cursor: pointer
}

.subcat-btn.active,
.subcat-btn:hover {
    background: #fff;
    color: #111827
}

.category-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
    max-width: 640px
}

.stat-item {
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 20px;
    padding: 15px
}

.stat-item strong {
    display: block;
    font-size: 22px
}

.stat-item span {
    color: rgba(255, 255, 255, .7);
    font-size: 12px
}

.banner-visual {
    min-height: 280px;
    display: grid;
    place-items: center
}

.floating-book {
    width: min(75%, 320px);
    aspect-ratio: .7;
    background: linear-gradient(135deg, #111827, #d9480f 56%, #ffd43b);
    border-radius: 18px 30px 30px 18px;
    box-shadow: 0 35px 80px rgba(0, 0, 0, .34);
    transform: perspective(1000px) rotateY(-12deg) rotateX(4deg);
    color: #fff;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden
}

.floating-book strong {
    font-size: 34px;
    line-height: 1.25
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 250px;
    gap: 32px;
    align-items: start;
    padding-bottom: 44px;
    direction: ltr
}

.shop-layout>* {
    direction: rtl
}

.filter-sidebar {
    grid-column: 2;
    position: sticky;
    top: 150px;
    min-width: 0;
    z-index: 2
}

.products-card {
    grid-column: 1;
    min-width: 0;
    overflow: hidden;
    padding: 28px
}

.filter-card,
.products-card,
.seo-panel {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(30, 30, 30, .08);
    border-radius: 28px;
    box-shadow: var(--shadow-soft)
}

.filter-card {
    padding: 16px
}

.filter-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px
}

.filter-title h3 {
    margin: 0;
    font-size: 16px
}

.clear-filters {
    border: 0;
    background: #fff0f0;
    color: var(--danger);
    border-radius: 999px;
    padding: 7px 9px;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
    white-space: nowrap
}

.filter-group {
    border-top: 1px solid rgba(30, 30, 30, .08);
    padding-top: 14px;
    margin-top: 14px
}

.filter-group:first-of-type {
    border-top: 0;
    padding-top: 0;
    margin-top: 0
}

.filter-group h4 {
    margin: 0 0 10px;
    font-size: 13px
}

.check-list {
    display: grid;
    gap: 9px
}

.check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #374151;
    font-size: 12.5px;
    cursor: pointer
}

.check-item input {
    accent-color: var(--primary)
}

.range-box {
    display: grid;
    gap: 10px
}

.range-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px
}

.range-row input,
.toolbar select,
.mobile-filter-btn,
#filterSearch {
    border: 1px solid rgba(30, 30, 30, .1);
    background: #fff;
    border-radius: 14px;
    min-height: 42px;
    padding: 0 10px;
    outline: none;
    color: #374151;
    width: 100%
}

.apply-btn {
    border: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    min-height: 44px;
    border-radius: 16px;
    cursor: pointer;
    font-weight: 950
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(30, 30, 30, .08);
    margin-bottom: 20px
}

.toolbar-info h2 {
    margin: 0 0 4px;
    font-size: 24px
}

.toolbar-info p {
    margin: 0;
    color: var(--muted);
    font-size: 13px
}

.toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap
}

.view-btn {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(30, 30, 30, .1);
    background: #fff;
    border-radius: 14px;
    cursor: pointer;
    font-size: 18px
}

.view-btn.active,
.view-btn:hover {
    background: var(--primary);
    color: #fff
}

.mobile-filter-btn {
    display: none;
    font-weight: 950;
    cursor: pointer
}

.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px
}

.filter-chip {
    border: 1px solid rgba(35, 86, 216, .14);
    background: #f3f6ff;
    color: var(--primary-2);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px
}

.products-grid.list-view {
    grid-template-columns: 1fr
}

.product-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(30, 30, 30, .08);
    border-radius: 24px;
    overflow: visible;
    margin-top: 12px;
    box-shadow: 0 12px 35px rgba(16, 24, 40, .07);
    transition: .25s;
    display: flex;
    flex-direction: column;
    min-width: 0
}

.product-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow)
}

.book-cover {
    height: 263px;
    margin: 14px 14px 0;
    border-radius: 18px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--c1), var(--c2));
    display: grid;
    place-items: center;
    color: #fff
}

.book-cover:before {
    content: "";
    position: absolute;
    inset: 16px 24px;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 14px
}

.book-cover:after {
    content: "";
    position: absolute;
    left: 18px;
    top: 0;
    height: 100%;
    width: 18px;
    background: rgba(255, 255, 255, .16)
}

.book-cover span:not(.badge) {
    text-align: center;
    padding: 0 28px;
    font-size: 22px;
    font-weight: 950;
    line-height: 1.45;
    text-shadow: 0 4px 18px rgba(0, 0, 0, .2);
    z-index: 1
}

.badge {
    position: absolute;
    top: 14px;
    right: 14px;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 11px;
    font-weight: 900;
    background: #fff;
    color: var(--danger);
    box-shadow: 0 10px 20px rgba(16, 24, 40, .12);
    z-index: 2
}

.product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1
}

.product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px
}

.stars {
    color: var(--accent);
    letter-spacing: -1px
}

.product-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    min-height: 54px
}

.product-desc {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.9;
    display: none
}

.product-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px
}

.price {
    display: flex;
    flex-direction: column;
    line-height: 1.5
}

.price del {
    color: #a0a0a0;
    font-size: 12px
}

.price strong {
    color: var(--primary-2);
    font-size: 16px
}

.add-cart {
    border: 0;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: #111827;
    color: #fff;
    cursor: pointer;
    font-size: 18px
}

.products-grid.list-view .product-card {
    display: grid;
    grid-template-columns: 220px 1fr
}

.products-grid.list-view .book-cover {
    height: auto;
    min-height: 240px;
    margin: 14px
}

.products-grid.list-view .product-title {
    min-height: auto;
    font-size: 18px
}

.products-grid.list-view .product-desc {
    display: block
}

.pagination-box,
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    flex-wrap: wrap
}

.seo-panel {
    padding: 28px;
    margin-bottom: 42px
}

.seo-panel h2 {
    margin: 0 0 14px;
    font-size: 28px
}

.seo-panel p,
.seo-panel .seo-content-body {
    color: #4b5563;
    line-height: 2.2;
    margin: 0 0 14px;
    font-size: 15px
}

.toast {
    position: fixed;
    left: 20px;
    bottom: 20px;
    background: #111827;
    color: #fff;
    border-radius: 18px;
    padding: 14px 18px;
    box-shadow: var(--shadow);
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: .25s;
    z-index: 2000;
    font-weight: 850
}

.toast.show {
    transform: translateY(0);
    opacity: 1
}

@media(max-width:1100px) {
    .category-banner {
        grid-template-columns: 1fr
    }

    .shop-layout {
        grid-template-columns: 1fr;
        direction: rtl
    }

    .filter-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(320px, 88vw);
        z-index: 1600;
        transform: translateX(-105%);
        transition: .25s;
        overflow-y: auto;
        padding: 16px;
        background: rgba(247, 245, 239, .95);
        backdrop-filter: blur(18px);
        grid-column: auto
    }

    .filter-sidebar.open {
        transform: translateX(0)
    }

    .products-card {
        grid-column: auto
    }

    .mobile-filter-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr))
    }
}

@media(max-width:820px) {
    .category-stats {
        grid-template-columns: 1fr
    }

    .products-grid.list-view .product-card {
        grid-template-columns: 1fr
    }
}

@media(max-width:620px) {
    .category-banner {
        padding: 26px;
        border-radius: 28px
    }

    .floating-book {
        width: 82%
    }

    .products-grid {
        grid-template-columns: 1fr
    }

    .toolbar-actions {
        width: 100%
    }

    .toolbar select,
    .mobile-filter-btn {
        flex: 1
    }
}

.banner-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-banner-image {
    width: 100%;
    max-width: 700px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 24px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, .25);
    border: 4px solid rgba(255, 255, 255, .15);
}

.breadcrumb-section {
    padding: 20px 0;
}

.modern-breadcrumb {
    background:
        linear-gradient(135deg,
            rgba(255, 255, 255, .95),
            rgba(255, 248, 240, .95));

    border: 1px solid rgba(30, 30, 30, .06);
    border-radius: 24px;

    padding: 20px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;

    box-shadow:
        0 10px 35px rgba(16, 24, 40, .05);

    position: relative;
    overflow: hidden;
}

.modern-breadcrumb::before {
    content: '';
    position: absolute;

    width: 180px;
    height: 180px;

    background:
        radial-gradient(circle,
            rgba(217, 72, 15, .08),
            transparent);

    top: -80px;
    left: -80px;
}

.breadcrumb-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.breadcrumb-icon {
    width: 58px;
    height: 58px;

    border-radius: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 26px;

    background:
        linear-gradient(135deg,
            #a42d25,
            #742019);

    color: #fff;

    box-shadow:
        0 10px 25px rgba(35, 86, 216, .25);
}

.breadcrumb-left h2 {
    margin: 0 0 5px;
    font-size: 24px;
    font-weight: 900;
    color: #111827;
}

.breadcrumb-links {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #6b7280;
    font-size: 13px;
}

.breadcrumb-links a {
    color: #a42d25;
    font-weight: 700;
    text-decoration: none;
}

.breadcrumb-links a:hover {
    color: #d9480f;
}

.breadcrumb-links i {
    font-size: 10px;
}

.breadcrumb-links .current {
    color: #374151;
    font-weight: 800;
}

.breadcrumb-badge {
    background:
        linear-gradient(135deg,
            #d9480f,
            #f59e0b);

    color: #fff;

    padding: 10px 18px;

    border-radius: 999px;

    font-size: 13px;
    font-weight: 900;

    box-shadow:
        0 10px 25px rgba(217, 72, 15, .2);

    white-space: nowrap;
}

@media(max-width:768px) {

    .modern-breadcrumb {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb-badge {
        align-self: flex-start;
    }

    .breadcrumb-left h2 {
        font-size: 20px;
    }

}
/* =========================
   Category Pagination
========================= */

#paginationWrapper {
    width: 100%;
    margin-top: 30px;
}

.products-pagination {
    width: 100%;
    padding: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff, #f8faff);
    box-shadow: 0 12px 35px rgba(15, 23, 42, 0.06);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.products-pagination__info {
    color: #64748b;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.products-pagination__info strong {
    color: #a42d25;
    font-weight: 900;
}

.products-pagination__items {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
}

.pagination-button {
    min-width: 42px;
    height: 42px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border: 1px solid #dbe3f0;
    border-radius: 12px;

    background: #fff;
    color: #334155;

    font-size: 13px;
    font-weight: 850;
    line-height: 1;

    text-decoration: none;
    cursor: pointer;

    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.05);

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

a.pagination-button:hover {
    color: #fff;
    border-color: #a42d25;
    background: linear-gradient(135deg, #a42d25, #742019);
    box-shadow: 0 10px 22px rgba(35, 86, 216, 0.2);
    transform: translateY(-2px);
}

.pagination-number {
    padding: 0;
}

.pagination-number.active {
    color: #fff;
    border-color: #a42d25;
    background: linear-gradient(135deg, #a42d25, #742019);
    box-shadow: 0 10px 24px rgba(35, 86, 216, 0.24);
}

.pagination-navigation {
    min-width: 82px;
}

.pagination-navigation span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.pagination-button.disabled {
    color: #a8b1bf;
    border-color: #edf0f5;
    background: #f5f7fa;
    box-shadow: none;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-dots {
    min-width: 30px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;
    font-size: 20px;
    font-weight: 900;
}

@media (max-width: 640px) {
    #paginationWrapper {
        margin-top: 20px;
    }

    .products-pagination {
        padding: 15px 10px;
        border-radius: 18px;
    }

    .products-pagination__items {
        width: 100%;
        gap: 5px;
    }

    .pagination-button {
        min-width: 36px;
        height: 36px;
        padding: 0 8px;
        border-radius: 10px;
        font-size: 12px;
    }

    .pagination-number {
        padding: 0;
    }

    .pagination-navigation {
        min-width: 64px;
    }

    .pagination-navigation span {
        font-size: 17px;
    }

    .pagination-dots {
        min-width: 22px;
        height: 36px;
    }
}
/* ===================================
   Category Subcategories Collapse
=================================== */

.subcats .subcat-extra {
    display: none;
}

.subcats.is-expanded .subcat-extra {
    display: inline-flex;
}

.subcat-more-btn {
    min-height: 40px;
    padding: 8px 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 1px dashed rgba(255, 255, 255, 0.55);
    border-radius: 999px;

    background: rgba(255, 255, 255, 0.1);
    color: #fff;

    font-size: 12px;
    font-weight: 900;

    cursor: pointer;
    backdrop-filter: blur(8px);

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.subcat-more-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: translateY(-2px);
}

.subcat-more-dots {
    font-size: 16px;
    line-height: 1;
    letter-spacing: 2px;
}

/* ===================================
   Category Discount Slider
=================================== */

.category-discount-section {
    margin-top: 30px;
    margin-bottom: 34px;
    padding: 26px;

    border-radius: 30px;
    overflow: hidden;

    background:
        radial-gradient(
            circle at right top,
            rgba(255, 255, 255, 0.18),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #8f1025 0%,
            #e03131 55%,
            #ff922b 100%
        );

    box-shadow: 0 20px 55px rgba(145, 20, 40, 0.18);
}

.category-discount-head {
    margin-bottom: 20px;

    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;

    color: #fff;
}

.category-discount-kicker {
    display: inline-flex;
    margin-bottom: 7px;

    font-size: 12px;
    font-weight: 900;

    opacity: 0.9;
}

.category-discount-head h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.5;
}

.category-discount-head p {
    margin: 7px 0 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
}

.category-discount-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.category-discount-arrow {
    width: 44px;
    height: 44px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 0;
    border-radius: 14px;

    background: rgba(255, 255, 255, 0.96);
    color: #9f1239;

    font-size: 25px;
    font-weight: 950;
    line-height: 1;

    cursor: pointer;

    box-shadow: 0 10px 24px rgba(60, 10, 20, 0.15);

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.category-discount-arrow:hover {
    color: #fff;
    background: #111827;
    transform: translateY(-2px);
}

.discount-products-track {
    width: 100%;
    padding: 24px 2px 14px;

    display: flex;
    align-items: stretch;
    gap: 14px;

    overflow-x: auto;
    overflow-y: hidden;

    direction: ltr;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;

    cursor: grab;

    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

.discount-products-track::-webkit-scrollbar {
    display: none;
}

.discount-products-track.is-dragging {
    cursor: grabbing;
    scroll-snap-type: none;
}

.discount-products-track > * {
    flex: 0 0 220px;
    min-width: 220px;

    direction: rtl;
    scroll-snap-align: start;
}

.discount-products-track .product-card,
.discount-products-track .shop-product-card {
    /* height: 100%; */
}

/* ===================================
   Products Grid - Five Columns
=================================== */

.shop-layout {
    width: min(1550px, calc(100% - 32px));
    max-width: none;
}

.products-card {
    min-width: 0;
}

#productsGrid:not(.list-view) {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 14px;
}

#productsGrid:not(.list-view) > * {
    min-width: 0;
    width: 100%;
}

/* لپ‌تاپ کوچک */
@media (max-width: 1450px) {
    #productsGrid:not(.list-view) {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

/* تبلت افقی */
@media (max-width: 1180px) {
    #productsGrid:not(.list-view) {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* تبلت و موبایل بزرگ */
@media (max-width: 820px) {
    #productsGrid:not(.list-view) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .category-discount-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-discount-controls {
        align-self: flex-end;
    }
}

/* موبایل */
@media (max-width: 520px) {
    #productsGrid:not(.list-view) {
        grid-template-columns: 1fr !important;
    }

    .category-discount-section {
        width: min(100% - 16px, 1550px);
        padding: 18px 12px;
        border-radius: 22px;
    }

    .discount-products-track > * {
        flex-basis: 78vw;
        min-width: 78vw;
    }

    .category-discount-arrow {
        width: 40px;
        height: 40px;
    }

    .subcat-more-text {
        font-size: 11px;
    }
}
.category-helper {
    max-width: 680px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    margin: 18px 0 22px;
    padding: 14px 0;

    border-top: 1px solid rgba(255, 255, 255, 0.22);
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}

.category-helper-text {
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    line-height: 1.9;
}

.category-helper-text p {
    margin: 0;
}

.category-helper-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    flex-shrink: 0;

    color: #ffffff;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;

    transition: gap 0.2s ease;
}

.category-helper-link:hover {
    color: #ffffff;
    gap: 11px;
    text-decoration: none;
}

.category-helper-link span {
    font-size: 17px;
    line-height: 1;
}

#categoryProducts {
    scroll-margin-top: 100px;
}

@media (max-width: 575px) {
    .category-helper {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;

        margin: 14px 0 18px;
        padding: 13px 0;
    }

    .category-helper-text {
        font-size: 12px;
    }

    .category-helper-link {
        font-size: 12px;
    }
}

/* =========================================================
   Category Product Discount Badge - Glass / Outside Card
========================================================= */

.products-grid {
    padding-top: 8px;
}

.product-card > .product-discount-badge {
    position: absolute;
    top: 0;
    right: 14px;
    z-index: 12;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    min-height: 36px;
    max-width: calc(100% - 28px);
    padding: 7px 13px;

    color: #be123c;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(255, 255, 255, 0.94);
    border-radius: 999px;

    font-size: 11px;
    font-weight: 950;
    line-height: 1;
    white-space: nowrap;

    pointer-events: none;

    backdrop-filter: blur(15px) saturate(165%);
    -webkit-backdrop-filter: blur(15px) saturate(165%);

    box-shadow:
        0 12px 28px rgba(15, 23, 42, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.85);

    transform: translateY(-42%);

    transition:
        transform 0.22s ease,
        box-shadow 0.22s ease;
}

.product-card > .product-discount-badge::before {
    content: "";

    width: 6px;
    height: 6px;
    flex: 0 0 6px;

    border-radius: 50%;
    background: #e11d48;

    box-shadow:
        0 0 0 4px rgba(225, 29, 72, 0.1);
}

.product-card:hover > .product-discount-badge {
    transform: translateY(-48%);

    box-shadow:
        0 16px 34px rgba(15, 23, 42, 0.19),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/*
 * در حالت نمایش لیستی نیز نشان تخفیف روی لبه کارت می‌ماند.
 */
.products-grid.list-view .product-card {
    margin-top: 14px;
}

@media (max-width: 620px) {
    .products-grid {
        padding-top: 6px;
    }

    .product-card {
        margin-top: 12px;
    }

    .product-card > .product-discount-badge {
        right: 12px;
        min-height: 34px;
        padding: 7px 11px;
        font-size: 10.5px;
        transform: translateY(-38%);
    }

    .product-card:hover > .product-discount-badge {
        transform: translateY(-42%);
    }

    .discount-products-track {
        padding-top: 22px;
    }
}

/* =========================================================
   Kaimono category theme
========================================================= */
.category-page {
    --cat-ink: #171512;
    --cat-paper: #f2eee5;
    --cat-paper-deep: #e8e0d2;
    --cat-red: #a42d25;
    --cat-red-dark: #742019;
    --cat-gold: #c8aa6e;
    --cat-muted: #756e64;
    --cat-line: rgba(23, 21, 18, .13);
    padding-bottom: 70px;
    color: var(--cat-ink);
    background:
        linear-gradient(rgba(23,21,18,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23,21,18,.025) 1px, transparent 1px),
        var(--cat-paper);
    background-size: 54px 54px;
}
.category-page .breadcrumb-section { padding: 22px 0 16px; }
.category-page .modern-breadcrumb {
    padding: 17px 22px;
    border: 1px solid var(--cat-line);
    border-radius: 3px;
    background: rgba(250,248,242,.9);
    box-shadow: none;
}
.category-page .modern-breadcrumb::before {
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(164,45,37,.09), transparent 68%);
}
.category-page .breadcrumb-icon {
    width: 52px;
    height: 52px;
    border: 1px solid rgba(164,45,37,.24);
    border-radius: 50%;
    color: #fff;
    background: var(--cat-red);
    box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 5px rgba(164,45,37,.24);
    font: 500 22px/1 "Noto Serif JP", serif;
}
.category-page .breadcrumb-left h2 { color: var(--cat-ink); font-size: 22px; }
.category-page .breadcrumb-links,
.category-page .breadcrumb-links .current { color: var(--cat-muted); }
.category-page .breadcrumb-links a { color: var(--cat-red); }
.category-page .breadcrumb-links a:hover { color: var(--cat-red-dark); }
.category-page .breadcrumb-badge {
    padding: 9px 16px;
    border: 1px solid rgba(164,45,37,.22);
    border-radius: 2px;
    color: var(--cat-red);
    background: transparent;
    box-shadow: none;
}

.category-page .category-hero { padding: 12px 0 42px; }
.category-page .category-banner {
    min-height: 430px;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .82fr);
    gap: clamp(30px, 5vw, 78px);
    padding: clamp(34px, 5vw, 68px);
    border: 0;
    border-radius: 4px;
    background:
        radial-gradient(circle at 92% 8%, rgba(164,45,37,.35), transparent 30%),
        linear-gradient(118deg, #0e0d0b 0%, #191611 62%, #2a1814 100%);
    box-shadow: 0 24px 65px rgba(23,21,18,.18);
}
.category-page .category-banner::before {
    inset: 16px;
    border-color: rgba(200,170,110,.26);
    border-radius: 2px;
}
.category-page .category-banner::after {
    content: "KAIMONO";
    left: 28px;
    bottom: -20px;
    color: rgba(255,255,255,.045);
    font-family: Arial, sans-serif;
    font-size: clamp(52px, 9vw, 126px);
    letter-spacing: .02em;
}
.category-page .kicker {
    margin-bottom: 20px;
    padding: 8px 13px;
    border-color: rgba(200,170,110,.4);
    border-radius: 2px;
    color: #e1c992;
    background: rgba(200,170,110,.07);
    font: 700 10px/1.5 Arial, sans-serif;
    letter-spacing: .1em;
}
.category-page .category-hero-text h1 {
    margin-bottom: 18px;
    color: #fff;
    font-size: clamp(36px, 4.6vw, 60px);
    line-height: 1.3;
}
.category-page .category-helper {
    max-width: none;
    border-color: rgba(200,170,110,.23);
}
.category-page .category-helper-text { color: rgba(255,255,255,.72); }
.category-page .category-helper-link { color: #e1c992; }
.category-page .category-helper-link:hover { color: #fff; }
.category-page .subcat-btn,
.category-page .subcat-more-btn {
    padding: 10px 14px;
    border: 1px solid rgba(200,170,110,.28);
    border-radius: 2px;
    color: rgba(255,255,255,.82);
    background: rgba(255,255,255,.035);
}
.category-page .subcat-btn.active,
.category-page .subcat-btn:hover,
.category-page .subcat-more-btn:hover {
    border-color: var(--cat-red);
    color: #fff;
    background: var(--cat-red);
}
.category-page .subcat-more-btn span { color: inherit !important; }
.category-page .category-stats { gap: 1px; margin-top: 24px; background: rgba(200,170,110,.2); }
.category-page .stat-item {
    min-height: 86px;
    padding: 16px;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,.055);
}
.category-page .stat-item strong { color: #fff; }
.category-page .stat-item span { color: rgba(255,255,255,.58); }
.category-page .banner-visual {
    min-height: 310px;
    padding: 10px;
    border: 1px solid rgba(200,170,110,.25);
    background: rgba(255,255,255,.025);
}
.category-page .category-banner-image {
    width: 100%;
    max-width: none;
    height: 100%;
    aspect-ratio: 4 / 3;
    border: 0;
    border-radius: 1px;
    box-shadow: none;
    filter: saturate(.82) contrast(1.04);
}

.category-page .shop-layout { gap: 24px; }
.category-page .filter-card,
.category-page .products-card,
.category-page .seo-panel {
    border: 1px solid var(--cat-line);
    border-radius: 3px;
    background: rgba(250,248,242,.95);
    box-shadow: 0 14px 35px rgba(23,21,18,.07);
}
.category-page .products-card { padding: clamp(20px, 3vw, 32px); }
.category-page .filter-card { padding: 18px; }
.category-page .filter-group { border-color: var(--cat-line); }
.category-page .clear-filters,
.category-page .mobile-filter-btn,
.category-page .view-btn.active,
.category-page .apply-btn {
    border-color: var(--cat-red) !important;
    border-radius: 2px !important;
    color: #fff !important;
    background: var(--cat-red) !important;
    box-shadow: none !important;
}
.category-page .toolbar select,
.category-page .filter-group input {
    border-color: var(--cat-line);
    border-radius: 2px;
    color: var(--cat-ink);
    background: #fffdf8;
}
.category-page .product-card {
    border-color: var(--cat-line);
    border-radius: 2px;
    background: #fffdf8;
    box-shadow: none;
}
.category-page .product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px rgba(23,21,18,.1);
}
.category-page .book-cover { border-radius: 1px; background: linear-gradient(135deg, #29241f, var(--cat-red)); }
.category-page .book-cover::before { border-radius: 1px; border-color: rgba(255,255,255,.18); }
.category-page .book-cover::after { display: none; }
.category-page .price strong,
.category-page .stars { color: var(--cat-red); }
.category-page .add-cart {
    border-radius: 2px;
    background: var(--cat-ink);
}
.category-page .product-card > .product-discount-badge {
    border-color: rgba(164,45,37,.18);
    border-radius: 2px;
    color: var(--cat-red);
    background: #fffdf8;
    backdrop-filter: none;
    box-shadow: 0 7px 18px rgba(23,21,18,.1);
}
.category-page .product-card > .product-discount-badge::before { background: var(--cat-red); }

.category-page .category-discount-section {
    border-radius: 3px;
    background:
        radial-gradient(circle at right top, rgba(164,45,37,.34), transparent 32%),
        linear-gradient(125deg, #11100e, #2b1915);
    box-shadow: 0 18px 45px rgba(23,21,18,.14);
}
.category-page .category-discount-kicker { color: #e1c992; }
.category-page .category-discount-arrow {
    border: 1px solid rgba(200,170,110,.35);
    border-radius: 2px;
    color: #fff;
    background: var(--cat-red);
    box-shadow: none;
}
.category-page .category-discount-arrow:hover { background: var(--cat-red-dark); }

.category-page .products-pagination {
    border-color: var(--cat-line);
    border-radius: 2px;
    background: #fffdf8;
    box-shadow: none;
}
.category-page .products-pagination__info strong { color: var(--cat-red); }
.category-page .pagination-button {
    border-color: var(--cat-line);
    border-radius: 2px;
    color: var(--cat-ink);
    background: #fffdf8;
    box-shadow: none;
}
.category-page a.pagination-button:hover,
.category-page .pagination-number.active {
    border-color: var(--cat-red);
    background: var(--cat-red);
    box-shadow: none;
}

@media (max-width: 1100px) {
    .category-page .category-banner {
        grid-template-columns: 1fr;
        padding: 38px;
    }
    .category-page .banner-visual { min-height: 360px; }
}

@media (max-width: 620px) {
    .category-page .modern-breadcrumb { align-items: stretch; }
    .category-page .breadcrumb-badge { align-self: stretch; text-align: center; }
    .category-page .category-banner { padding: 32px 22px; border-radius: 2px; }
    .category-page .category-banner::before { inset: 9px; }
    .category-page .banner-visual { min-height: 240px; padding: 7px; }
    .category-page .category-stats { grid-template-columns: 1fr; }
}
