/**
 * IMT Montessori — unified premium storefront (.imt-catalog, PDP shells)
 */

.imt-catalog {
    --imt-catalog-accent: var(--imt-brand-blue, #2563eb);
    --imt-catalog-accent-soft: rgba(37, 99, 235, 0.34);
    --imt-card-radius: var(--imt-radius-lg, 26px);
    margin-bottom: 0;
    padding-bottom: 0;
}

.imt-catalog__bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(1200px 600px at 10% 15%, var(--imt-catalog-accent-soft), transparent 62%),
        linear-gradient(165deg, rgba(250, 247, 242, 1) 0%, rgba(239, 246, 255, 0.92) 52%, rgba(250, 247, 242, 1) 100%);
    pointer-events: none;
    opacity: 1;
    z-index: 0;
}

.imt-catalog .container,
.imt-catalog-hero,
.imt-catalog__body,
.imt-catalog__wave {
    position: relative;
    z-index: 1;
}

.imt-catalog__wave {
    margin-top: -1px;
    color: var(--cream, #faf7f2);
    line-height: 0;
}

.imt-catalog__wave-svg {
    width: 100%;
    height: clamp(26px, 4.2vw, 52px);
}

.imt-catalog-hero {
    --imt-hero-fill: rgba(248, 250, 252, 0.05);
    position: relative;
    width: 100%;
    max-width: min(1480px, calc(100% - clamp(20px, 4vw, 40px)));
    margin-inline: auto;
    isolation: isolate;
    overflow: hidden;
    border-radius: var(--imt-card-radius);
    min-height: 320px;
    background:
        radial-gradient(100% 80% at 18% 90%, rgba(255, 255, 255, 0.06), transparent 45%),
        radial-gradient(90% 70% at 84% 88%, rgba(255, 255, 255, 0.05), transparent 48%),
        linear-gradient(165deg, var(--imt-hero-fill) 0%, rgba(255, 251, 248, 0.16) 100%);
    box-shadow:
        var(--imt-shadow-soft, 0 28px 72px rgba(15, 32, 68, 0.1)),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

@media (min-width: 992px) {
    .imt-catalog-hero {
        min-height: 400px;
    }
}

.imt-catalog-hero__media--has-photo {
    background-repeat: no-repeat;
}

.imt-catalog-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: inherit;
    pointer-events: none;
}

.imt-catalog-hero__bg-img,
.imt-catalog-hero__bg-fallback {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.imt-catalog-hero__bg-img {
    object-fit: cover;
    object-position: center center;
    transform: scale(1.025);
    filter: saturate(0.92) contrast(1.06) brightness(1.05);
    z-index: 1;
    display: block;
}

/* When a photo preset is active, keep washes lighter so PNG/JPEG heroes read clearly */
.imt-catalog-hero__media--has-photo .imt-catalog-hero__bg-img {
    filter: saturate(1) contrast(1.04) brightness(1.02);
}

.imt-catalog-hero__bg-fallback--layer {
    z-index: 0;
}

.imt-catalog-hero__bg-fallback {
    background-repeat: no-repeat;
    background-position: center bottom;
    background-size: cover;
    opacity: 0.88;
}

.imt-catalog-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(
            178deg,
            rgba(255, 252, 248, 0.38) 0%,
            rgba(255, 252, 248, 0.14) 32%,
            rgba(255, 250, 246, 0.02) 50%,
            rgba(252, 248, 252, 0.06) 66%,
            rgba(252, 248, 245, 0.22) 100%
        ),
        radial-gradient(85% 55% at 50% -8%, rgba(255, 255, 255, 0.22), transparent 54%),
        radial-gradient(70% 90% at 6% 88%, rgba(255, 255, 255, 0.06), transparent 56%),
        radial-gradient(65% 85% at 94% 85%, rgba(255, 255, 255, 0.06), transparent 54%);
}

.imt-catalog-hero__media--has-photo .imt-catalog-hero__scrim {
    background:
        linear-gradient(
            178deg,
            rgba(255, 252, 248, 0.16) 0%,
            rgba(255, 252, 248, 0.05) 32%,
            rgba(255, 250, 246, 0.01) 50%,
            rgba(252, 248, 252, 0.03) 66%,
            rgba(252, 248, 245, 0.09) 100%
        ),
        radial-gradient(85% 55% at 50% -8%, rgba(255, 255, 255, 0.09), transparent 54%),
        radial-gradient(70% 90% at 6% 88%, rgba(255, 255, 255, 0.03), transparent 56%),
        radial-gradient(65% 85% at 94% 85%, rgba(255, 255, 255, 0.03), transparent 54%);
}

.imt-catalog-hero__content {
    position: relative;
    z-index: 2;
    padding-block: clamp(1.25rem, 3vw, 1.75rem) clamp(1.1rem, 3.2vw, 1.9rem);
}

/* Wins over .imt-catalog .container { z-index: 1 } so hero text/search stay above background layers */
.imt-catalog-hero > .container.imt-catalog-hero__content {
    z-index: 3;
}

.imt-catalog__toolbar--compact .imt-catalog__toolbar-hint {
    font-size: 0.68rem !important;
    line-height: 1.35;
}

.imt-catalog-hero__stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(0.92rem, 2.2vw, 1.38rem);
    max-width: 960px;
    margin-inline: auto;
}

