﻿.shop {
    margin-top: 10rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 992px) {
    .shop {
        /* Ù…Ø«Ù„ Ø¯ÛŒØ¬ÛŒâ€ŒÚ©Ø§Ù„Ø§ â€” ÙÙ‚Ø· Ø¯Ø³Ú©ØªØ§Ù¾ */
        margin-top: var(--shop-desktop-sticky-top, 154px);
    }
}

@media (max-width: 991.98px) {
    .shop {
        margin-top: 0.75rem;
    }
}

#sortModal .modal-dialog,
.modal.modal-bottom-sheet .modal-dialog {
    position: fixed;
    bottom: 0;
    max-width: 100%;
    transform: translateY(100%);
    transition: transform .3s ease-out
}

#sortModal .modal-content,
#sortModal .modal-dialog {
    height: auto;
    max-height: 50vh;
    box-shadow: none !important
}

.shop-desktop-sidebar {
    background: #fff;
    border: 1px solid #e0e0e2;
    border-radius: 8px;
    overflow: hidden;
}

.shop-desktop-sidebar__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 16px 20px;
}

.shop-desktop-sidebar__title {
    margin: 0;
    font-size: 19px;
    font-weight: 600;
    color: #3f4064;
    line-height: 1.5;
}

.shop-desktop-sidebar__clear {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 400;
    color: #008eb2;
    text-decoration: none;
    line-height: 1.6;
    transition: opacity .2s ease;
}

.shop-desktop-sidebar__clear:hover {
    color: #008eb2;
    opacity: 0.85;
}

.shop-desktop-sidebar__form {
    margin: 0;
}

.shop-desktop-sidebar__sections {
    display: flex;
    flex-direction: column;
}

.shop-desktop-sidebar__section {
    padding-inline: 20px;
    border-bottom: 1px solid #f0f0f1;
}

.shop-desktop-sidebar__section:last-child {
    border-bottom: none;
}

.shop-desktop-sidebar__trigger {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    margin: 0;
    padding-block: 12px;
    padding-inline: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.shop-desktop-sidebar__trigger:focus,
.shop-desktop-sidebar__trigger:focus-visible {
    outline: none;
    box-shadow: none;
}

.shop-desktop-sidebar__trigger-row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.shop-desktop-sidebar__trigger-text {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: #3f4064;
    line-height: 1.8;
    text-align: start;
}

.shop-desktop-sidebar__trigger-active {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-inline-start: 12px;
    border-radius: 50%;
    background-color: #008eb2;
    flex-shrink: 0;
}

.shop-desktop-sidebar__trigger-summary {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 400;
    line-height: 2.15;
    color: #81858b;
    text-align: start;
}

.shop-desktop-sidebar__trigger:not(.collapsed) .shop-desktop-sidebar__trigger-summary {
    display: none;
}

.shop-desktop-sidebar__trigger-icon {
    flex-shrink: 0;
    display: block;
    width: 24px;
    height: 24px;
    color: #a1a3a8;
    transition: transform .2s ease-in-out;
}

.shop-desktop-sidebar__trigger:not(.collapsed) .shop-desktop-sidebar__trigger-icon {
    transform: rotate(180deg);
}

.shop-desktop-sidebar__panel-body {
    padding-block: 0 12px;
    padding-inline: 0;
}

.shop-desktop-sidebar__panel-body .shop-filter-search {
    padding-top: 0;
    padding-bottom: 0.75rem;
}

.shop-desktop-sidebar__panel-body .price-slider-container--dk {
    padding: 0 4px 8px;
}

/* درخت مسیر دسته‌بندی (نویگیشن، نه فیلتر) */
.shop-cat-tree {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 360px;
    overflow-y: auto;
    padding: 0 0 4px;
}

.shop-cat-tree__node {
    display: flex;
    flex-direction: column;
}

.shop-cat-tree__children {
    padding-right: 16px;
}

.shop-cat-tree__row {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    min-height: 40px;
    border-bottom: 1px solid #f0f0f1;
    color: #3f4064;
    text-decoration: none;
}

.shop-cat-tree__row--all {
    font-weight: 600;
}

a.shop-cat-tree__row:hover,
.shop-cat-tree__link:hover .shop-cat-tree__label {
    color: #0c0c0c;
}

.shop-cat-tree__row.is-ancestor .shop-cat-tree__label {
    color: #424750;
}

.shop-cat-tree__row.is-selected .shop-cat-tree__label,
.shop-cat-tree__row.is-selected .shop-cat-tree__check {
    color: #1672dd;
}

.shop-cat-tree__toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 6px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #424750;
    cursor: pointer;
    border-radius: 4px;
    transition: transform .2s ease;
}

.shop-cat-tree__toggle:hover {
    background: #f0f0f1;
}

.shop-cat-tree__node.is-open > .shop-cat-tree__row > .shop-cat-tree__toggle {
    transform: rotate(-90deg);
}

.shop-cat-tree__toggle-spacer {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin: 6px 0 0;
}

.shop-cat-tree__chevron-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.shop-cat-tree__link {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    padding: 8px 0;
    color: inherit;
    text-decoration: none;
}

.shop-cat-tree__label {
    flex: 1;
    min-width: 0;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.8;
    color: #3f4064;
}

.shop-cat-tree__check {
    flex-shrink: 0;
    color: #1672dd;
}

