/* ============================================================
   PRODUCT LISTING FILTER DRAWER
   Added on top of the existing product-listing.css
   ============================================================ */

.ml-catalog-toolbar--filter {
    gap: 24px;
}

.ml-toolbar-filter-button {
    border: 0;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-family: inherit;
    cursor: pointer;
}

.ml-toolbar-filter-badge {
    min-height: 19px;
    padding: 2px 7px;
    border-radius: 20px;
    background: #252525;
    color: #fff;
    display: inline-flex;
    align-items: center;
    font-size: 8px;
}

.ml-toolbar-button__icon {
    font: 300 16px/1 Arial, sans-serif;
}


/* Backdrop */

.ml-filter-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1800;
    background: rgba(20,20,20,.50);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}


/* Drawer */

.ml-filter-drawer {
    position: fixed;
    z-index: 1810;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(780px, 46vw);
    min-width: 560px;
    background: #fff;
    color: #171717;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .36s cubic-bezier(.76,0,.24,1), visibility .36s;
    box-shadow: -12px 0 36px rgba(0,0,0,.06);
    overflow: hidden;
}

body.ml-filter-open {
    overflow: hidden;
}

    body.ml-filter-open .ml-filter-backdrop {
        opacity: 1;
        visibility: visible;
    }

    body.ml-filter-open .ml-filter-drawer {
        transform: none;
        visibility: visible;
    }


/* Header */

.ml-filter-drawer__head {
    position: relative;
    height: 98px;
    min-height: 98px;
    padding: 0 28px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .ml-filter-drawer__head h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 500;
    }

.ml-filter-close {
    position: absolute;
    left: 24px;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222;
    display: grid;
    place-items: center;
    font: 300 27px/1 Arial, sans-serif;
    cursor: pointer;
}


/* Form */

.ml-filter-form {
    height: calc(100dvh - 98px);
    padding-bottom: 150px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ml-filter-row {
    margin: 0;
    border: 0;
    border-bottom: 1px solid #e7e7e7;
}

    .ml-filter-row > summary {
        position: relative;
        min-height: 72px;
        padding: 0 48px 0 26px;
        list-style: none;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
    }

        .ml-filter-row > summary::-webkit-details-marker {
            display: none;
        }

        .ml-filter-row > summary::after {
            content: "";
            position: absolute;
            left: 27px;
            top: 50%;
            width: 8px;
            height: 8px;
            border-left: 1px solid #222;
            border-bottom: 1px solid #222;
            transform: translateY(-65%) rotate(-45deg);
            transition: transform .2s ease;
        }

    .ml-filter-row[open] > summary::after {
        transform: translateY(-35%) rotate(135deg);
    }

.ml-filter-current {
    margin-right: auto;
    color: #6e6861;
    max-width: 55%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 10px;
    font-weight: 400;
}


/* Search */

.ml-filter-section-body {
    padding: 0 26px 24px;
}

.ml-filter-search-input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #777;
    border-radius: 0;
    outline: 0;
    background: #fff;
    color: #222;
    font-family: inherit;
    font-size: 11px;
    text-align: right;
}

    .ml-filter-search-input:focus {
        border-color: #222;
    }


/* Grid option */

.ml-filter-view-row {
    min-height: 72px;
    padding: 0 26px;
    border-bottom: 1px solid #e7e7e7;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    font-size: 13px;
    font-weight: 500;
}

.ml-filter-view-options {
    display: flex;
    align-items: center;
    gap: 11px;
}

.ml-filter-view-label {
    direction: ltr;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: .22em;
}

.ml-filter-grid-button {
    width: 27px;
    height: 29px;
    padding: 4px 2px;
    border: 0;
    background: transparent;
    display: flex;
    align-items: stretch;
    gap: 2px;
    opacity: .45;
    cursor: pointer;
}

    .ml-filter-grid-button span {
        flex: 1;
        border: 1px solid #222;
    }

    .ml-filter-grid-button.is-active {
        opacity: 1;
    }


