.mahan-products {
    --mahan-columns-desktop: 4;
    --mahan-columns-tablet: 3;
    --mahan-columns-mobile: 2;
    --mahan-products-gap: 16px;
    width: 100%;
    font-family: Danam, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5em;
	scroll-margin-top: 20px;
}

.mahan-products *,
.mahan-products *::before,
.mahan-products *::after { box-sizing: border-box; }

.mahan-archive {
    width: 100%;
    color: #000;
    font-family: Danam, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5em;
}

.mahan-archive *,
.mahan-archive *::before,
.mahan-archive *::after { box-sizing: border-box; }

.mahan-archive__title {
    margin: 0 0 15px;
    padding: 0 0 14px;
    border-bottom: 1px solid #e7e7e9;
    color: #000;
    font: inherit;
    font-size: 18px;
    font-weight: 400;
    text-align: right;
}

.mahan-archive__layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.mahan-archive__main { min-width: 0; }
.mahan-archive__mobile-actions,
.mahan-bottom-sheet__header,
.mahan-bottom-sheet__handle { display: none; }

.mahan-bottom-sheet__backdrop {
    display: none !important;
    pointer-events: none !important;
}

.mahan-archive__filters .mahan-product-filters {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.mahan-archive__filters .mahan-product-filters__groups { display: grid; gap: 16px; }
.mahan-archive__filters .mahan-product-filters__group {
    overflow: hidden;
    border: 1px solid #e4e7ea;
    border-radius: 9px;
    background: #fff;
}
.mahan-archive__filters .mahan-product-filters__group summary {
    position: relative;
    padding: 17px 18px;
    border-bottom: 1px solid #eef0f2;
    background: #fafafa;
    font-weight: 600;
    list-style: none;
}
.mahan-archive__filters .mahan-product-filters__group summary::-webkit-details-marker { display: none; }
.mahan-archive__filters .mahan-product-filters__group summary::after {
    position: absolute;
    top: 50%;
    left: 16px;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-radius: 4px;
    content: none;
    opacity: .85;
    transform: translateY(-50%);
}
.mahan-archive__filters .mahan-product-filters__group--brand summary::after { border-radius: 50%; }
.mahan-archive__filters .mahan-product-filters__options {
    max-height: 340px;
    gap: 0;
    padding: 4px 14px;
}
.mahan-archive__filters .mahan-product-filters__option {
    min-height: 54px;
    padding: 10px 0;
    border-bottom: 1px solid #eef0f2;
    color: #000;
}
.mahan-archive__filters .mahan-product-filters__option:last-child { border-bottom: 0; }
.mahan-archive .mahan-archive__filters .mahan-product-filters__reset {
    width: 100%;
    min-height: 42px;
    margin-top: 12px;
    border: 1px solid #e4e7ea;
    border-radius: 7px;
    background: #fff;
}
.mahan-product-filters__apply,
.mahan-archive__sort-apply { display: none !important; }

.mahan-archive__sort {
    position: relative;
    min-height: 58px;
    margin-bottom: 14px;
    border-bottom: 1px solid #e7e7e9;
}
.mahan-archive__sort-options {
    display: flex;
    min-height: 58px;
    align-items: center;
    gap: 34px;
    opacity: 0;
}
.mahan-archive.is-ready .mahan-archive__sort-options { opacity: 1; }
.mahan-archive__sort-label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; white-space: nowrap; }
.mahan-archive__sort-label img { width: 20px; height: 20px; }
.mahan-archive__sort-options button {
    position: relative;
    min-height: 58px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #000;
    cursor: pointer;
    font: inherit;
    white-space: nowrap;
}
.mahan-archive__sort-options button::after {
    position: absolute;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 3px;
    border-radius: 4px 4px 0 0;
    background: #E40137;
    content: '';
    opacity: 0;
}
.mahan-archive__sort-options button.is-active { color: #E40137; }
.mahan-archive__sort-options button.is-active::after { opacity: 1; }
.mahan-archive__sort-options button:hover,
.mahan-archive__sort-options button:focus,
.mahan-archive__sort-options button:active {
    border-color: transparent;
    background: transparent;
    color: #000;
    box-shadow: none;
    transform: none;
}
.mahan-archive__sort-options button.is-active:hover,
.mahan-archive__sort-options button.is-active:focus,
.mahan-archive__sort-options button.is-active:active { color: #E40137; }
.mahan-archive__sort-skeleton {
    position: absolute;
    inset: 15px 0 auto;
    display: flex;
    gap: 26px;
}
.mahan-archive.is-ready .mahan-archive__sort-skeleton { display: none; }
.mahan-archive__sort-skeleton .mahan-skeleton { width: 105px; height: 18px; }
.mahan-archive__sort-skeleton .mahan-skeleton:first-child { width: 150px; }

.mahan-product-filters {
    width: 100%;
    padding: 14px;
    border: 1px solid #e4e7ea;
    border-radius: 9px;
    background: #fff;
    color: #000;
    font-family: Danam, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5em;
}

.mahan-product-filters--loading { min-height: 230px; }

.mahan-product-filters *,
.mahan-product-filters *::before,
.mahan-product-filters *::after { box-sizing: border-box; }

.mahan-product-filters__header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.mahan-product-filters__header strong { color: #000; font-weight: 600; }
.mahan-archive .mahan-product-filters__reset {
    padding: 7px 0;
    border: 0;
    background: transparent;
    color: #E40137;
    cursor: pointer;
    font-family: Danam, sans-serif;
    font-size: 13px !important;
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    box-shadow: none;
    transform: none;
    transition: none;
}
.mahan-archive .mahan-product-filters__reset:is(:hover, :focus, :active) {
    border: 0 !important;
    background: transparent !important;
    color: #E40137 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    box-shadow: none !important;
    transform: none !important;
}
.mahan-archive .mahan-archive__filters .mahan-product-filters__reset:is(:hover, :focus, :active) {
    border: 1px solid #e4e7ea !important;
    background: #fff !important;
}
.mahan-product-filters__group { border-top: 1px solid #eef0f2; }
.mahan-product-filters__group summary { padding: 12px 0; color: #000; cursor: pointer; font-weight: 500; list-style-position: inside; }
.mahan-product-filters__options { display: grid; gap: 5px; max-height: 260px; padding: 0 2px 12px; overflow: auto; scrollbar-width: thin; }
.mahan-product-filters__group.is-updating { position: relative; min-height: 190px; pointer-events: none; }
.mahan-product-filters__group.is-updating .mahan-product-filters__options { visibility: hidden; }
.mahan-dependent-filter-skeleton {
    position: absolute;
    z-index: 2;
    top: 55px;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 16px 14px;
    background: #fff;
}
.mahan-dependent-filter-skeleton .mahan-skeleton { width: 100%; height: 18px; }
.mahan-dependent-filter-skeleton .mahan-skeleton:nth-child(2) { width: 82%; }
.mahan-dependent-filter-skeleton .mahan-skeleton:nth-child(3) { width: 91%; }
.mahan-dependent-filter-skeleton .mahan-skeleton:nth-child(4) { width: 68%; }
.mahan-product-filters__option { display: flex; align-items: center; gap: 8px; min-height: 30px; color: #50575e; cursor: pointer; }
.mahan-product-filters__option[hidden] { display: none; }
.mahan-product-filters__option input { width: 16px; height: 16px; flex: 0 0 auto; margin: 0; accent-color: #E40137; }
.mahan-product-filters__notice { margin: 0; color: #8A95A0; font-family: Danam, sans-serif; font-size: 14px; }
.mahan-filter-skeleton { display: grid; gap: 12px; }
.mahan-filter-skeleton .mahan-skeleton { display: block; margin: 0; }
.mahan-filter-skeleton__header { width: 42%; height: 18px; }
.mahan-filter-skeleton__group { width: 68%; height: 16px; margin-top: 8px !important; }
.mahan-filter-skeleton__line { width: 92%; height: 14px; }
.mahan-filter-skeleton__line--short { width: 74%; }

.mahan-products__viewport { position: relative; }

.mahan-products__items {
    display: grid;
    grid-template-columns: repeat(var(--mahan-columns-desktop), minmax(0, 1fr));
    gap: var(--mahan-products-gap);
    align-items: stretch;
    overflow-anchor: none;
}

.mahan-products--carousel .mahan-products__items {
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - (var(--mahan-columns-desktop) - 1) * var(--mahan-products-gap)) / var(--mahan-columns-desktop));
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.mahan-products--carousel .mahan-products__items::-webkit-scrollbar { display: none; }
.mahan-products--carousel .mahan-product-card { scroll-snap-align: start; }

.mahan-product-card {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 100%;
    flex-direction: column;
    overflow: hidden;
    padding: 6px;
    border: 1px solid #e4e7ea;
    border-radius: 9px;
    background: #fff;
    color: #000;
    text-decoration: none !important;
}

.mahan-product-card:hover,
.mahan-product-card:focus { color: #000; text-decoration: none !important; }
.mahan-product-card:focus-visible { outline: 2px solid #E40137; outline-offset: 2px; }

.mahan-product-card__media {
    display: grid;
    width: 100%;
    aspect-ratio: 1 / 1;
    place-items: center;
    margin-bottom: 12px;
    overflow: hidden;
    border-radius: 8px;
}

.mahan-product-card__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.mahan-product-card__title {
    display: -webkit-box;
    min-height: 3em;
    margin: 0 0 15px;
    overflow: hidden;
    color: #000;
    font: inherit;
    font-weight: 400;
    text-align: right;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.mahan-product-card__footer {
    display: flex;
    min-height: 46px;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    direction: ltr;
}

.mahan-product-card__prices {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    direction: ltr;
    text-align: left;
}

.mahan-product-card__prices > del,
.mahan-product-card__prices > strong { text-align: left; }

.mahan-final-price { display: flex; gap: 3px; }

.mahan-product-card__prices .woocommerce-Price-amount bdi {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    direction: ltr;
}

.mahan-product-card__prices .mahan-final-price bdi {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	direction: ltr;
	unicode-bidi: isolate;
}

.mahan-product-card__prices .mahan-final-price .mahan-price-unit {
	display: block;
	width: .9em;
	height: .9em;
	flex: 0 0 auto;
	object-fit: contain;
}

.mahan-product-card__prices .mahan-final-price .mahan-price-number {
	display: block;
}

.mahan-product-card__prices del {
    color: #8A95A0;
    font-size: 12px;
    line-height: 1.4;
    text-decoration-thickness: 1px;
}

.mahan-product-card__prices strong {
	color: #000;
	font-size: 16px;
	font-weight: 500;
    line-height: 1.5em;
    white-space: nowrap;
}

.mahan-product-card__discount {
    flex: 0 0 auto;
    padding: 5px 7px 3px;
    border-radius: 6px;
    background: #E40137;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

.mahan-product-card__unavailable {
	width: 100%;
	color: #8A95A0;
	font-size: 14px;
	text-align: left;
}

.mahan-products__nav {
    position: absolute;
    z-index: 2;
    top: 50%;
    display: grid;
    width: 37px;
    height: 37px;
    padding: 0;
    border: 1px solid #e4e7ea;
    border-radius: 5px;
    background: #fff;
    color: #000;
    cursor: pointer;
    font: 27px/1 sans-serif;
    place-items: center;
    transform: translateY(-50%);
}

.mahan-products__nav--prev { right: -17px; }
.mahan-products__nav--next { left: -17px; }
.mahan-products__nav[hidden] { display: none; }

.mahan-products__empty {
    display: grid;
    min-height: 180px;
    grid-column: 1 / -1;
    margin: 0;
    color: #8A95A0;
    text-align: center;
    place-items: center;
}

.mahan-products__error { grid-column: 1 / -1; margin: 0; color: #8A95A0; }

.mahan-products__pagination {
    width: 100%;
    min-height: 40px;
    margin-top: 24px;
}

.mahan-products__pagination:empty { display: none; }

.mahan-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    direction: rtl;
}

.mahan-pagination button {
    display: inline-grid;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #5f6670;
    cursor: pointer;
    font: inherit;
    place-items: center;
    transition: none;
}

.mahan-pagination button:hover,
.mahan-pagination button:focus,
.mahan-pagination button:active {
    background: #f2f3f5;
    color: #000;
}

.mahan-pagination__number.is-active,
.mahan-pagination__number.is-active:hover,
.mahan-pagination__number.is-active:focus {
    background: #E40137;
    color: #fff;
    cursor: default;
    opacity: 1;
}

.mahan-pagination__edge {
    display: inline-flex !important;
    width: auto;
    gap: 5px;
    white-space: nowrap;
}

.mahan-pagination__dots {
    display: inline-grid;
    min-width: 30px;
    height: 38px;
    color: #8A95A0;
    place-items: center;
}

.mahan-products__pagination[aria-busy="true"] { pointer-events: none; opacity: .55; }

.mahan-product-card--skeleton { pointer-events: none; }
.mahan-skeleton {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 5px;
    background: #eceff1;
}
.mahan-skeleton::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.75) 50%, transparent 80%);
    content: '';
    transform: translateX(100%);
    animation: mahan-skeleton-wave 1.35s infinite;
}
.mahan-skeleton--image { width: 100%; aspect-ratio: 1 / 1; margin-bottom: 12px; border-radius: 8px; }
.mahan-skeleton--title { width: 82%; height: 16px; margin: 3px 0 34px auto; }
.mahan-skeleton--old-price { width: 36%; height: 11px; margin: 0 auto 6px 0; }
.mahan-skeleton--price { width: 52%; height: 16px; margin: 0 auto 0 0; }
.mahan-skeleton--badge { position: absolute; right: 6px; bottom: 6px; width: 42px; height: 26px; }

@keyframes mahan-skeleton-wave { to { transform: translateX(-100%); } }

@media (prefers-reduced-motion: reduce) {
    .mahan-skeleton::after { animation: none; }
    .mahan-products--carousel .mahan-products__items { scroll-behavior: auto; }
}

@media (max-width: 1024px) {
    .mahan-products__items { grid-template-columns: repeat(var(--mahan-columns-tablet), minmax(0, 1fr)); }
    .mahan-products--carousel .mahan-products__items { grid-auto-columns: calc((100% - (var(--mahan-columns-tablet) - 1) * var(--mahan-products-gap)) / var(--mahan-columns-tablet)); }
}

@media (max-width: 767px) {
    body.mahan-sheet-open { overflow: hidden; }
    .mahan-archive { font-size: 13px; }
    .mahan-archive__title {
        margin: 0 0 14px;
        padding: 0 10px;
        border: 0;
        font-size: 17px;
        font-weight: 400;
        text-align: center;
    }
    .mahan-archive__layout { display: block; }
    .mahan-archive__mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 2px;
        margin-bottom: 18px;
        padding-bottom: 18px;
        border-bottom: 1px solid #e7e7e9;
    }
    .mahan-archive__mobile-actions button {
        display: grid;
        min-height: 48px;
        grid-template-columns: 22px 1fr 10px;
        gap: 8px;
        align-items: center;
        padding: 0 14px;
        border: 1px solid #e4e7ea;
        border-radius: 8px;
        background: #fff;
        color: #6e747d;
        cursor: pointer;
        font: inherit;
        font-weight: 500;
        text-align: right;
    }
    .mahan-archive__mobile-actions button:hover,
    .mahan-archive__mobile-actions button:focus,
    .mahan-archive__mobile-actions button:active {
        border-color: #e4e7ea;
        background: #fff;
        color: #6e747d;
        box-shadow: none;
        transform: none;
    }
    .mahan-archive__mobile-actions button > img:first-child { width: 22px; height: 22px; color: #000; }
    .mahan-archive__arrow { width: 7px; height: 13px; opacity: .7; }
    .mahan-bottom-sheet {
        position: fixed;
        z-index: 9999;
        right: 0;
        bottom: 0;
        left: 0;
        display: block;
        width: 100%;
        max-height: min(82vh, 720px);
        margin: 0;
        overflow: auto;
        overscroll-behavior: contain;
        padding: 10px 14px 18px;
        border: 0;
        border-radius: 30px 30px 0 0;
        background: #fff;
        box-shadow: 0 -10px 35px rgba(0,0,0,.16);
        opacity: 0;
        pointer-events: none;
        transform: translateY(105%);
        transition: transform .32s ease, opacity .2s ease;
    }
    .mahan-bottom-sheet.is-open {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }
    .mahan-bottom-sheet__handle {
        display: block;
        width: 42px;
        height: 4px;
        margin: 0 auto 8px;
        border-radius: 10px;
        background: #d9dde1;
    }
    .mahan-bottom-sheet__header {
        display: flex;
        min-height: 42px;
        align-items: center;
        justify-content: space-between;
        padding: 0 2px 9px;
        border-bottom: 1px solid #eef0f2;
    }
    .mahan-bottom-sheet__header strong { font-size: 15px; font-weight: 600; }
    .mahan-bottom-sheet__header button {
        width: 34px;
        height: 34px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #000;
        cursor: pointer;
        font: 28px/1 sans-serif;
    }
    .mahan-bottom-sheet__backdrop {
        position: fixed;
        z-index: 9998;
        inset: 0;
        display: none !important;
        width: 100%;
        height: 100%;
        padding: 0;
        border: 0;
        background: rgba(0,0,0,.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
    }
    .mahan-bottom-sheet__backdrop[hidden] { display: none !important; }
    .mahan-bottom-sheet__backdrop.is-open:not([hidden]) { display: block !important; opacity: 1; pointer-events: auto !important; }
    .mahan-archive__filters .mahan-product-filters { padding-top: 12px; }
    .mahan-archive__filters .mahan-product-filters__groups.has-two-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .mahan-archive__filters .mahan-product-filters__group { width: 100%; }
    .mahan-archive__filters .mahan-product-filters__group summary { padding: 14px 12px; }
    .mahan-archive__filters .mahan-product-filters__group summary::after { left: 10px; width: 14px; height: 14px; content: ''; }
    .mahan-archive__filters .mahan-product-filters__options {
        max-height: min(54vh, 420px);
        padding: 3px 10px;
    }
    .mahan-archive__filters .mahan-product-filters__option { min-height: 48px; }
    .mahan-archive .mahan-product-filters__apply,
    .mahan-archive .mahan-archive__sort-apply {
        display: block !important;
        width: 100% !important;
        min-height: 44px;
        margin-top: 14px;
        padding: 8px 14px;
        border: 1px solid #E40137;
        border-radius: 7px;
        background: #E40137 !important;
        color: #fff !important;
        cursor: pointer;
        font: inherit;
        font-weight: 500;
        text-align: center;
    }
    .mahan-archive .mahan-product-filters__apply:hover,
    .mahan-archive .mahan-product-filters__apply:focus,
    .mahan-archive .mahan-product-filters__apply:active,
    .mahan-archive .mahan-archive__sort-apply:hover,
    .mahan-archive .mahan-archive__sort-apply:focus,
    .mahan-archive .mahan-archive__sort-apply:active {
        border-color: #E40137;
        background: #E40137 !important;
        color: #fff !important;
        box-shadow: none;
        transform: none;
    }
    .mahan-archive__filters .mahan-product-filters__reset { margin-top: 8px; }
    .mahan-archive__sort { min-height: 0; padding-top: 8px; border: 0; }
    .mahan-archive__sort-options {
        display: grid;
        min-height: 0;
        gap: 0;
        opacity: 1;
    }
    .mahan-archive__sort-label { display: none; }
    .mahan-archive__sort-options button {
        min-height: 50px;
        padding: 0 8px;
        border-bottom: 1px solid #eef0f2;
        text-align: right;
    }
    .mahan-archive__sort-options button::before {
        display: inline-block;
        width: 16px;
        height: 16px;
        margin-left: 9px;
        border: 1.5px solid #8a95a0;
        border-radius: 50%;
        content: '';
        vertical-align: middle;
    }
    .mahan-archive__sort-options button.is-active::before { border: 5px solid #E40137; }
    .mahan-archive__sort-options button::after { display: none; }
    .mahan-archive__sort-skeleton { display: none; }
    .mahan-products { font-size: 13px; }
    .mahan-product-filters { padding: 12px; font-size: 13px; }
    .mahan-products__items { grid-template-columns: repeat(var(--mahan-columns-mobile), minmax(0, 1fr)); }
    .mahan-products--carousel .mahan-products__items { grid-auto-columns: calc((100% - (var(--mahan-columns-mobile) - 1) * var(--mahan-products-gap)) / var(--mahan-columns-mobile)); }
    .mahan-product-card { padding: 6px; }
    .mahan-product-card__title { margin-bottom: 12px; }
    .mahan-product-card__prices strong { font-size: 14px; }
    .mahan-product-card__unavailable { font-size: 13px; }
    .mahan-products__nav { display: none; }
    .mahan-skeleton--badge { right: 6px; bottom: 6px; }
    .mahan-products__pagination { margin-top: 18px; }
    .mahan-pagination { gap: 3px; }
    .mahan-pagination button { min-width: 34px; height: 34px; padding: 0 7px; }
    .mahan-pagination__dots { min-width: 20px; height: 34px; }
}
/* Product cards remain above theme overlays and retain their link target. */
.mahan-products__items > a.mahan-product-card{position:relative;z-index:1;pointer-events:auto;cursor:pointer}