.modal .shop-cat-tree {
    max-height: none;
    padding: 0 4px;
}

.price-slider-container--dk {
    gap: 0;
    padding-top: 4px;
    padding-bottom: 24px;
}

.price-slider-container--dk .price-dk-row {
    display: flex;
    align-items: center;
    width: 100%;
    margin-bottom: 24px;
    font-size: 12px;
    font-weight: 400;
    color: #81858b;
    line-height: 2.15;
}

.price-slider-container--dk .price-dk-label {
    flex-shrink: 0;
    min-width: 1.5rem;
}

.price-slider-container--dk .price-dk-field {
    flex: 1 1 auto;
    min-width: 0;
    margin-inline: 8px;
    border-bottom: 1px solid #e0e0e2;
    cursor: text;
}

.price-slider-container--dk .price-dk-input {
    display: block;
    width: 100%;
    margin: 0;
    padding: 4px 8px;
    border: none;
    outline: none;
    background: transparent;
    box-shadow: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 2.15;
    color: #3f4064;
    text-align: start;
    direction: rtl;
}

.price-slider-container--dk .price-dk-input:focus {
    outline: none;
}

.price-slider-container--dk .price-dk-currency {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    color: #424750;
    font-size: 12px;
    line-height: 1;
}

.price-slider-container--dk .price-dk-currency .toman {
    font-size: 14px;
    color: #3f4064;
}

.price-slider-container--dk .price-dk-slider {
    width: 100%;
    padding-inline: 4px;
    margin-top: 16px;
}

.price-slider-container--dk .price-dk-slider__base {
    position: relative;
    height: 28px;
    margin-inline: 10px;
    /* RTL Digikala: Ø§Ø±Ø²Ø§Ù†â€ŒØªØ±ÛŒÙ† (min) Ø³Ù…Øª Ø±Ø§Ø³ØªØŒ Ú¯Ø±Ø§Ù†â€ŒØªØ±ÛŒÙ† (max) Ø³Ù…Øª Ú†Ù¾ */
    transform: scaleX(-1);
    isolation: isolate;
}

.price-slider-container--dk .price-dk-slider__rail {
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    z-index: 1;
    height: 2px;
    margin-top: -1px;
    background: #e0e0e2;
    border-radius: 999px;
    pointer-events: none;
}

.price-slider-container--dk .price-dk-slider__connect {
    position: absolute;
    top: 0;
    bottom: 0;
    background: #19bfd3;
    border-radius: 999px;
}

.price-slider-container--dk .price-dk-slider__pips {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(50% + 8px);
    z-index: 1;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.price-slider-container--dk .price-dk-slider__pips span {
    width: 1px;
    height: 6px;
    background: #c0c2c5;
}

.price-slider-container--dk .price-dk-slider__thumb {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 18px;
    height: 18px;
    margin-top: -9px;
    margin-left: -9px;
    border: 2px solid #19bfd3;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
    pointer-events: none;
    box-sizing: border-box;
}

.price-slider-container--dk .price-dk-slider__thumb--min {
    z-index: 4;
}

.price-slider-container--dk .price-dk-slider__thumb--max {
    z-index: 5;
}

.price-slider-container--dk .price-dk-slider__handle {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 6;
    width: 100%;
    height: 28px;
    margin: 0;
    padding: 0;
    background: transparent;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
    outline: none;
    opacity: 0;
}

.price-slider-container--dk .price-dk-slider__handle--min {
    z-index: 7;
}

.price-slider-container--dk .price-dk-slider__handle--max {
    z-index: 8;
}

.price-slider-container--dk .price-dk-slider__handle::-webkit-slider-runnable-track {
    height: 28px;
    background: transparent;
    border: none;
}

.price-slider-container--dk .price-dk-slider__handle::-moz-range-track {
    height: 28px;
    background: transparent;
    border: none;
}

.price-slider-container--dk .price-dk-slider__handle::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    margin-top: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: none;
}

.price-slider-container--dk .price-dk-slider__handle::-moz-range-thumb {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: none;
}

.price-slider-container--dk .price-dk-slider__hints {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 10px;
    font-weight: 700;
    line-height: 2.15;
    color: #81858b;
}

#priceModal .price-slider-container--dk {
    padding: 4px 4px 8px;
}

.shop-filter-check {
    position: relative;
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    cursor: pointer;
    font-size: 12px;
    color: #3f4064;
    line-height: 1.8;
    -webkit-tap-highlight-color: transparent;
}

.shop-filter-check__main {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    min-width: 0;
}

.shop-filter-check__control {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    padding-block: 4px;
    margin-inline-end: 16px;
}

.shop-filter-check__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.shop-filter-check__mark {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border: 2px solid #3f4064;
    border-radius: 4px;
    background-color: #fff;
    box-sizing: border-box;
    cursor: pointer;
    transition: all .15s cubic-bezier(.4, 0, .2, 1);
}