/* Radio rows */

.ml-filter-radio-list {
    padding: 0 26px 24px;
}

.ml-filter-radio {
    min-height: 42px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

    .ml-filter-radio input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .ml-filter-radio span {
        position: relative;
        padding-right: 27px;
        color: #4f4a44;
        font-size: 11px;
    }

        .ml-filter-radio span::before {
            content: "";
            position: absolute;
            right: 0;
            top: 50%;
            width: 14px;
            height: 14px;
            border: 1px solid #8d8780;
            border-radius: 50%;
            transform: translateY(-50%);
        }

    .ml-filter-radio input:checked + span::after {
        content: "";
        position: absolute;
        right: 4px;
        top: 50%;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #282521;
        transform: translateY(-50%);
    }


/* Sticky bottom */

.ml-filter-actions {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 100%;
    min-height: 145px;
    padding: 14px 34px 20px;
    border-top: 1px solid #ececec;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 15px;
}

.ml-filter-reset {
    align-self: center;
    padding: 3px 0;
    border: 0;
    border-bottom: 1px solid #99928a;
    background: transparent;
    color: #8d867f;
    font-family: inherit;
    font-size: 10px;
    cursor: pointer;
}

.ml-filter-apply {
    width: 100%;
    height: 50px;
    border: 1px solid #252525;
    background: #252525;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    font-size: 11px;
    cursor: pointer;
}

    .ml-filter-apply strong {
        font-weight: 600;
    }


/* Mobile */

@media (max-width: 767.98px) {

    .ml-filter-drawer {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .ml-filter-drawer__head {
        height: 72px;
        min-height: 72px;
    }

        .ml-filter-drawer__head h2 {
            font-size: 17px;
        }

    .ml-filter-close {
        left: 12px;
    }

    .ml-filter-form {
        height: calc(100dvh - 72px);
        padding-bottom: 145px;
    }

    .ml-filter-row > summary,
    .ml-filter-view-row {
        min-height: 64px;
    }

    .ml-filter-row > summary {
        padding-inline: 42px 18px;
    }

        .ml-filter-row > summary::after {
            left: 19px;
        }

    .ml-filter-section-body,
    .ml-filter-radio-list {
        padding-inline: 18px;
    }

    .ml-filter-view-row {
        padding-inline: 18px;
    }

    .ml-filter-grid-button[data-filter-grid-columns="3"],
    .ml-filter-grid-button[data-filter-grid-columns="4"] {
        display: none;
    }

    .ml-filter-actions {
        padding-inline: 18px;
    }
}


/* ============================================================
   PRODUCT CARD — REFERENCE STYLE
   ============================================================ */

.ml-product-card--reference {
    background: #fff;
}

    .ml-product-card--reference .ml-product-card__media {
        position: relative;
        aspect-ratio: .79 / 1;
        overflow: hidden;
        background: #f1f1ef;
    }

    .ml-product-card--reference .ml-product-card__image-link {
        display: block;
        width: 100%;
        height: 100%;
    }

    .ml-product-card--reference .ml-product-card__image {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .55s ease;
    }

    .ml-product-card--reference:hover .ml-product-card__image {
        transform: scale(1.012);
    }

.ml-product-card__wishlist--circle {
    position: absolute;
    top: 15px;
    right: auto;
    left: 15px;
    width: 39px;
    height: 39px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    color: #2a2723;
    display: grid;
    place-items: center;
    opacity: 1;
    cursor: pointer;
    z-index: 3;
}

    .ml-product-card__wishlist--circle svg {
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.35;
    }

.ml-product-card__content--reference {
    min-height: 84px;
    padding: 0 0 16px;
    background: #fff;
}

.ml-product-card__accent {
    width: 74px;
    height: 2px;
    margin-bottom: 10px;
    background: #282521;
}

.ml-product-card__main-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) 34px;
    align-items: start;
    gap: 12px;
    padding: 0 9px 0 0;
}