.imt-catalog-hero__copy {
    max-width: 760px;
}

.imt-catalog-badge {
    border-radius: 999px;
    padding: 0.45rem 1rem;
    backdrop-filter: blur(8px);
}

.imt-catalog-badge--hero-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid rgba(20, 58, 98, 0.07);
    color: rgba(31, 55, 90, 0.9);
    font-weight: 600;
    font-size: 0.78rem;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    margin-bottom: 10px;
    padding: 0.28rem 0.7rem;
    box-shadow: 0 8px 24px rgba(20, 58, 98, 0.06);
}

.imt-catalog-badge--soft {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(20, 58, 98, 0.08);
    color: rgba(31, 55, 90, 0.88);
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.imt-catalog-h1 {
    font-weight: 800;
    line-height: 1.13;
    letter-spacing: -0.018em;
}

.imt-catalog-h1--hero {
    max-width: 720px;
    color: #142f52;
}

@media (max-width: 575px) {
    .imt-catalog-h1--hero {
        font-size: 30px;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .imt-catalog-h1--hero {
        font-size: 38px;
    }
}

@media (min-width: 992px) {
    .imt-catalog-h1--hero {
        font-size: clamp(48px, 0.72vw + 2.575rem, 58px);
    }
}

.imt-catalog-h1--hero + .imt-catalog-sub--hero {
    margin-top: 0;
}

@media (max-width: 991px) {
    .imt-catalog-h1--hero {
        margin-bottom: 12px;
    }
}

@media (min-width: 992px) {
    .imt-catalog-h1--hero {
        margin-bottom: 16px;
    }
}

.imt-catalog-sub {
    opacity: 0.94;
}

.imt-catalog-sub--hero {
    max-width: 640px;
    margin-bottom: 0;
    padding-top: 2px;
    color: rgba(31, 55, 90, 0.72);
    font-size: clamp(1rem, 0.5vw + 0.9125rem, 1.125rem);
    line-height: 1.62;
    font-weight: 500;
}

.text-white-opacity {
    opacity: 0.9;
}

.imt-catalog-hero__search-row {
    flex-shrink: 0;
}

.imt-catalog-hero__searchpill {
    display: flex;
    width: 100%;
    max-width: 720px;
    min-height: 64px;
    height: auto;
    padding: 8px 10px;
    gap: 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow:
        0 24px 64px rgba(20, 58, 98, 0.1),
        inset 0 1px 1px rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
}

.imt-catalog-hero__searchpill--rtl {
    flex-direction: row-reverse;
}

.imt-catalog-hero__searchbtn {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    align-self: center;
    flex-shrink: 0;
    padding: 0 !important;
    border-radius: 50% !important;
    margin: 0;
    border: none !important;
    background: var(--imt-catalog-accent) !important;
    color: #fff !important;
    box-shadow: 0 12px 34px rgba(37, 99, 235, 0.3);
}

.imt-catalog-hero__search-input {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    align-self: center;
    height: 48px;
    min-height: 48px;
    padding-inline: 6px;
    font-size: 1.02rem;
    color: rgba(31, 55, 90, 0.95);
}

/* Smaller hero search bar (كتالوج: بحث أوضح وأخف) */
.imt-catalog-hero__searchpill--compact {
    min-height: 48px;
    max-width: min(640px, 100%);
    padding: 5px 8px;
    gap: 8px;
}

.imt-catalog-hero__searchpill--compact .imt-catalog-hero__searchbtn {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px;
}

.imt-catalog-hero__searchpill--compact .imt-catalog-hero__searchbtn svg {
    width: 18px;
    height: 18px;
}

.imt-catalog-hero__searchpill--compact .imt-catalog-hero__search-input {
    height: 38px;
    min-height: 38px;
    font-size: 0.875rem;
}

.imt-catalog-hero__stats-slot {
    flex-shrink: 0;
    width: 100%;
}

.imt-catalog-stats-bar--hero {
    max-width: 920px !important;
    width: 100%;
    padding: 14px clamp(12px, 2vw, 20px);
    border-radius: 28px !important;
    border: 1px solid rgba(255, 255, 255, 0.7) !important;
    background: rgba(255, 255, 255, 0.46) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow:
        0 22px 55px rgba(20, 58, 98, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.88) inset;
}

.imt-catalog-stats-bar__track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
    gap: clamp(12px, 2vw, 22px);
    align-items: start;
}

.imt-catalog-stats-bar__track--4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 991px) {
    .imt-catalog-stats-bar__track--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Keep a 2×2 stats grid on narrow phones (matches mobile storefront reference). */
@media (max-width: 479px) {
    .imt-catalog-stats-bar__track--4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .imt-catalog-stats-bar--hero {
        padding: 14px 12px !important;
        border-radius: 22px !important;
    }

    .imt-catalog-stats-bar__icon {
        width: 34px;
        height: 34px;
    }

    .imt-catalog-stats-bar__label {
        font-size: 0.68rem;
    }

    .imt-catalog-stats-bar__value {
        font-size: 1rem;
    }
}

.imt-catalog-stats-bar__cell {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: start;
}

.imt-catalog-stats-bar__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--imt-catalog-accent);
    background: rgba(255, 255, 255, 0.92);
    box-shadow:
        0 10px 26px rgba(22, 58, 109, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.imt-catalog-stats-bar__icon svg {
    display: block;
}

.imt-catalog-stats-bar__text {
    min-width: 0;
}

.imt-catalog-stats-bar__value {
    display: block;
    font-size: clamp(1.05rem, 0.82vw + 0.93rem, 1.42rem);
    font-weight: 800;
    line-height: 1.22;
    color: #142f52;
}

.imt-catalog-stats-bar__prefix {
    font-weight: 800;
    margin-inline-end: 1px;
}

.imt-catalog-stats-bar__label {
    display: block;
    margin-top: 4px;
    font-size: 0.7425rem;
    font-weight: 600;
    line-height: 1.42;
    color: rgba(20, 58, 98, 0.68);
}

html[dir="rtl"] .imt-catalog-stats-bar__cell {
    flex-direction: row-reverse;
}

html[dir="rtl"] .imt-catalog-stats-bar__text {
    text-align: end;
}

body.rtl .imt-catalog-stats-bar__cell {
    flex-direction: row-reverse;
}

body.rtl .imt-catalog-stats-bar__text {
    text-align: end;
}

@media (prefers-reduced-motion: reduce) {
    .imt-catalog-hero__bg-img {
        transform: none;
    }

    .imt-product-card--market:hover .imt-product-card__shell,
    .imt-product-card--market:hover .imt-product-card__thumb {
        transform: none;
    }

    .imt-reveal-card,
    .imt-product-card--market .imt-product-card__shell,
    .imt-product-card--market .imt-product-card__thumb {
        animation: none !important;
        transition: none !important;
    }
}

.imt-glass-panel {
    border-radius: var(--imt-radius-md, 18px);
    background: var(--imt-glass, rgba(255, 255, 255, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(16px);
    box-shadow: var(--imt-sheet-shadow, var(--imt-shadow-soft));
    padding: clamp(14px, 1.5vw, 18px);
}

.imt-catalog .imt-glass-panel {
    padding: clamp(11px, 1.25vw, 15px);
}

.imt-btn-accent {
    background: var(--imt-catalog-accent) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.imt-btn-accent:hover {
    filter: brightness(0.95);
    box-shadow: 0 14px 38px rgba(37, 99, 235, 0.38);
}

.imt-catalog__sidebar {
    position: sticky;
    top: clamp(86px, 10vw, 120px);
}

/* Above-grid filters: search + category + sort (“search cockpit”) */
.imt-catalog .imt-catalog__filters-panel--simple.imt-glass-panel {
    padding: clamp(9px, 1.15vw, 14px);
    margin-bottom: clamp(18px, 3.2vw, 32px);
}

.imt-catalog__filters-panel--simple .imt-catalog-filters--simple {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.imt-catalog-filters__shell {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px 12px;
    padding: 10px 11px;
    border-radius: clamp(16px, 2vw, 20px);
    border: 1px solid rgba(37, 99, 235, 0.2);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97) 0%, rgba(248, 251, 255, 0.92) 100%);
    box-shadow:
        0 10px 34px rgba(20, 58, 98, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

@media (min-width: 768px) {
    .imt-catalog-filters__shell {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
}

.imt-catalog-filters__searchtrack {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 240px;
    min-width: min(100%, 220px);
    padding: 4px 8px 4px 11px;
    border-radius: 999px;
    border: 1px solid rgba(15, 32, 68, 0.1);
    background: #fff;
    box-shadow: inset 0 1px 2px rgba(15, 32, 68, 0.04);
}

html[dir="rtl"] .imt-catalog-filters__searchtrack,
body.rtl .imt-catalog-filters__searchtrack {
    flex-direction: row-reverse;
    padding: 4px 11px 4px 8px;
}

.imt-catalog-filters__search-icon {
    display: inline-flex;
    color: rgba(37, 99, 235, 0.72);
    flex-shrink: 0;
}

.imt-catalog-filters__q {
    flex: 1 1 auto;
    min-width: 0;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 38px;
    font-size: 0.875rem;
    line-height: 1.35;
    color: rgba(15, 32, 68, 0.92);
    outline: none;
}

.imt-catalog-filters__q::placeholder {
    color: rgba(15, 32, 68, 0.42);
}

.imt-catalog-filters__q:focus {
    outline: none;
}

.imt-catalog-filters__go {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: var(--imt-catalog-accent, #2563eb) !important;
    color: #fff !important;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
    transition: transform 0.15s ease, filter 0.15s ease;
}

@media (hover: hover) {
    .imt-catalog-filters__go:hover {
        transform: translateY(-1px);
        filter: brightness(1.04);
    }
}

.imt-catalog-filters__rail {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 8px 10px;
    flex: 1 1 280px;
}

.imt-catalog-filters__ctrl--with-icon {
    display: flex;
    align-items: center;
    gap: 7px;
    flex: 1 1 148px;
    min-width: min(100%, 138px);
    padding: 5px 10px;
    border-radius: 13px;
    border: 1px solid rgba(15, 32, 68, 0.09);
    background: rgba(255, 255, 255, 0.88);
}

.imt-catalog-filters__mini-ico {
    display: inline-flex;
    color: rgba(15, 32, 68, 0.35);
    flex-shrink: 0;
}

.imt-catalog-filters__select--in-rail {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 32px;
    padding: 0.14rem 0.2rem 0.14rem 0.1rem !important;
    font-size: 0.8rem !important;
    line-height: 1.35;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: rgba(15, 32, 68, 0.9);
    box-shadow: none !important;
}

.imt-catalog-filters--simple .imt-catalog-filters__clear {
    flex: 0 0 auto;
    align-self: center;
    padding: 7px 11px;
    font-size: 0.74rem !important;
    font-weight: 700;
    text-decoration: none !important;
    color: rgba(37, 99, 235, 0.95) !important;
    white-space: nowrap;
    border-radius: 11px;
    border: 1px solid transparent;
}

@media (min-width: 768px) {
    .imt-catalog-filters--simple .imt-catalog-filters__clear {
        margin-inline-start: auto;
    }
}

@media (hover: hover) {
    .imt-catalog-filters--simple .imt-catalog-filters__clear:hover {
        background: rgba(37, 99, 235, 0.08);
        border-color: rgba(37, 99, 235, 0.2);
    }
}

.imt-catalog .imt-catalog__toolbar--compact.imt-glass-panel {
    padding: clamp(8px, 1vw, 12px) clamp(10px, 1.8vw, 15px);
}

.imt-catalog__toolbar--compact {
    gap: 8px 10px;
}

.imt-catalog-pagination {
    margin-top: auto;
    border-top: 1px solid rgba(15, 32, 68, 0.08);
}

.imt-catalog-pagination--trust-pills {
    margin-top: 0 !important;
    padding-top: 12px !important;
    padding-bottom: 0 !important;
    border-top: 1px solid rgba(15, 32, 68, 0.07);
}

@media (min-width: 992px) {
    .imt-catalog-pagination--trust-pills {
        padding-top: 14px !important;
    }
}

.imt-catalog-trust__pagination-zone {
    margin-top: 2px;
}

@media (max-width: 767px) {
    .imt-catalog-trust__pagination-zone {
        padding-bottom: 2px;
    }
}

.imt-catalog-trust .imt-catalog-single-page-note + .imt-catalog-cross-nav--compact,
.imt-catalog-trust__pagination-zone + .imt-catalog-cross-nav--compact {
    margin-top: 6px;
}

@media (min-width: 992px) {
    .imt-catalog-trust .imt-catalog-single-page-note + .imt-catalog-cross-nav--compact,
    .imt-catalog-trust__pagination-zone + .imt-catalog-cross-nav--compact {
        margin-top: 8px;
    }
}

.imt-catalog-trust > .container > .row + .imt-catalog-cross-nav--compact {
    margin-top: clamp(10px, 2.4vw, 16px);
}

.imt-catalog-pages-nav__list {
    gap: 8px;
}

.imt-catalog-pages-nav__btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9375rem;
    line-height: 1;
    border: 1px solid rgba(37, 99, 235, 0.32);
    background: #fff;
    color: var(--imt-catalog-accent, #2563eb);
    text-decoration: none !important;
    box-shadow: 0 8px 22px rgba(15, 32, 68, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.imt-catalog-pages-nav__btn--arrow {
    padding: 0 !important;
    width: 44px;
}

.imt-catalog-pages-nav__btn--num.is-current {
    background-image: linear-gradient(128deg, #1d4ed8 0%, #2563eb 52%, #38bdf8 100%);
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.32);
}

.imt-catalog-pages-nav__item.is-disabled .imt-catalog-pages-nav__btn {
    opacity: 0.35;
    pointer-events: none;
    box-shadow: none;
}

a.imt-catalog-pages-nav__btn--num:hover,
a.imt-catalog-pages-nav__btn--arrow:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.48);
    box-shadow: 0 14px 34px rgba(37, 99, 235, 0.18);
    color: var(--imt-catalog-accent, #2563eb);
}

.imt-catalog-pages-nav__ellipsis {
    display: inline-flex;
    align-items: center;
    padding: 0 8px;
    color: rgba(15, 32, 68, 0.45);
    font-weight: 700;
    min-height: 44px;
}

.imt-catalog-pagination .custom-pagination {
    flex-wrap: wrap;
    gap: 0.35rem;
}

.imt-catalog__toolbar {
    gap: 10px 12px;
}

.imt-catalog-product-row.row {
    margin-left: -8px;
    margin-right: -8px;
}

.imt-catalog-product-row.row > [class*="col-"] {
    padding-left: 8px;
    padding-right: 8px;
}

@media (min-width: 768px) {
    .imt-catalog-product-row.row {
        margin-left: -12px;
        margin-right: -12px;
    }

    .imt-catalog-product-row.row > [class*="col-"] {
        padding-left: 12px;
        padding-right: 12px;
    }
}

@media (max-width: 991px) {
    .imt-catalog-hero {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        min-height: 0 !important;
        overflow: visible;
        border-radius: clamp(18px, 4vw, 24px);
        max-width: calc(100% - 24px);
    }

    .imt-catalog-hero__media {
        position: relative !important;
        inset: auto !important;
        flex: 0 0 auto;
        width: 100%;
        aspect-ratio: 16 / 10;
        max-height: 52vh;
        min-height: 176px;
        border-radius: clamp(18px, 4vw, 24px) clamp(18px, 4vw, 24px) 0 0;
        overflow: hidden;
    }

    .imt-catalog-hero__stats-under-media {
        position: relative;
        z-index: 4;
        flex: 0 0 auto;
        margin-top: -12px;
        padding-top: 10px;
        padding-bottom: 2px;
    }

    .imt-catalog-hero__stats-under-media .imt-catalog-stats-bar--hero {
        margin-inline: auto;
        max-width: 920px;
        border-radius: 0 0 clamp(16px, 3.6vw, 22px) clamp(16px, 3.6vw, 22px);
        box-shadow:
            0 18px 44px rgba(20, 58, 98, 0.09),
            0 1px 0 rgba(255, 255, 255, 0.88) inset;
    }

    .imt-catalog-hero__content {
        flex: 1 1 auto;
        width: 100%;
    }
}

@media (min-width: 992px) {
    .imt-catalog-hero {
        display: block;
    }

    .imt-catalog-hero__media {
        position: absolute !important;
        inset: 0 !important;
        aspect-ratio: auto !important;
        max-height: none !important;
        min-height: 0 !important;
        border-radius: inherit !important;
        flex: none;
        width: auto;
        height: auto;
    }
}

@media (max-width: 767px) {
    .imt-catalog-hero__content {
        padding-block: 1.35rem 1.25rem;
    }

    .imt-catalog-hero__stack {
        gap: 1.15rem;
    }

    .imt-catalog-hero__searchpill {
        min-height: 56px;
        padding: 6px 8px;
        max-width: 100%;
    }

    .imt-catalog-hero__searchbtn {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px;
    }

    .imt-catalog-hero__search-input {
        height: 44px;
        min-height: 44px;
        font-size: 0.9375rem;
    }

    .imt-catalog__body {
        padding-left: 12px;
        padding-right: 12px;
    }

    .imt-catalog__toolbar {
        padding: 12px 14px;
    }

    .imt-catalog__toolbar-hint {
        max-width: 58%;
        line-height: 1.35;
        text-align: inherit;
    }

    html[dir="rtl"] .imt-catalog__toolbar-hint,
    body.rtl .imt-catalog__toolbar-hint {
        text-align: end;
    }

    .imt-catalog-hero__searchpill--compact {
        min-height: 46px;
    }

    .imt-catalog-hero__searchpill--compact .imt-catalog-hero__searchbtn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px;
    }

    .imt-catalog-hero__searchpill--compact .imt-catalog-hero__search-input {
        height: 36px;
        min-height: 36px;
    }

    .imt-product-card--market .imt-product-card__visual {
        height: 150px;
    }

    .imt-product-card--market .imt-product-card__body {
        padding: 11px 12px 13px;
    }

    .imt-product-card--market .imt-product-card__title {
        font-size: 0.86rem;
    }

    .imt-product-card--market .imt-product-card__meta {
        font-size: 0.73rem;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        line-clamp: 2;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    .imt-product-card--market .imt-product-card__cart {
        padding: 9px 8px !important;
        font-size: 0.78rem !important;
        border-radius: 12px !important;
        gap: 5px !important;
    }

    .imt-product-card--market .imt-product-card__peek {
        flex: 0 0 42px;
        width: 42px;
        min-height: 42px;
        border-radius: 12px !important;
    }

    .imt-catalog-pagination .custom-pagination li a,
    .imt-catalog-pagination .custom-pagination li span {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

.imt-catalog-chrome-input {
    border-radius: 12px;
    border-color: rgba(15, 32, 68, 0.12) !important;
}

.imt-catalog-filters__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.imt-catalog-filters__segment + .imt-catalog-filters__segment {
    margin-top: 17px;
}

.imt-catalog-filters__label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.imt-range-dual {
    position: relative;
    height: 40px;
}

.imt-range-dual .imt-range {
    position: absolute;
    inset: 0;
    width: 100%;
}

.imt-catalog__fab-filter {
    position: fixed;
    bottom: 94px;
    inset-inline-end: 18px;
    z-index: 1000;
    width: 54px;
    height: 54px;
}

@media (hover: hover) {
    body.premium-inner-site .navbar--premium-inner .navbar-nav .nav-link:not(.btn),
    body.premium-inner-site .navbar--premium-inner .menu-category > ul > li > a {
        transition: color 0.2s ease, transform 0.2s ease;
    }

    body.premium-inner-site .navbar--premium-inner .navbar-nav .nav-link:not(.btn):hover,
    body.premium-inner-site .navbar--premium-inner .menu-category > ul > li > a:hover {
        color: var(--imt-brand-blue, #2563eb) !important;
        transform: translateY(-2px);
    }

    body.premium-inner-site footer .footer-premium-visual__link:hover {
        color: #93c5fd !important;
    }
}

/* --- Premium marketplace product cards (compact 190px hero, anchored footer CTAs) --- */
.imt-product-card--market .imt-product-card__shell {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 22px;
    background: linear-gradient(178deg, rgba(255, 255, 255, 0.94) 0%, #ffffff 52%);
    border: 1px solid rgba(15, 32, 68, 0.086);
    box-shadow:
        0 16px 42px rgba(15, 32, 68, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    backdrop-filter: saturate(180%) blur(9px);
    -webkit-backdrop-filter: saturate(180%) blur(9px);
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.26s ease, border-color 0.26s ease;
}

@media (hover: hover) {
    .imt-product-card--market:hover .imt-product-card__shell {
        transform: translateY(-8px);
        box-shadow:
            0 24px 54px rgba(15, 32, 68, 0.12),
            inset 0 1px 0 rgba(255, 255, 255, 0.95);
        border-color: rgba(37, 99, 235, 0.18);
    }

    .imt-product-card--market:hover .imt-product-card__thumb {
        transform: scale(1.04);
    }
}

.imt-product-card--market .imt-product-card__visual {
    position: relative;
    height: 190px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 0;
    background: transparent;
}

.imt-product-card--market .imt-product-card__visual-sheet {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 90% at 50% 120%, rgba(37, 99, 235, 0.088), transparent 58%),
        linear-gradient(180deg, rgba(236, 242, 255, 0.48) 0%, rgba(250, 252, 255, 0.15) 100%);
}

.imt-product-card--market .imt-product-card__thumb-link {
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: 0;
    background: transparent;
}

.imt-product-card--market .imt-product-card__thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.imt-product-card--market .imt-product-card__fav {
    position: absolute;
    inset-inline-end: 12px;
    inset-block-start: 12px;
    z-index: 4;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.88);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: rgba(15, 32, 68, 0.52);
    box-shadow: 0 12px 30px rgba(15, 32, 68, 0.1);
    cursor: pointer;
    transition: transform 0.22s ease, color 0.22s ease, box-shadow 0.22s ease;
}

.imt-product-card--market .imt-product-card__fav:focus {
    outline: none;
}

.imt-product-card--market .imt-product-card__fav:focus-visible {
    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.45),
        0 12px 30px rgba(15, 32, 68, 0.1);
}

.imt-product-card--market .imt-product-card__fav.is-active {
    color: var(--imt-montessori-red, #ef4444);
}

@media (hover: hover) {
    .imt-product-card--market .imt-product-card__fav:hover {
        transform: scale(1.06);
        color: rgba(239, 68, 68, 0.95);
    }
}

.imt-product-card--market .imt-badge {
    position: absolute;
    inset-inline-start: 12px;
    inset-inline-end: auto;
    inset-block-start: 12px;
    z-index: 3;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.7175rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.02em;
    box-shadow: 0 14px 32px rgba(15, 32, 68, 0.15);
}

.imt-badge--new {
    background: linear-gradient(120deg, #5786c7, #3d6eaf);
}

.imt-badge--bestseller {
    background: linear-gradient(120deg, #059669, #10b981);
}

.imt-badge--recommended {
    background: linear-gradient(120deg, #f59e0b, #f97316);
}

.imt-product-card--market .imt-product-card__oos {
    position: absolute;
    inset-inline-start: 12px;
    inset-block-start: 12px;
    z-index: 5;
    padding: 6px 13px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.9);
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.7425rem;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(15, 32, 68, 0.18);
}

.imt-product-card--market .imt-product-card__cat-chip {
    position: absolute;
    inset-inline-start: 10px;
    bottom: 10px;
    z-index: 3;
    max-width: calc(100% - 58px);
    padding: 5px 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border-radius: 999px;
    font-size: 0.7175rem;
    font-weight: 800;
    letter-spacing: 0.015em;
    color: rgba(17, 40, 64, 0.9);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.86);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 32px rgba(15, 32, 68, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
    .imt-product-card--market .imt-product-card__cat-chip:hover {
        color: var(--imt-catalog-accent, var(--imt-brand-blue, #2563eb));
        border-color: rgba(37, 99, 235, 0.25);
    }
}

.imt-product-card--market .imt-product-card__body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    padding: 13px 16px 15px;
}

.imt-product-card--market .imt-product-card__title {
    margin: 0 0 6px;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.36;
    color: #13263d;
    text-decoration: none;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.22s ease;
}

@media (hover: hover) {
    .imt-product-card--market .imt-product-card__title:hover {
        color: var(--imt-catalog-accent, var(--imt-brand-blue, #2563eb));
    }
}

.imt-product-card--market .imt-product-card__meta {
    margin: 0 0 8px;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgba(15, 32, 68, 0.56);
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.imt-product-card--market .imt-product-card__rate-row {
    margin-top: 2px;
    margin-bottom: 8px;
}

.imt-product-card--market .imt-product-card__rate .stars-card svg {
    width: 13px !important;
    height: 13px !important;
}

.imt-product-card--market .imt-product-card__rate .stars-card.feather-icons i,
.imt-product-card--market .imt-product-card__rate .stars-card i {
    width: 13px;
    height: 13px;
}

.imt-product-card--market .imt-product-card__footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding-top: 4px;
}

.imt-product-card--market .imt-product-card__pricing {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 10px;
}

.imt-price {
    font-weight: 800;
    color: var(--imt-brand-blue, #2563eb);
    font-size: 1.06rem;
}

.imt-price--lg {
    font-size: 1.1375rem;
}

.imt-price-off {
    color: #8591a3;
    font-size: 0.875rem;
    text-decoration: line-through;
}

.imt-price--points {
    color: #b45309;
}

.imt-product-card--market .imt-product-card__actions-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 10px;
}

.imt-product-card--market .imt-product-card__cart {
    flex: 1 1 65%;
    min-width: 0;
    padding: 11px 12px !important;
    margin: 0;
    border: none !important;
    border-radius: 14px !important;
    font-size: 0.845rem !important;
    font-weight: 800 !important;
    line-height: 1.25 !important;
    letter-spacing: 0.015em;
    white-space: normal;
    text-align: center;
    color: #fff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    cursor: pointer;
    background-image: linear-gradient(128deg, #1d4ed8 0%, #2563eb 42%, #38bdf8 100%) !important;
    box-shadow: 0 13px 32px rgba(37, 99, 235, 0.3);
    transition: transform 0.22s ease, box-shadow 0.22s ease, filter 0.22s ease;
}

@media (hover: hover) {
    .imt-product-card--market .imt-product-card__cart:hover {
        transform: translateY(-1px);
        filter: brightness(1.05);
        box-shadow: 0 16px 40px rgba(37, 99, 235, 0.36);
        color: #fff !important;
    }
}

.imt-product-card--market .imt-product-card__peek {
    flex: 0 0 48px;
    width: 48px;
    min-height: 48px;
    margin: 0;
    padding: 0 !important;
    border-radius: 14px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 1px solid rgba(37, 99, 235, 0.2) !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: var(--imt-catalog-accent, var(--imt-brand-blue, #2563eb)) !important;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(37, 99, 235, 0.1);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.imt-product-card--market .imt-product-card__peek:focus {
    outline: none;
}

.imt-product-card--market .imt-product-card__peek:focus-visible {
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.42);
}

.imt-product-card--market .imt-product-card__peek--stretch {
    flex: 1 1 auto;
    width: auto;
}

.imt-product-card--market .imt-product-card__peek--reward {
    flex: 1 1 auto;
    width: 100%;
    min-height: 48px;
    padding: 10px 16px !important;
    gap: 8px !important;
    font-weight: 700 !important;
}

.imt-product-card--market .imt-product-card__peek-label {
    font-size: 0.83rem;
    font-weight: 700;
}

@media (hover: hover) {
    .imt-product-card--market .imt-product-card__peek:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, 0.38) !important;
        box-shadow: 0 12px 30px rgba(37, 99, 235, 0.16);
    }
}

.imt-mini-pill {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.18);
    padding: 5px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
}

.imt-mini-icon {
    border: 0;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.88);
}

.imt-mini-icon.is-active {
    color: var(--imt-montessori-red, #ef4444);
}

.imt-product-card__actions-overlay {
    display: none !important;
}

.imt-reveal-card {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.imt-reveal-card.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

.mb-24 {
    margin-bottom: 24px;
}

.imt-catalog-trust .imt-trust-pill {
    background: #fff;
    border-radius: var(--imt-radius-md);
    padding: 11px 12px;
    border: 1px solid rgba(15, 32, 68, 0.08);
    font-weight: 600;
    box-shadow: var(--imt-shadow-soft);
}

.imt-catalog-trust--compact {
    margin-top: 8px;
    margin-bottom: 0;
    padding-top: clamp(14px, 2.8vw, 22px);
    /* Breathing room before global footer (white band above navy block) */
    padding-bottom: clamp(12px, 2.6vw, 20px);
}

@media (min-width: 992px) {
    .imt-catalog-trust--compact {
        padding-top: clamp(16px, 2.4vw, 26px);
        padding-bottom: clamp(14px, 2.2vw, 22px);
    }
}

.imt-catalog-cross-nav--compact {
    margin-top: clamp(10px, 2.2vw, 14px);
    margin-bottom: 0;
}

.imt-catalog-cross-nav--compact .imt-catalog-cross-nav__kicker {
    margin-bottom: 6px;
    margin-top: 0;
}

@media (min-width: 992px) {
    .imt-catalog-cross-nav--compact .imt-catalog-cross-nav__kicker {
        margin-bottom: 8px;
    }
}

@media (max-width: 767px) {
    .imt-catalog-trust--compact .row > [class*="col-"].mb-15 {
        margin-bottom: 11px !important;
    }
}

.imt-catalog-trust .imt-catalog-single-page-note {
    margin-top: 8px;
    padding-top: 2px;
}

.imt-catalog .imt-catalog-product-row .mb-24 {
    margin-bottom: 17px;
}

@media (max-width: 767px) {
    .imt-catalog .imt-catalog-product-row .mb-24 {
        margin-bottom: 14px !important;
    }
}

.imt-catalog-cross-nav__strip {
    gap: 10px 12px;
    max-width: 920px;
    margin-inline: auto;
    margin-bottom: 4px;
}

.imt-catalog-cross-nav__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    min-width: min(100%, 200px);
    max-width: 320px;
    padding: 10px 15px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.875rem;
    line-height: 1.35;
    color: var(--imt-catalog-accent, #2563eb);
    border: 1px solid rgba(37, 99, 235, 0.35);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 28px rgba(15, 32, 68, 0.07);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

@media (hover: hover) {
    .imt-catalog-cross-nav__btn:hover {
        transform: translateY(-2px);
        border-color: rgba(37, 99, 235, 0.55);
        box-shadow: 0 14px 36px rgba(37, 99, 235, 0.18);
        color: var(--imt-catalog-accent, #2563eb);
    }
}

.imt-quick-modal {
    border-radius: var(--imt-radius-lg);
    border: none;
    overflow: hidden;
}

.imt-quick-cover {
    max-height: 360px;
}

/* PDP */
.imt-pdp .imt-pdp-buy-card,
.imt-pdp .product-show-image-card,
.imt-pdp .product-show__nav-tabs {
    border-radius: var(--imt-radius-lg) !important;
    box-shadow: var(--imt-sheet-shadow) !important;
    border: 1px solid rgba(15, 32, 68, 0.08) !important;
}

.imt-pdp .product-show-info-card {
    background: var(--imt-glass) !important;
    backdrop-filter: blur(16px);
}

.imt-related-card .imt-product-card--market .imt-product-card__shell {
    height: 100%;
}

.imt-pdp-fav {
    border: 1px solid rgba(15, 32, 68, 0.12);
}

.imt-pdp-fav.is-active {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.06);
}

.z-index-2 {
    z-index: 2;
}

/* Storefront & product PDP: من دون هوامش زائدة تحت المحتوى + فراغ ضئيل (~6px) قبل الفوتر */
body.premium-inner-site .premium-inner-main:has(.imt-catalog),
body.premium-inner-site .premium-inner-main:has(.imt-pdp) {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

body.premium-inner-site .premium-inner-main:has(.imt-pdp) > div.container {
    margin-bottom: 0 !important;
}

body.premium-inner-site .premium-inner-main:has(.imt-pdp) > div.row {
    margin-bottom: 0 !important;
}

body.premium-inner-site main.premium-inner-main:has(.imt-catalog) + footer.footer-premium-visual,
body.premium-inner-site main.premium-inner-main:has(.imt-pdp) + footer.footer-premium-visual {
    margin-top: 0.375rem !important;
}