.shop-filter-check__icon {
    display: none;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.shop-filter-check__icon svg {
    display: block;
    width: 10px;
    height: 10px;
    fill: #fff;
}

.shop-filter-check__input:checked + .shop-filter-check__mark {
    border-color: #ef4056;
    background-color: #ef4056;
}

.shop-filter-check__input:checked + .shop-filter-check__mark .shop-filter-check__icon {
    display: flex;
}

.shop-filter-check__input:focus-visible + .shop-filter-check__mark {
    box-shadow: 0 0 0 2px rgba(239, 64, 86, .25);
}

.shop-filter-check__body {
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
    padding-block: 12px;
    border-bottom: 1px solid #e0e0e2;
}

.shop-filter-check:last-child .shop-filter-check__body {
    border-bottom: none;
}

.shop-filter-check__title {
    margin: 0;
    font-size: inherit;
    font-weight: 600;
    color: #3f4064;
    line-height: 1.8;
}

.shop-filter-check__subtitle {
    flex-shrink: 0;
    font-size: 0.6875rem;
    font-weight: 400;
    color: #81858b;
    direction: ltr;
    text-align: left;
    line-height: 1.8;
}

@media (min-width: 992px) {
    .shop-desktop-sidebar .shop-filter-check {
        font-size: 12px;
    }

    .shop-desktop-sidebar .shop-filter-check__body {
        padding-inline-end: 12px;
    }

    .shop-desktop-sidebar .shop-filter-check__title {
        font-size: 15px;
    }

    .shop-desktop-sidebar__panel-body .shop-filter-list__items {
        max-height: 320px;
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

.shop-filter-list {
    width: 100%;
}

.shop-filter-search {
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: stretch;
    padding: 9px 0 17px;
}

.shop-filter-search__icon {
    position: absolute;
    right: 12px;
    display: block;
    width: 16px;
    height: 16px;
    color: #53565a;
    pointer-events: none;
}

.shop-filter-search__input {
    width: 100%;
    border: 1px solid #ededed;
    border-radius: 8px;
    padding: 10px 36px 10px 12px;
    font-size: 12px;
    font-weight: 400;
    color: #000;
    background: #fff;
    outline: none;
    direction: rtl;
}

.shop-filter-search__input::placeholder {
    color: #81858b;
}

.shop-filter-search__input:focus {
    border-color: #ddd;
}

.price-currency {
    pointer-events: none
}

@media (max-width:768px) {
    .product-card {
        padding: 8px
    }
}

@media (max-width:375px) {
    .product-card {
        padding: 6px
    }
}

/* Ø¨ÙˆØ±Ø¯Ø± Ú©Ø§Ø±Øª ÙÙ‚Ø· Ø¯Ø± ØµÙØ­Ø§Øª ÙØ±ÙˆØ´Ú¯Ø§Ù‡/Ø¨Ø±Ù†Ø¯/Ù¾ÛŒØ´Ù†Ù‡Ø§Ø¯Ù‡Ø§ â€” Ù†Ù‡ Ù¾ÛŒØ´â€ŒÙØ±Ø¶ Ø³Ø±Ø§Ø³Ø±ÛŒ */
.products-grid > a .product-card {
    border: 1px solid rgba(0, 0, 0, .08)
}

.shop .product-name,
.shop .variant-discounted-price {
    color: #3f4064;
}

@media (min-width: 992px) {
    /* Ø¯Ø³Ú©ØªØ§Ù¾ PLP: Ù„Ø§ÛŒÙ‡â€ŒØ¨Ù†Ø¯ÛŒ Ù…Ø«Ù„ Ø¯ÛŒØ¬ÛŒâ€ŒÚ©Ø§Ù„Ø§ â€” Ø³Ø§ÛŒØ¯Ø¨Ø§Ø± Ø«Ø§Ø¨Øª + ÙØ§ØµÙ„Ù‡ Ø³ØªÙˆÙ†â€ŒÙ‡Ø§ */
    .shop .shop-plp-row {
        --shop-plp-sidebar-width: 300px;
        --shop-plp-sidebar-min: 270px;
        --shop-plp-gap: 8px; /* Digikala @1024: 2 * 4px */
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        justify-content: space-between;
        column-gap: var(--shop-plp-gap);
        margin-left: 0;
        margin-right: 0;
    }

    .shop .shop-plp-row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .shop .shop-desktop-sidebar-col {
        flex: 0 1 auto;
        width: var(--shop-plp-sidebar-width);
        min-width: var(--shop-plp-sidebar-min);
        max-width: var(--shop-plp-sidebar-width);
    }

    .shop .shop-plp-row > .col-lg-9 {
        flex: 1 1 0;
        width: auto;
        max-width: none;
    }

    /* ØµÙØ­Ù‡â€ŒØ¨Ù†Ø¯ÛŒ Ù‡Ù…â€ŒØªØ±Ø§Ø² Ø¨Ø§ Ø¹Ø±Ø¶ Ø³Ø§ÛŒØ¯Ø¨Ø§Ø± */
    .shop .shop-plp-pagination-row {
        --shop-plp-sidebar-width: 300px;
        --shop-plp-sidebar-min: 270px;
        --shop-plp-gap: 8px;
        display: flex;
        flex-wrap: nowrap;
        column-gap: var(--shop-plp-gap);
        margin-left: 0;
        margin-right: 0;
    }

    .shop .shop-plp-pagination-row > [class*="col-"] {
        padding-left: 0;
        padding-right: 0;
    }

    .shop .shop-plp-pagination-row > .col-lg-3 {
        flex: 0 1 auto;
        width: var(--shop-plp-sidebar-width);
        min-width: var(--shop-plp-sidebar-min);
        max-width: var(--shop-plp-sidebar-width);
    }

    .shop .shop-plp-pagination-row > .col-lg-9 {
        flex: 1 1 0;
        width: auto;
        max-width: none;
    }

    /* Ú¯Ø±ÛŒØ¯ Ù…Ø­ØµÙˆÙ„Ø§Øª Ø¨Ø§ Ø³Ø§ÛŒØ¯Ø¨Ø§Ø± â€” breakpoints Ø¯ÛŒØ¬ÛŒâ€ŒÚ©Ø§Ù„Ø§ */
    .shop .shop-plp-main[data-plp-view="grid"] .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a {
        position: relative;
        background: #fff;
        border-bottom: 1px solid #f0f0f1;
        border-inline-end: 1px solid #f0f0f1;
        min-height: 100%;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(2n) {
        border-inline-end: none;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a .product-card {
        padding: 12px 8px;
        border: none;
        border-radius: 0;
        gap: 8px;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:hover {
        z-index: 1;
        filter: drop-shadow(rgba(0, 0, 0, 0.2) 0px 1px 5px);
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid .variant-image img {
        border-radius: 8px;
    }

    .shop .product-name {
        margin-bottom: 8px;
        font-size: 0.75rem;
    }

    .shop .products-grid .variant-discount {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 3.5rem;
        height: 2rem;
        padding: 0;
        border-radius: 1rem;
        letter-spacing: -1px;
        font-size: 1rem;
        line-height: 1.5rem;
        font-weight: 500;
    }
}

@media (min-width: 1280px) {
    .shop .shop-plp-row,
    .shop .shop-plp-pagination-row {
        --shop-plp-gap: 20px; /* Digikala @1280: 5 * 4px */
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(2n) {
        border-inline-end: 1px solid #f0f0f1;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(3n) {
        border-inline-end: none;
    }
}

@media (min-width: 1440px) {
    .shop .shop-plp-main[data-plp-view="grid"] .products-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(3n) {
        border-inline-end: 1px solid #f0f0f1;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(4n) {
        border-inline-end: none;
    }
}

@media (min-width: 1676px) {
    .shop .shop-plp-main[data-plp-view="grid"] .products-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(4n) {
        border-inline-end: 1px solid #f0f0f1;
    }

    .shop .shop-plp-main[data-plp-view="grid"] .products-grid > a:nth-child(5n) {
        border-inline-end: none;
    }
}

.modal.modal-bottom-sheet .modal-dialog {
    margin: 0;
    width: 100%;
    max-height: 75vh;
    height: 75vh;
    display: flex;
    align-items: stretch;
    border: none !important;
    box-shadow: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
    overscroll-behavior: contain
}

#sortModal.show .modal-dialog,
.modal.modal-bottom-sheet.show .modal-dialog {
    transform: translateY(0)
}

.modal.modal-bottom-sheet .modal-content {
    border-radius: 15px 15px 0 0 !important;
    height: 100%;
    display: flex;
    flex-direction: column;
    max-height: 75vh;
    border: none !important;
    box-shadow: none !important;
    border-bottom: none !important
}

.modal.modal-bottom-sheet .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain
}

.list-group {
    background: 0 0;
    border: none;
    box-shadow: none;
    font-size: .8125rem;
    margin-top: -15px;
    font-weight: 500
}

.list-group-item {
    background-color: transparent;
    border: none;
    border-bottom: 1px solid #ebebeb;
    padding: 10px 0;
    transition: background-color .2s
}

/* Ù†ÙˆØ§Ø± Ù…Ø±ØªØ¨â€ŒØ³Ø§Ø²ÛŒ Ø¯Ø³Ú©ØªØ§Ù¾ â€” ÙÙ‚Ø· Ø¨Ø§ d-none d-lg-block Ø¯ÛŒØ¯Ù‡ Ù…ÛŒâ€ŒØ´ÙˆØ¯ */
.sort-nav {
    background: #fff;
    margin: 0;
    padding: 0;
    border: none;
    border-bottom: 1px solid #e0e0e2;
    border-radius: 0;
}

.sort-nav__row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sort-nav__label-wrap {
    flex-shrink: 0;
    padding-block: 12px;
}

.sort-nav__label {
    display: flex;
    align-items: center;
}

.sort-nav__icon {
    flex-shrink: 0;
    display: block;
    width: 15px;
    height: 15px;
    margin-inline-end: 8px;
    color: #424750;
}

.sort-nav__title {
    color: #3f4064;
    font-size: 13px;
    font-weight: 600;
    line-height: 2.15;
    white-space: nowrap;
}

.sort-nav__options {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.sort-nav__option {
    color: #81858b;
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 2.15;
    white-space: nowrap;
    text-decoration: none;
    transition: color .15s ease;
}

.sort-nav__option.is-active {
    color: #ef394e;
    font-weight: 600;
}

#sortModal .list-group-item:last-child,
.list-group-item:last-child {
    border-bottom: none
}

.list-group-item a {
    padding: 0;
    margin: 0;
    color: #212529;
    text-decoration: none;
    display: block
}

#sortModal .list-group-item a:hover,
.list-group-item a:hover {
    background-color: #f8f9fa
}

.modal-footer .btn {
    width: 45%;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 12px;
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .5px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, .08);
    transition: .2s
}

.btn:focus {
    box-shadow: 0 0 0 .2rem rgba(0, 142, 178, .25)
}

.modal-footer .btn-danger:focus,
.modal-footer .btn-danger:hover {
    background-color: #c82333 !important;
    border-color: #bd2130 !important;
    color: #fff !important;
    box-shadow: 0 0 8px rgba(200, 35, 51, .5) !important
}

.modal-footer .btn-outline-danger:focus,
.modal-footer .btn-outline-danger:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
    box-shadow: 0 0 8px rgba(220, 53, 69, .5) !important
}

/* عنوان PLP — پایه (هم‌تراز با brand.php) */
.shop-plp-title {
    display: block;
}

.shop-plp-title__inner {
    display: block;
}

.page-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-top: 0.5rem;
    margin-bottom: 0;
    line-height: 1.6;
}

.page-title__count {
    color: #81858b;
    font-weight: 400;
}

@media (min-width: 992px) {
    .shop > .shop-plp-breadcrumb {
        padding: 1rem 0 0;
        margin: 0;
    }

    .shop-plp-title {
        display: flex;
        align-items: center;
        margin: 12px 0 20px;
    }

    .shop > .shop-plp-breadcrumb + .shop-plp-title {
        margin-top: 12px;
    }

    .shop-plp-title__inner {
        display: flex;
        flex-direction: column;
    }

    .page-title {
        margin: 0;
        padding: 0;
        color: #0c0c0c;
        font-size: 1.0625rem;
        font-weight: 600;
        line-height: 1.5;
    }
}

#filter-main-list {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.25rem;
}

.shop-plp-filters {
    position: sticky;
    top: var(--shop-mobile-sticky-bar-height, 70px);
    z-index: 50;
    margin: 0 -12px 1.25rem;
    padding: 8px 16px;
    background: #fff;
}

.shop-plp-filters__inner {
    position: relative;
    display: flex;
    width: 100%;
    background: #fff;
}

.shop-plp-filters__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

.shop-plp-filters__row::-webkit-scrollbar {
    display: none;
}

/* Ø³Ø§Ø²Ú¯Ø§Ø±ÛŒ Ø¨Ø§ ØµÙØ­Ù‡ Ø¨Ø±Ù†Ø¯ Ú©Ù‡ Ù‡Ù†ÙˆØ² Ø§Ø² Ú©Ù„Ø§Ø³ Ù‚Ø¯ÛŒÙ…ÛŒ Ø§Ø³ØªÙØ§Ø¯Ù‡ Ù…ÛŒâ€ŒÚ©Ù†Ø¯ */
.shop-mobile-filters {
    position: sticky;
    top: var(--shop-mobile-sticky-bar-height, 70px);
    z-index: 50;
    margin: 0 -12px 1.25rem;
    padding: 8px 16px;
    background: #fff;
}

.shop-mobile-filters__row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y;
}

.shop-mobile-filters__row::-webkit-scrollbar {
    display: none;
}

@media (min-width: 992px) {
    .shop-mobile-filters {
        display: none !important;
    }
}

.shop-filter-btn {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 0;
    height: 32px;
    margin: 0;
    padding: 4px 12px;
    border: 1px solid #e0e0e2;
    border-radius: 10rem;
    background: transparent;
    box-shadow: none;
    color: #3f4064;
    text-decoration: none;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
    cursor: pointer;
}

.shop-filter-btn:hover,
.shop-filter-btn:focus {
    color: #3f4064;
    text-decoration: none;
    background-color: transparent;
}

.shop-filter-btn.active {
    border-color: transparent;
    background-color: #dc35451a;
    color: #dc3545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
}

.shop-filter-btn.active:hover,
.shop-filter-btn.active:focus {
    border-color: transparent;
    background-color: #dc35451a;
    color: #dc3545;
}

.shop-filter-btn.active .shop-filter-btn__icon,
.shop-filter-btn.active .shop-filter-btn__chevron {
    color: #dc3545;
}

.shop-filter-btn i {
    display: none;
}

.shop-filter-btn__text {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    color: inherit;
}

.shop-filter-btn__icon,
.shop-filter-btn__chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 15px;
    height: 15px;
    margin-right: 4px;
    color: #424750;
}

.shop-filter-btn__icon svg,
.shop-filter-btn__chevron svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.shop-filter-btn--leading-icon {
    flex-direction: row-reverse;
}

.shop-filter-btn--leading-icon .shop-filter-btn__icon {
    margin-right: 0;
    margin-left: 4px;
}

.shop-filter-btn--leading-icon .shop-filter-btn__badge {
    margin-right: 0;
    margin-left: 4px;
}

.shop-filter-btn__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    margin-right: 4px;
    padding: 0 4px;
    border-radius: 50%;
    background: #dc3545;
    color: #fff;
    font-size: .65rem;
    font-weight: 600;
    line-height: 1;
}

@media (max-width: 991.98px) {
    .shop-plp-main[data-plp-view="list"] .products-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .shop-plp-main[data-plp-view="list"] .products-grid > a {
        border-bottom: 1px solid #f0f0f1;
    }

    .shop-plp-main[data-plp-view="list"] .products-grid > a .product-card {
        display: grid;
        grid-template-columns: 118px 1fr;
        grid-template-rows: auto auto;
        gap: 8px 12px;
        align-items: start;
        padding: 12px 0;
        border: none;
        border-radius: 0;
        box-sizing: border-box;
    }

    .shop-plp-main[data-plp-view="list"] .variant-image {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 118px;
        max-width: 118px;
    }

    .shop-plp-main[data-plp-view="list"] .product-name {
        grid-column: 2;
        grid-row: 1;
        min-height: auto;
        max-height: none;
        margin-bottom: 0;
        line-height: 1.6;
        display: block;
        overflow: visible;
        text-overflow: unset;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: unset;
    }

    .shop-plp-main[data-plp-view="list"] .product-info,
    .shop-plp-main[data-plp-view="list"] .product-unavailable {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
    }
}

@media (min-width: 992px) {
    .shop-plp-filters {
        display: none !important;
    }

    .shop-desktop-sidebar__section--stock {
        padding-block: 12px;
    }

    .shop-desktop-sidebar .shop-stock-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        width: 100%;
        margin: 0;
        cursor: pointer;
        user-select: none;
    }

    .shop-desktop-sidebar .shop-stock-toggle__label {
        white-space: nowrap;
        font-size: 16px;
        font-weight: 600;
        line-height: 1.8;
        color: #3f4064;
    }

    .shop-desktop-sidebar .shop-stock-toggle__input {
        position: absolute;
        width: 0;
        height: 0;
        opacity: 0;
        pointer-events: none;
    }

    /* Ø³ÙˆØ¦ÛŒÚ† ÙÛŒÙ„ØªØ± Ù…Ø«Ù„ Ø¯ÛŒØ¬ÛŒâ€ŒÚ©Ø§Ù„Ø§ â€” Û´Û°Ã—Û²Û° Ø¨Ø§ Ø­Ø§Ø´ÛŒÙ‡ */
    .shop-desktop-sidebar .shop-stock-toggle__track {
        position: relative;
        display: inline-block;
        width: 40px;
        height: 20px;
        flex-shrink: 0;
        box-sizing: border-box;
        border: 2px solid #a1a3a8;
        border-radius: 9999px;
        background: transparent;
        transition: background-color .2s ease-out, border-color .2s ease-out;
    }

    .shop-desktop-sidebar .shop-stock-toggle__track::before {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #a1a3a8;
        box-shadow: none;
        transition: transform .2s ease-out, background-color .2s ease-out;
    }

    .shop-desktop-sidebar .shop-stock-toggle__input:checked + .shop-stock-toggle__track {
        background: #1672dd;
        border-color: #1672dd;
    }

    .shop-desktop-sidebar .shop-stock-toggle__input:checked + .shop-stock-toggle__track::before {
        background: #fff;
        transform: translateX(16px);
    }

    .shop-desktop-sidebar .shop-stock-toggle__input:focus-visible + .shop-stock-toggle__track {
        outline: 2px solid #1672dd;
        outline-offset: 2px;
    }

    /* Ù„ÛŒØ³Øªâ€ŒÙˆÛŒÙˆ Ø±ÙˆÛŒ Ø¯Ø³Ú©ØªØ§Ù¾ Ù‡Ù… Ù…Ø«Ù„ Ù…ÙˆØ¨Ø§ÛŒÙ„ */
    .shop-plp-main[data-plp-view="list"] .products-grid {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .shop-plp-main[data-plp-view="list"] .products-grid > a {
        border-bottom: 1px solid #f0f0f1;
    }

    .shop-plp-main[data-plp-view="list"] .products-grid > a .product-card {
        display: grid;
        grid-template-columns: 140px 1fr;
        grid-template-rows: auto auto;
        gap: 8px 16px;
        align-items: start;
        padding: 16px 0;
        border: none;
        border-radius: 0;
        box-sizing: border-box;
    }

    .shop-plp-main[data-plp-view="list"] .variant-image {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 140px;
        max-width: 140px;
    }

    .shop-plp-main[data-plp-view="list"] .product-name {
        grid-column: 2;
        grid-row: 1;
        min-height: auto;
        max-height: none;
        margin-bottom: 0;
        line-height: 1.6;
        display: block;
        overflow: visible;
        text-overflow: unset;
        -webkit-line-clamp: unset;
        line-clamp: unset;
        -webkit-box-orient: unset;
    }

    .shop-plp-main[data-plp-view="list"] .product-info,
    .shop-plp-main[data-plp-view="list"] .product-unavailable {
        grid-column: 2;
        grid-row: 2;
        align-self: end;
    }
}

.filter-title {
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.filter-title__row {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
}

.filter-title__text {
    font-size: 12px;
    font-weight: 400;
    color: #101010;
    line-height: 1.6;
}

.filter-title__icon {
    flex-shrink: 0;
    display: block;
    width: 16px;
    height: 16px;
    color: #101010;
    transition: transform .2s ease-in-out;
}

.filter-separator {
    height: 1px;
    width: 100%;
    margin: 1rem 0;
    background-color: #f1f2f3;
    border: none;
}

.modal.modal-bottom-sheet#filterModal .modal-dialog,
.modal.modal-bottom-sheet#brandModal .modal-dialog,
.modal.modal-bottom-sheet#priceModal .modal-dialog,
.modal.modal-bottom-sheet#categoryModal .modal-dialog,
.modal.modal-bottom-sheet[id^="attrModal"] .modal-dialog {
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    z-index: 1055
}

.modal.modal-bottom-sheet#filterModal .modal-content,
.modal.modal-bottom-sheet#brandModal .modal-content,
.modal.modal-bottom-sheet#priceModal .modal-content,
.modal.modal-bottom-sheet#categoryModal .modal-content,
.modal.modal-bottom-sheet[id^="attrModal"] .modal-content {
    height: 100vh;
    max-height: 100vh;
    border-radius: 0 !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column
}

.modal.modal-bottom-sheet#filterModal .modal-body,
.modal.modal-bottom-sheet#brandModal .modal-body,
.modal.modal-bottom-sheet#priceModal .modal-body,
.modal.modal-bottom-sheet#categoryModal .modal-body,
.modal.modal-bottom-sheet[id^="attrModal"] .modal-body {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0
}

.modal.modal-bottom-sheet#filterModal .modal-body {
    padding: 0
}

.modal.modal-bottom-sheet#filterModal .modal-footer,
.modal.modal-bottom-sheet#brandModal .modal-footer,
.modal.modal-bottom-sheet#priceModal .modal-footer,
.modal.modal-bottom-sheet#categoryModal .modal-footer,
.modal.modal-bottom-sheet[id^="attrModal"] .modal-footer {
    flex-shrink: 0;
    padding: 1rem 1.25rem;
    background: #fff;
    border-top: 1px solid #ececec;
    position: sticky;
    bottom: 0;
    z-index: 10
}

.price-slider-container {
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px
}

.price-input-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px
}