.ml-product-card__info {
    min-width: 0;
}

.ml-product-card__title--reference {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    font-weight: 500;
}

    .ml-product-card__title--reference a {
        color: #202027;
        text-decoration: none;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.ml-product-card__price--reference {
    margin-top: 5px;
    color: #3d3935;
    font-size: 11px;
    line-height: 1.5;
}

.ml-product-card__plus {
    width: 32px;
    height: 32px;
    color: #26242b;
    text-decoration: none;
    display: grid;
    place-items: center;
    font: 300 28px/1 Arial,sans-serif;
    transition: opacity .2s ease;
}

    .ml-product-card__plus:hover {
        color: #26242b;
        opacity: .55;
    }

@media (max-width: 767.98px) {

    .ml-product-card__wishlist--circle {
        top: 9px;
        left: 9px;
        width: 34px;
        height: 34px;
    }

        .ml-product-card__wishlist--circle svg {
            width: 16px;
            height: 16px;
        }

    .ml-product-card__content--reference {
        min-height: 73px;
        padding-bottom: 12px;
    }

    .ml-product-card__accent {
        width: 58px;
        margin-bottom: 8px;
    }

    .ml-product-card__main-row {
        grid-template-columns: minmax(0,1fr) 28px;
        gap: 7px;
        padding-right: 7px;
    }

    .ml-product-card__title--reference {
        font-size: 11px;
    }

    .ml-product-card__price--reference {
        margin-top: 4px;
        font-size: 9px;
    }

    .ml-product-card__plus {
        width: 28px;
        height: 28px;
        font-size: 23px;
    }
}


/* ============================================================
   CATEGORY PAGE LAYOUT — BRUNELLO-INSPIRED
   ============================================================ */

.ml-catalog--reference {
    background: #fff;
}

.ml-category-page-head {
    width: 100%;
    background: #fff;
}


/* Breadcrumb row */

.ml-catalog-breadcrumb {
    min-height: 62px;
    padding: 0 30px;
    border-bottom: 1px solid #e9e6e1;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #5d5750;
    font-size: 10px;
}

    .ml-catalog-breadcrumb a {
        color: #3c3833;
        text-decoration: none;
    }

        .ml-catalog-breadcrumb a:first-child {
            text-decoration: underline;
            text-underline-offset: 3px;
        }

    .ml-catalog-breadcrumb strong {
        color: #22201d;
        font-weight: 600;
    }


/* Horizontal category strip */

.ml-catalog-category-strip {
    min-height: 66px;
    border-bottom: 1px solid #e9e6e1;
    overflow: hidden;
}

.ml-catalog-category-strip__track {
    min-height: 66px;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 36px;
    overflow-x: auto;
    scrollbar-width: none;
    white-space: nowrap;
}

    .ml-catalog-category-strip__track::-webkit-scrollbar {
        display: none;
    }

.ml-catalog-category-link {
    position: relative;
    flex: 0 0 auto;
    padding: 8px 0;
    color: #4f4942;
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
}

    .ml-catalog-category-link::after {
        content: "";
        position: absolute;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 1px;
        background: #25221f;
        transform: scaleX(0);
        transform-origin: center;
        transition: transform .2s ease;
    }

    .ml-catalog-category-link:hover::after,
    .ml-catalog-category-link.is-active::after {
        transform: scaleX(1);
    }

.ml-catalog-category-link--label {
    color: #6f6860;
    cursor: default;
}


/* Centered title block */

.ml-catalog-title-block {
    min-height: 171px;
    padding: 46px 24px 42px;
    border-bottom: 1px solid #e9e6e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.ml-catalog-title-block__eyebrow {
    margin-bottom: 10px;
    color: #948d84;
    direction: ltr;
    font-size: 8px;
    letter-spacing: .28em;
}

.ml-catalog-title-block h1 {
    margin: 0;
    color: #27231f;
    font-size: clamp(30px, 3vw, 45px);
    font-weight: 400;
    line-height: 1.25;
}


/* Filter/result row */

.ml-catalog-reference-toolbar {
    min-height: 66px;
    padding: 0 30px;
    border-bottom: 1px solid #e9e6e1;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ml-reference-filter-button {
    min-width: 110px;
    min-height: 42px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #292621;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    cursor: pointer;
}

.ml-reference-filter-plus {
    font: 300 17px/1 Arial, sans-serif;
}

.ml-reference-filter-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #2c2925;
}