.price-input-label {
    font-size: 14px;
    font-weight: 600;
    color: #212529;
    margin: 0
}

.price-input-container {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden
}

.price-input {
    flex: 1;
    border: none;
    outline: 0;
    padding: 12px 16px 12px 80px;
    font-size: 1rem;
    color: #3f4064;
    font-weight: 600;
    direction: rtl;
    text-align: right;
    background: 0 0
}

.price-input::placeholder {
    color: #999
}

.price-input:focus {
    outline: 0;
    border-color: transparent
}

.price-currency {
    position: absolute;
    left: 16px
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0
}

.collapse.show::-webkit-scrollbar {
    width: 6px
}

.collapse.show::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px
}

.collapse.show::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px
}

.collapse.show::-webkit-scrollbar-thumb:hover {
    background: #555
}

#sortModal .modal-body {
    flex: 1 1 auto;
    padding: .5rem 1rem;
}

#sortModal .list-group-item {
    padding: .4rem 0;
    border-bottom: 1px solid #ececec
}

#sortModal .list-group-item a {
    color: #3f4064;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: .8125rem;
    font-weight: 600;
    padding: .6rem 0;
    transition: .2s
}

.sort-check {
    display: block;
    width: 1.2rem;
    height: 1.2rem;
    flex-shrink: 0;
    color: #000 !important;
}

.shop-plp-pagination {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    direction: rtl;
    gap: 0.5rem;
    margin: 2rem 0 1.5rem;
}

.shop-plp-pagination__page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #101010;
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1;
    background: #fff;
    transition: color .15s ease;
}

.shop-plp-pagination__page:hover {
    color: #dc3545;
}

.shop-plp-pagination__page.is-active {
    border-color: #dc3545;
    color: #dc3545;
    cursor: default;
}

.shop-plp-pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 2.5rem;
    padding: 0 0.25rem;
    border: 0 solid;
    box-sizing: border-box;
    color: #6d6e71;
    font-size: 0.9375rem;
    line-height: 1.6;
    letter-spacing: 0.08em;
    user-select: none;
}

@media (min-width: 992px) {
    .shop-plp-pagination {
        margin: 3rem 0;
    }
}

.modal-title {
    font-size: 1rem;
    font-weight: 500
}

/* Ù‡Ø¯Ø± Ù…Ø¯Ø§Ù„ Ù…Ø±ØªØ¨â€ŒØ³Ø§Ø²ÛŒ */
.modal.modal-bottom-sheet .modal-header:not(.shop-modal-header) {
    --rsbs-handle-bg: #00000024;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: calc(1rem + 12px) 1.25rem 1rem;
    border-bottom: none;
}