.ml-reference-result-count {
    color: #817a72;
    font-size: 9px;
}


/* Keep grid flush against the catalog toolbar like the reference. */

.ml-catalog--reference .ml-product-grid {
    margin-top: 0;
}


/* Active filters become a compact band under the toolbar. */

.ml-catalog--reference .ml-active-filters {
    min-height: 47px;
    padding-top: 8px;
    padding-bottom: 8px;
}


/* Product grid spacing / visual rhythm */

.ml-catalog--reference .ml-product-grid {
    gap: 1px;
    padding: 0;
    background: #e9e6e1;
}


/* Desktop: 3 cards by default with edge-to-edge editorial composition. */

@media (min-width: 1101px) {

    .ml-catalog--reference .ml-product-grid[data-columns="3"] {
        --grid-columns: 3;
    }

    .ml-catalog--reference .ml-product-grid[data-columns="4"] {
        --grid-columns: 4;
    }

    .ml-catalog--reference .ml-product-grid[data-columns="2"] {
        --grid-columns: 2;
    }
}


/* ============================================================
   MOBILE CATEGORY PAGE
   ============================================================ */

@media (max-width: 767.98px) {

    .ml-catalog-breadcrumb {
        min-height: 50px;
        padding-inline: 14px;
        gap: 7px;
        font-size: 9px;
    }

    .ml-catalog-category-strip {
        min-height: 56px;
    }

    .ml-catalog-category-strip__track {
        min-height: 56px;
        padding-inline: 14px;
        justify-content: flex-start;
        gap: 24px;
    }

    .ml-catalog-category-link {
        font-size: 9px;
    }

    .ml-catalog-title-block {
        min-height: 134px;
        padding: 33px 15px 31px;
    }

        .ml-catalog-title-block h1 {
            font-size: 29px;
        }

    .ml-catalog-reference-toolbar {
        min-height: 58px;
        padding-inline: 14px;
    }

    .ml-reference-filter-button {
        min-width: 90px;
        font-size: 10px;
    }

    .ml-reference-result-count {
        font-size: 9px;
    }
}


/* ============================================================
   CRITICAL PRODUCT GRID FIX
   Prevent cards from expanding to full-page width when an older
   product-listing.css is still present or missing grid rules.
   ============================================================ */

.ml-catalog--reference .ml-product-grid {
    display: grid !important;
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 1px !important;
    align-items: stretch;
    background: #e7e4df;
    overflow: hidden;
}

    .ml-catalog--reference .ml-product-grid[data-columns="2"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ml-catalog--reference .ml-product-grid[data-columns="3"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .ml-catalog--reference .ml-product-grid[data-columns="4"] {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

.ml-catalog--reference .ml-product-card {
    min-width: 0 !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    background: #fff;
    overflow: hidden;
}

.ml-catalog--reference .ml-product-card__media {
    position: relative;
    width: 100%;
    aspect-ratio: .79 / 1 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: hidden;
    background: #f1f0ed;
}

.ml-catalog--reference .ml-product-card__image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.ml-catalog--reference .ml-product-card__image {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    object-fit: cover !important;
    object-position: center center;
    display: block;
}

.ml-catalog--reference .ml-product-card__content--reference {
    width: 100%;
    min-height: 86px;
    padding: 0 0 17px;
    box-sizing: border-box;
}

.ml-catalog--reference .ml-product-card__main-row {
    min-width: 0;
    padding: 0 12px;
}

.ml-catalog--reference .ml-product-card__title--reference a {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.ml-catalog--reference .ml-product-card__wishlist--circle {
    top: 14px;
    right: 14px;
    left: auto;
}

.ml-catalog--reference .ml-product-card__plus {
    justify-self: end;
}


/* Large tablet / small desktop */
@media (min-width: 768px) and (max-width: 1199.98px) {

    .ml-catalog--reference .ml-product-grid,
    .ml-catalog--reference .ml-product-grid[data-columns="3"],
    .ml-catalog--reference .ml-product-grid[data-columns="4"] {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

        .ml-catalog--reference .ml-product-grid[data-columns="2"] {
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        }
}


/* Mobile */
@media (max-width: 767.98px) {

    .ml-catalog--reference .ml-product-grid,
    .ml-catalog--reference .ml-product-grid[data-columns="2"],
    .ml-catalog--reference .ml-product-grid[data-columns="3"],
    .ml-catalog--reference .ml-product-grid[data-columns="4"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .ml-catalog--reference .ml-product-card__media {
        aspect-ratio: .78 / 1 !important;
    }

    .ml-catalog--reference .ml-product-card__wishlist--circle {
        top: 8px;
        right: 8px;
        left: auto;
    }

    .ml-catalog--reference .ml-product-card__main-row {
        padding-inline: 8px;
    }
}


/* Very small phones */
@media (max-width: 359.98px) {

    .ml-catalog--reference .ml-product-grid,
    .ml-catalog--reference .ml-product-grid[data-columns="2"],
    .ml-catalog--reference .ml-product-grid[data-columns="3"],
    .ml-catalog--reference .ml-product-grid[data-columns="4"] {
        grid-template-columns: 1fr !important;
    }
}


/* ============================================================
   PRODUCT CARD GALLERY
   Hover => next image
   Per-card gallery arrows
   ============================================================ */

.ml-catalog--reference .ml-product-card__slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ml-catalog--reference .ml-product-card__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform .38s ease;
    will-change: transform;
}

.ml-catalog--reference .ml-product-card__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.ml-catalog--reference .ml-product-card__nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 34px;
    height: 48px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.7);
    color: #23211f;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity .2s ease, background-color .2s ease;
    cursor: pointer;
    backdrop-filter: blur(2px);
}

    .ml-catalog--reference .ml-product-card__nav:hover {
        background: rgba(255,255,255,.95);
    }

.ml-catalog--reference .ml-product-card__nav--prev {
    left: 0;
}

.ml-catalog--reference .ml-product-card__nav--next {
    right: 0;
}

.ml-catalog--reference .ml-product-card__nav span {
    font: 300 31px/1 Arial, sans-serif;
    transform: translateY(-1px);
}

.ml-catalog--reference .ml-product-card:hover .ml-product-card__nav,
.ml-catalog--reference .ml-product-card:focus-within .ml-product-card__nav {
    opacity: 1;
}

.ml-catalog--reference .ml-product-card__wishlist--circle {
    z-index: 5;
}

@media (max-width: 767.98px) {

    .ml-catalog--reference .ml-product-card__nav {
        width: 28px;
        height: 42px;
        opacity: .96;
        background: rgba(255,255,255,.85);
    }

        .ml-catalog--reference .ml-product-card__nav span {
            font-size: 26px;
        }
}


/* ============================================================
   BOOTSTRAP PRODUCT GRID — FINAL OVERRIDE
   Bootstrap controls columns/gutters. This intentionally disables
   the older CSS-grid rules that caused the phantom/empty block.
   ============================================================ */

.ml-catalog--reference .ml-product-grid.row {
    display: flex !important;
    flex-wrap: wrap !important;
    grid-template-columns: none !important;
    gap: 0 !important;
    width: 100%;
    margin-right: 0 !important;
    margin-left: 0 !important;
    background: #fff !important;
    overflow: visible;
}

    .ml-catalog--reference .ml-product-grid.row > .col {
        min-width: 0;
        display: flex;
    }

    .ml-catalog--reference .ml-product-grid.row .ml-product-card {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .ml-catalog--reference .ml-product-grid.row .ml-product-card__media {
        width: 100%;
        min-height: 0 !important;
        height: auto !important;
        aspect-ratio: .79 / 1 !important;
    }

    .ml-catalog--reference .ml-product-grid.row .ml-product-card__track {
        direction: ltr;
    }

    /* Bootstrap g-2 handles the space between cards. */
    .ml-catalog--reference .ml-product-grid.row > * {
        padding-top: calc(var(--bs-gutter-y) * .5);
        padding-bottom: calc(var(--bs-gutter-y) * .5);
    }

    /* Avoid a grey "fake card" in an incomplete last row. */
    .ml-catalog--reference .ml-product-grid.row,
    .ml-catalog--reference .ml-product-grid.row::before,
    .ml-catalog--reference .ml-product-grid.row::after {
        background-color: #fff !important;
    }

@media (max-width: 767.98px) {

    .ml-catalog--reference .ml-product-grid.row .ml-product-card__media {
        aspect-ratio: .78 / 1 !important;
    }
}


/* ============================================================
   PRODUCT PAGINATION — BOOTSTRAP
   ============================================================ */

.ml-pagination-section {
    width: 100%;
    padding: 42px 16px 48px;
    border-top: 1px solid #e8e4de;
    border-bottom: 1px solid #e8e4de;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    clear: both;
}

.ml-pagination-summary {
    color: #8b847b;
    font-size: 9px;
    line-height: 1.5;
}

.ml-catalog-pagination-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
}

.ml-catalog-pagination.pagination {
    --bs-pagination-padding-x: 0;
    --bs-pagination-padding-y: 0;
    --bs-pagination-font-size: 11px;
    --bs-pagination-color: #4e4943;
    --bs-pagination-bg: transparent;
    --bs-pagination-border-width: 0;
    --bs-pagination-border-color: transparent;
    --bs-pagination-border-radius: 0;
    --bs-pagination-hover-color: #1f1d1a;
    --bs-pagination-hover-bg: transparent;
    --bs-pagination-focus-color: #1f1d1a;
    --bs-pagination-focus-bg: transparent;
    --bs-pagination-focus-box-shadow: none;
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: #282521;
    --bs-pagination-active-border-color: #282521;
    --bs-pagination-disabled-color: #c0bab2;
    --bs-pagination-disabled-bg: transparent;
    direction: ltr;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.ml-catalog-pagination .page-item {
    margin: 0;
}

.ml-catalog-pagination .ml-page-link {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid transparent !important;
    border-radius: 0 !important;
    background: transparent;
    color: #575149;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: none !important;
    text-decoration: none;
    line-height: 1;
    transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}

.ml-catalog-pagination .page-item:not(.disabled) .ml-page-link:hover {
    border-color: #cfc9c1 !important;
    color: #1f1d1a;
}

.ml-catalog-pagination .page-item.active .ml-page-link {
    border-color: #282521 !important;
    background: #282521 !important;
    color: #fff !important;
}

.ml-catalog-pagination .page-item.disabled .ml-page-link {
    opacity: .55;
    pointer-events: none;
}

.ml-catalog-pagination .ml-page-link--arrow {
    min-width: 82px;
    direction: rtl;
}

    .ml-catalog-pagination .ml-page-link--arrow > span[aria-hidden="true"],
    .ml-catalog-pagination .ml-page-link--arrow > span:not(.ml-page-link__text) {
        direction: ltr;
        font: 300 19px/1 Arial, sans-serif;
    }

.ml-page-dots .ml-page-link {
    min-width: 30px;
    padding-inline: 4px;
    opacity: .7 !important;
}


/* Give the editorial block a clean separation from pagination. */
.ml-pagination-section + .ml-catalog-editorial {
    margin-top: 0 !important;
    padding-top: 58px;
}


@media (max-width: 767.98px) {

    .ml-pagination-section {
        padding: 30px 10px 34px;
        gap: 13px;
    }

    .ml-catalog-pagination.pagination {
        gap: 2px;
    }

    .ml-catalog-pagination .ml-page-link {
        min-width: 34px;
        height: 36px;
        padding-inline: 8px;
        font-size: 10px;
    }

    .ml-catalog-pagination .ml-page-link--arrow {
        min-width: 38px;
        width: 38px;
        padding: 0;
    }

    .ml-catalog-pagination .ml-page-link__text {
        display: none;
    }

    .ml-pagination-section + .ml-catalog-editorial {
        padding-top: 42px;
    }
}


/* ============================================================
   PRODUCT CARD PRICE / DISCOUNT
   ============================================================ */

.ml-product-card__pricing {
    margin-top: 7px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ml-product-card__price-row,
.ml-product-card__discount-row,
.ml-product-card__final-price-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    flex-wrap: wrap;
}

    .ml-product-card__price-label,
    .ml-product-card__final-price-row > span {
        color: #817970;
        font-size: 9px;
    }

.ml-product-card__old-price {
    color: #9d958c;
    font-size: 10px;
    text-decoration-thickness: 1px;
}

.ml-product-card__discount-row {
    min-height: 22px;
}

.ml-product-card__discount-badge {
    min-height: 20px;
    padding: 3px 7px;
    background: #f1e7e2;
    color: #8b4633;
    display: inline-flex;
    align-items: center;
    font-size: 8px;
    line-height: 1;
}

.ml-product-card__discount-amount {
    color: #9a5140;
    font-size: 9px;
}

.ml-product-card__final-price-row {
    margin-top: 1px;
}

    .ml-product-card__final-price-row strong {
        color: #27231f;
        font-size: 11px;
        font-weight: 600;
    }

.ml-product-card__final-price-row--single {
    margin-top: 3px;
}

.ml-product-card__category-fallback {
    margin-top: 6px;
    color: #8a837a;
    font-size: 9px;
}

@media (max-width: 767.98px) {

    .ml-product-card__pricing {
        margin-top: 5px;
        gap: 4px;
    }

    .ml-product-card__price-label,
    .ml-product-card__final-price-row > span {
        font-size: 8px;
    }

    .ml-product-card__old-price {
        font-size: 9px;
    }

    .ml-product-card__discount-badge {
        min-height: 18px;
        padding: 3px 5px;
        font-size: 7px;
    }

    .ml-product-card__discount-amount {
        font-size: 8px;
    }

    .ml-product-card__final-price-row strong {
        font-size: 10px;
    }
}

.ml-product-card__slider {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.ml-product-card__track {
    display: flex;
    width: 100%;
    height: 100%;
    /* چون صفحه RTL است ولی حرکت اسلایدر باید LTR محاسبه شود */
    direction: ltr;
    transition: transform .38s ease;
    will-change: transform;
}

.ml-product-card__slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

    .ml-product-card__slide img {
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
    }

.ml-product-card__nav {
    position: absolute;
    top: 50%;
    z-index: 6;
    width: 36px;
    height: 52px;
    padding: 0;
    border: 0;
    background: rgba(255,255,255,.78);
    color: #27231f;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    opacity: 0;
    cursor: pointer;
    transition: opacity .2s ease, background .2s ease;
}

.ml-product-card:hover .ml-product-card__nav {
    opacity: 1;
}

.ml-product-card__nav--prev {
    left: 0;
}

.ml-product-card__nav--next {
    right: 0;
}

.ml-product-card__nav span {
    font: 300 30px/1 Arial, sans-serif;
}

@media (max-width: 767.98px) {

    .ml-product-card__nav {
        opacity: .9;
    }
}