.modal.modal-bottom-sheet .modal-header:not(.shop-modal-header):before {
    content: "";
    width: 36px;
    height: 4px;
    top: calc(8px + env(safe-area-inset-top));
    background-color: #00000024;
    background-color: var(--rsbs-handle-bg, #00000024);
    border-radius: 2px;
    display: block;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

/* Ù‡Ø¯Ø± Ù…Ø¯Ø§Ù„â€ŒÙ‡Ø§ÛŒ ÙÛŒÙ„ØªØ±/Ø¨Ø±Ù†Ø¯/Ù‚ÛŒÙ…Øª/ÙˆÛŒÚ˜Ú¯ÛŒ */
.shop-modal-header {
    --shop-modal-header-fg: #53565a;
    position: relative;
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.shop-modal-header:before {
    content: none !important;
    display: none !important;
}

.shop-modal-header__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--shop-modal-header-fg);
    line-height: 1.6;
    text-align: center;
}

.shop-modal-header__close {
    position: absolute;
    inset-inline-start: 1rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: var(--shop-modal-header-fg);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.shop-modal-header__close-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.shop-modal-header__close-icon use {
    fill: currentColor;
}

#sort-modal-main-header {
    border-bottom: none;
}

#sort-modal-main-header .modal-title {
    width: 100%;
    text-align: center;
}

@media (min-width:992px) {
    html,
    body {
        overflow-x: clip;
    }

    main.shop,
    main.shop .shop-plp-row,
    main.shop .col-12 {
        overflow: visible;
    }

    .shop-desktop-sidebar-col {
        align-self: stretch;
        z-index: 2;
        overflow: visible;
    }

    .shop-desktop-sidebar-scroll {
        position: sticky;
        top: calc(var(--shop-desktop-sticky-top) + var(--shop-desktop-filter-sticky-gap, 20px));
        z-index: 1;
        max-height: calc(100vh - var(--shop-desktop-sticky-top) - var(--shop-desktop-filter-sticky-gap, 20px) - 20px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

@media (max-width:991.98px) {

    html {
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important
    }

    body {
        width: 100% !important;
        max-width: 100vw !important;
        position: relative;
        overflow-x: clip !important
    }

    .container-fluid,
    main {
        max-width: 100% !important;
        box-sizing: border-box;
        overflow-x: clip
    }

    .products-grid {
        width: 100% !important
    }

    .modal.modal-bottom-sheet#filterModal .modal-body {
        overflow-y: auto !important;
    }

    #filter-main-list {
        overflow-y: visible;
        max-height: none
    }
}

@media (max-width:768px) {
    .shop-filter-check {
        font-size: 0.8125rem;
    }

    .page-title,
    .price-input:not(.price-dk-input) {
        font-size: .875rem
    }

    .price-slider-container:not(.price-slider-container--dk) {
        gap: 16px
    }

    .modal-dialog {
        margin: .5rem
    }

    .modal-content {
        border-radius: 12px
    }
}

@media (max-width:576px) {
    .price-slider-container:not(.price-slider-container--dk) {
        padding: 16px;
        border-radius: 12px
    }

    .price-slider-container:not(.price-slider-container--dk) .price-input {
        font-size: .875rem;
        padding: 10px 14px 10px 70px
    }

    .price-slider-container:not(.price-slider-container--dk) .price-input-label {
        font-size: 13px
    }

    .modal-dialog {
        margin: .25rem
    }

    .modal-body {
        padding: 1rem
    }
}

.subcategories-section {
    width: 100%;
    margin-bottom: 1rem;
}

.subcategories-tiles {
    width: 100%;
}

.subcategories-divider {
    height: 1px;
    width: 100%;
    background: #f1f2f3;
}

@media (min-width: 992px) {
    .subcategories-divider {
        display: none;
    }
}

.subcategories-tiles-wrap {
    width: 100%;
    overflow: hidden;
}

.subcategories-track {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    gap: .5rem;
    width: 100%;
    margin: 0.75rem 0 0;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    list-style: none;
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.subcategories-track::-webkit-scrollbar {
    display: none;
}

.subcategories-tile {
    flex: 0 0 73px;
    width: 73px;
    max-width: 73px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    text-align: center;
    background: transparent;
    border: 0;
    -webkit-tap-highlight-color: transparent;
}

.subcategories-tile-media {
    line-height: 0;
    flex-shrink: 0;
}

.subcategories-tile-img {
    box-sizing: border-box;
    width: 73px;
    height: 73px;
    max-width: 73px;
    padding: 4px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    background: #f5f5f7;
    display: block;
    overflow: clip;
}

.subcategories-tile-name {
    display: block;
    width: 100%;
    margin: 8px 0;
    padding: 0;
    font-size: .75rem;
    font-weight: 400;
    line-height: 20px;
    color: #212529;
    text-align: center;
    word-break: break-word;
}

.subcategories-tile-more {
    display: none;
}

@media (min-width: 992px) {
    .subcategories-section {
        margin-bottom: 20px;
    }

    .subcategories-tiles-wrap {
        overflow: visible;
    }

    .subcategories-track {
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        place-items: stretch;
        gap: 12px;
        margin: 0;
        overflow: visible;
    }

    .subcategories-tile {
        flex: none;
        width: auto;
        max-width: none;
        min-height: 100%;
        gap: 0;
        padding: 16px;
        justify-content: space-between;
        background: #f5f5f7;
        border-radius: 8px;
        overflow: hidden;
    }

    .subcategories-tile-media {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .subcategories-tile-img {
        width: 85px;
        height: 85px;
        max-width: 85px;
        padding: 0;
        object-fit: contain;
        border-radius: 0;
        background: transparent;
    }

    .subcategories-tile-name {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        overflow: hidden;
        flex-grow: 1;
        width: 100%;
        margin: 8px 0 0;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.8;
        color: #3f4064;
        text-align: center;
        word-break: break-word;
    }

    .subcategories-track:not(.is-expanded) > .subcategories-tile:not(.subcategories-tile-more):nth-child(n+8) {
        display: none;
    }

    .subcategories-tile-more {
        display: flex;
        cursor: pointer;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
    }

    .subcategories-track.is-expanded .subcategories-tile-more {
        display: none;
    }

    .subcategories-tile-more-label {
        width: 100%;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.8;
        color: #3f4064;
        text-align: center;
    }

    .subcategories-tile-more-count {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 28px;
        font-weight: 600;
        line-height: 1.5;
        color: #62666d;
    }
}

