/* =========================================================
   PRODUCT SHOWCASE  (صفحه محصولات - نسخه‌ی نیم‌رخ ⟶ روبه‌رو)
   ---------------------------------------------------------
   - کاملاً مستقل از AllProducts.css (کلاس‌ها با پیشوند apx-)
   - فقط از متغیرهای --fk-* تم سایت استفاده می‌کند
   - حالت فعال (نمای روبه‌رو) با این‌ها روشن می‌شود:
       ماوس (hover) | فوکوس کیبورد | کلاس is-front (اسکرول موبایل) | is-pinned (دکمه‌ی چرخش)
   ========================================================= */

.apx-page {
    --apx-ease: cubic-bezier(.22, .9, .24, 1);
    --apx-spring: cubic-bezier(.3, 1.28, .5, 1);
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-top: 116px;
    box-sizing: border-box;
    background: var(--fk-bg);
    direction: rtl;
    overflow-x: clip;
}

    /* نور محیطی پشت صفحه */
    .apx-page::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 720px;
        pointer-events: none;
        background: radial-gradient(ellipse 46% 60% at 82% 0%, rgba(201, 168, 76, .10), transparent 70%), radial-gradient(ellipse 50% 70% at 12% 8%, rgba(255, 236, 205, .06), transparent 70%);
    }

@media (max-width: 960px) {
    .apx-page {
        padding-top: 88px;
    }
}

.apx-wrap {
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

/* ───────── هدر ───────── */
.apx-header {
    position: relative;
    padding: 28px 0 8px;
    text-align: right;
}

.apx-title {
    margin: 0 0 16px;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.5;
    color: var(--fk-text-main);
}

.apx-header-line {
    display: flex;
    align-items: center;
    flex-direction: row-reverse;
}

.apx-header-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fk-gold);
    box-shadow: 0 0 0 6px rgba(201, 168, 76, .16);
    flex-shrink: 0;
}

.apx-header-bar {
    height: 2px;
    width: 450px;
    max-width: 60%;
    background: linear-gradient(to left, var(--fk-gold), transparent);
    opacity: .45;
}

.apx-hint {
    margin: 16px 0 0;
    font-size: .9rem;
    line-height: 1.9;
    color: var(--fk-text-muted);
}

.apx-hint-touch {
    display: none;
}

@media (hover: none) {
    .apx-hint-hover {
        display: none;
    }

    .apx-hint-touch {
        display: inline;
    }
}

@media (max-width: 900px) {
    .apx-header {
        text-align: center;
        padding: 20px 0 4px;
    }

    .apx-header-line {
        justify-content: center;
    }
}

/* ───────── فیلتر برند ───────── */
.apx-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 6px;
}

@media (max-width: 900px) {
    .apx-filters {
        justify-content: center;
    }
}

.apx-filter {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 20px;
    font: inherit;
    font-size: .92rem;
    font-weight: 600;
    color: var(--fk-text-soft);
    cursor: pointer;
    border-radius: 999px;
    border: 1px solid rgba(var(--fk-white-rgb), .14);
    background: rgba(var(--fk-white-rgb), .05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background-color .3s ease, border-color .3s ease, color .3s ease, transform .3s var(--apx-ease);
    /* liquid glass */
    background: var(--fk-glass-ctrl-bg);
    -webkit-backdrop-filter: var(--fk-glass-ctrl-filter);
    backdrop-filter: var(--fk-glass-ctrl-filter);
    border-color: var(--fk-glass-border);
    box-shadow: var(--fk-glass-ctrl-shadow);
}

    .apx-filter:hover {
        background: var(--fk-hover);
        transform: translateY(-2px);
    }

    .apx-filter:focus-visible {
        outline: 2px solid var(--fk-gold);
        outline-offset: 3px;
    }

    .apx-filter.is-active {
        color: #10161c;
        background: var(--fk-text-main);
        border-color: var(--fk-text-main);
    }

.apx-filter-count {
    min-width: 22px;
    padding: 1px 7px;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1.6;
    text-align: center;
    border-radius: 999px;
    background: rgba(var(--fk-white-rgb), .12);
}

.apx-filter.is-active .apx-filter-count {
    background: rgba(16, 22, 28, .12);
}

/* ───────── شبکه ───────── */
.apx-grid-section {
    position: relative;
    padding: 22px 0 28px;
}

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

@media (max-width: 1040px) {
    .apx-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

@media (max-width: 620px) {
    .apx-wrap {
        padding: 0 16px;
    }

    .apx-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }
}

/* ───────── کارت ───────── */
.apx-card {
    --tint: 140, 185, 255; /* نیسان: سفید-آبی */
    position: relative;
    display: flex;
    flex-direction: column;
    container-type: inline-size;
    border-radius: 22px;
    overflow: hidden;
    isolation: isolate;
    text-decoration: none;
    color: var(--fk-text-main) !important;
    background: linear-gradient(180deg, rgba(var(--fk-white-rgb), .07) 0%, rgba(var(--fk-white-rgb), .02) 100%), var(--fk-surface);
    border: 1px solid rgba(var(--fk-white-rgb), .10);
    box-shadow: 0 14px 36px rgba(var(--fk-shadow-rgb), .35);
    /*transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform .45s var(--apx-ease), box-shadow .5s ease, border-color .5s ease;*/
    transition: box-shadow .5s ease, border-color .5s ease;
    -webkit-tap-highlight-color: transparent;
    /* liquid glass */
    background: var(--fk-glass-card-bg);
    -webkit-backdrop-filter: var(--fk-glass-card-filter);
    backdrop-filter: var(--fk-glass-card-filter);
    border-color: var(--fk-glass-border);
    box-shadow: var(--fk-glass-card-shadow);
}

    .apx-card[data-brand="toyota"] {
        --tint: 255, 84, 92; /* تویوتا: قرمز گرم */
    }

    .apx-card:focus-visible {
        outline: 2px solid var(--fk-gold);
        outline-offset: 3px;
    }

    /* درخشش دنبال‌کننده‌ی نشانگر + جاروی نور */
    .apx-card::before,
    .apx-card::after {
        content: "";
        position: absolute;
        inset: 0;
        pointer-events: none;
        z-index: 5;
    }

    /*.apx-card::before {
        background: radial-gradient(circle 260px at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, .13), transparent 70%);
        opacity: 0;
        transition: opacity .5s ease;
    }*/

    .apx-card::before {
        background: radial-gradient(ellipse 70% 60% at 50% 58%, rgba(255, 255, 255, .13), transparent 70%);
        opacity: 0;
        transition: opacity .5s ease;
    }

    .apx-card::after {
        background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .11) 50%, transparent 60%);
        transform: translateX(130%);
    }

/* ───────── ورود کارت هنگام دیده‌شدن (فقط وقتی JS فعال است) ───────── */
.apx-js .apx-card:not(.is-in) {
    opacity: 0;
}

.apx-card.is-in {
    animation: apx-rise .85s var(--apx-ease) var(--d, 0ms) backwards;
}

.apx-card.is-in .apx-car-side {
    animation: apx-drive-in 1.05s var(--apx-ease) calc(var(--d, 0ms) + 140ms) backwards;
}

.apx-card.is-in .apx-shadow {
    animation: apx-fade-in .9s ease calc(var(--d, 0ms) + 200ms) backwards;
}

@keyframes apx-rise {
    from {
        opacity: 0;
        translate: 0 36px;
        scale: .965;
    }

    to {
        opacity: 1;
        translate: 0 0;
        scale: 1;
    }
}

@keyframes apx-drive-in {
    from {
        opacity: 0;
        transform: translateX(-16%);
        filter: blur(4px);
    }

    60% {
        filter: blur(0);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes apx-fade-in {
    from {
        opacity: 0;
    }
}

/* ───────── صحنه ───────── */
.apx-stage {
    --ground: 17%;
    position: relative;
    aspect-ratio: 16 / 10.5;
    overflow: hidden;
}

/* نور نقطه‌ای پشت خودرو */
/*.apx-spot {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 62% 56% at 50% 64%, rgba(var(--tint), .24), transparent 72%);
    opacity: .75;
    transform: translate(calc(var(--px, 0) * -12px), calc(var(--py, 0) * -6px));
    transition: opacity .6s ease, transform .6s var(--apx-ease);
}*/

.apx-spot {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 62% 56% at 50% 64%, rgba(var(--tint), .24), transparent 72%);
    opacity: .75;
    transition: opacity .6s ease;
}

/* نوشته‌ی آب‌نشان برند */
.apx-watermark {
    position: absolute;
    top: 8%;
    left: 0;
    right: 0;
    text-align: center;
    direction: ltr;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-size: 3.2rem;
    font-size: clamp(2.2rem, 19cqw, 6.6rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: .08em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(var(--fk-white-rgb), .10);
    user-select: none;
    /*transform: translateX(calc(var(--px, 0) * 14px));*/
    /*transition: letter-spacing .9s var(--apx-ease), -webkit-text-stroke-color .6s ease, opacity .6s ease, transform .6s var(--apx-ease);*/
    transition: letter-spacing .9s var(--apx-ease), -webkit-text-stroke-color .6s ease, opacity .6s ease;
}

/* کف سالن + خط‌چین جاده */
.apx-road {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--ground) + 7%);
    border-top: 1px solid rgba(var(--fk-white-rgb), .09);
    background: linear-gradient(180deg, rgba(var(--fk-white-rgb), .055), rgba(var(--fk-white-rgb), .01) 55%, transparent);
    -webkit-mask-image: radial-gradient(ellipse 90% 100% at 50% 0%, #000 55%, transparent 100%);
    mask-image: radial-gradient(ellipse 90% 100% at 50% 0%, #000 55%, transparent 100%);
}

    .apx-road::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 26%;
        height: 2px;
        background: repeating-linear-gradient(90deg, rgba(var(--fk-white-rgb), .32) 0 42px, transparent 42px 104px);
        opacity: 0;
        transition: opacity .5s ease;
    }

/* سایه‌ی زیر خودرو */
.apx-shadow {
    position: absolute;
    left: 50%;
    bottom: calc(var(--ground) - 3.2%);
    width: 84%;
    height: 7.5%;
    translate: -50% 0;
    background: radial-gradient(ellipse 50% 50% at 50% 50%, rgba(0, 0, 0, .62), rgba(0, 0, 0, .25) 55%, transparent 78%);
    transform-origin: 50% 50%;
    transition: transform .7s var(--apx-ease), opacity .5s ease;
}

/* پخش نور چراغ‌ها روی زمین (وقتی روبه‌رو می‌شود) */
.apx-flare {
    position: absolute;
    left: 50%;
    bottom: calc(var(--ground) - 5%);
    width: 78%;
    height: 46%;
    translate: -50% 0;
    background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(255, 246, 222, .55), rgba(255, 246, 222, .13) 46%, transparent 72%);
    filter: blur(8px);
    opacity: 0;
    transform: scaleY(.35) scaleX(.7);
    transform-origin: 50% 100%;
    transition: opacity .4s ease, transform .5s ease;
}

/* ───────── خودروها ───────── */
.apx-cars {
    position: absolute;
    inset: 0;
    transform: translate(calc(var(--px, 0) * 10px), calc(var(--py, 0) * 3px));
    transition: transform .55s var(--apx-ease);
}

.apx-car {
    position: absolute;
    left: 50%;
    bottom: var(--ground);
    translate: -50% 0;
    height: auto;
    max-width: none;
    transform-origin: 50% 100%; /* لولا روی زمین، پس هیچ «پریدنی» در کار نیست */
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* ───────── ارتفاع یکسان دو نما ─────────
   نمای ۴۵ درجه در عکس‌ها بلندتر از نیم‌رخ است. JS نسبت ارتفاع/عرض هر تصویر را در
   --rs (نیم‌رخ) و --rf (روبه‌رو) می‌گذارد تا ارتفاع واقعیِ خودرو در هر دو نما یکسان شود
   و هنگام تغییر نما اندازه نپرد. (--fk-k: ضریب نزدیک‌تر بودن دوربین در نمای روبه‌رو) */
.apx-cars {
    --rs: .33;
    --rf: .45;
    --fk-k: 1.04;
    --orbit: 22deg;
    --orbit-dur: 1s;
    --orbit-ease: cubic-bezier(.45, .05, .2, 1);
}

.apx-car {
    will-change: transform, opacity;
    backface-visibility: hidden;
}

/* دوربین دور خودرو می‌چرخد: هر دو نما دور یک لولای مشترک (وسط خودرو، روی زمین) می‌چرخند
   و محو شدن‌ها روی هم می‌افتند، پس چیزی نمی‌پرد. */
.apx-car-side {
    width: 84%;
    opacity: 1;
    transform: perspective(1400px) rotateY(0deg) scaleX(1);
    transition: transform var(--orbit-dur) var(--orbit-ease), opacity .5s ease .22s, filter .6s ease;
}

.apx-car-front {
    width: calc(84% * var(--rs) / var(--rf) * var(--fk-k));
    opacity: 0;
    transform: perspective(1400px) rotateY(calc(var(--orbit) * -1)) scaleX(1.07);
    filter: blur(1.5px);
    transition: transform var(--orbit-dur) var(--orbit-ease), opacity .45s ease 0s, filter .6s ease;
}

/* حالت چرخیده */
.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-car-side {
    opacity: 0;
    transform: perspective(1400px) rotateY(var(--orbit)) scaleX(.93);
    filter: blur(1.5px);
    transition: transform var(--orbit-dur) var(--orbit-ease), opacity .5s ease .1s, filter .6s ease;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-car-front {
    opacity: 1;
    transform: perspective(1400px) rotateY(0deg) scaleX(1);
    filter: none;
    transition: transform var(--orbit-dur) var(--orbit-ease), opacity .5s ease .22s, filter .6s ease .1s;
}

@media (hover: hover) and (pointer: fine) {
    .apx-card:hover .apx-car-side {
        opacity: 0;
        transform: perspective(1400px) rotateY(var(--orbit)) scaleX(.93);
        filter: blur(1.5px);
        transition: transform var(--orbit-dur) var(--orbit-ease), opacity .5s ease .1s, filter .6s ease;
    }

    .apx-card:hover .apx-car-front {
        opacity: 1;
        transform: perspective(1400px) rotateY(0deg) scaleX(1);
        filter: none;
        transition: transform var(--orbit-dur) var(--orbit-ease), opacity .5s ease .22s, filter .6s ease .1s;
    }
}

/* حالت عکس تکی (برای خودرویی که هنوز نیم‌رخ/روبه‌رو ندارد) */
.apx-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.1s var(--apx-ease), filter .6s ease;
}

.apx-card-photo .apx-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(var(--fk-bg-rgb), .75), transparent 55%);
}

/* برچسب‌ها */
.apx-tag {
    position: absolute;
    top: 14px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    font-size: .74rem;
    font-weight: 600;
    line-height: 1.7;
    color: var(--fk-text-soft);
    border-radius: 999px;
    border: 1px solid rgba(var(--fk-white-rgb), .14);
    background: rgba(var(--fk-bg-rgb), .45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* liquid glass */
    background: var(--fk-glass-ctrl-bg);
    -webkit-backdrop-filter: var(--fk-glass-ctrl-filter);
    backdrop-filter: var(--fk-glass-ctrl-filter);
    border-color: var(--fk-glass-border);
    box-shadow: var(--fk-glass-ctrl-shadow);
}

.apx-tag-brand {
    right: 14px;
}

    .apx-tag-brand::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: rgb(var(--tint));
        box-shadow: 0 0 10px rgba(var(--tint), .9);
    }

.apx-tag-type {
    left: 14px;
}

/* دکمه‌ی چرخش (فقط لمسی) */
.apx-turn {
    position: absolute;
    left: 14px;
    bottom: 12px;
    z-index: 6;
    display: none;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    font-size: .76rem;
    font-weight: 600;
    color: var(--fk-text-main);
    border-radius: 999px;
    border: 1px solid rgba(var(--fk-white-rgb), .22);
    background: rgba(var(--fk-bg-rgb), .6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* liquid glass */
    background: var(--fk-glass-ctrl-bg);
    -webkit-backdrop-filter: var(--fk-glass-ctrl-filter);
    backdrop-filter: var(--fk-glass-ctrl-filter);
    border-color: var(--fk-glass-border);
    box-shadow: var(--fk-glass-ctrl-shadow);
}

    .apx-turn svg {
        transition: transform .6s var(--apx-ease);
    }

.apx-card.is-pinned .apx-turn svg {
    transform: rotate(180deg);
}

.apx-card.is-pinned .apx-turn {
    border-color: var(--fk-gold);
}

@media (hover: none) {
    .apx-turn {
        display: inline-flex;
    }
}

/* ───────── پایین کارت ───────── */
.apx-info {
    position: relative;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 88px;
    box-sizing: border-box;
    padding: 14px 20px 16px;
    border-top: 1px solid rgba(var(--fk-white-rgb), .07);
    background: linear-gradient(180deg, rgba(var(--fk-bg-rgb), .0), rgba(var(--fk-bg-rgb), .35));
}

.apx-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.6;
    color: var(--fk-text-main);
}

    .apx-name::after {
        content: "";
        display: block;
        width: 26px;
        height: 2px;
        margin-top: 8px;
        border-radius: 2px;
        background: var(--fk-gold);
        transition: width .55s var(--apx-ease);
    }

.apx-cta {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 6px;
    font-size: .82rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 999px;
    border: 1px solid rgba(var(--fk-white-rgb), .18);
    background: rgba(var(--fk-white-rgb), .08);
    transition: padding .5s var(--apx-ease), background-color .35s ease, border-color .35s ease, color .35s ease;
}

/* نوشته‌ی دکمه فقط وقتی کارت فعال می‌شود باز می‌شود */
.apx-cta-label {
    max-width: 0;
    margin-inline-end: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-width .55s var(--apx-ease), margin .55s var(--apx-ease), opacity .3s ease;
}

.apx-cta-icon {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(var(--fk-white-rgb), .14);
    transition: transform .45s var(--apx-ease), background-color .35s ease, color .35s ease;
}

.apx-note {
    margin: 6px 0 0;
    padding: 0 0 72px;
    font-size: .78rem;
    line-height: 1.9;
    text-align: center;
    color: var(--fk-text-muted);
    opacity: .85;
}

/* =========================================================
   حالت فعال: «نیم‌رخ ⟶ روبه‌رو»
   (این بلاک دو بار تولید می‌شود: یک‌بار برای hover ماوس، یک‌بار برای کلاس‌ها/فوکوس)
   ========================================================= */
/* — فعال‌شدن با کلاس‌ها (اسکرول موبایل / دکمه‌ی چرخش) و فوکوس کیبورد — */
.apx-card:is(.is-front, .is-pinned, :focus-visible) {
    border-color: rgba(var(--tint), .5);
    box-shadow: 0 28px 60px rgba(var(--fk-shadow-rgb), .55), 0 0 0 1px rgba(var(--tint), .2), 0 0 46px rgba(var(--tint), .16);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible)::before {
    opacity: 1;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible)::after {
    transform: translateX(-130%);
    transition: transform 1.1s var(--apx-ease);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-spot {
    opacity: 1;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-watermark {
    letter-spacing: .16em;
    -webkit-text-stroke-color: rgba(201, 168, 76, .34);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-road::after {
    opacity: .9;
    animation: apx-road .7s linear infinite;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-shadow {
    transform: scaleX(.64);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-flare {
    opacity: 1;
    transform: scaleY(1) scaleX(1);
    transition: opacity .6s ease .35s, transform .9s var(--apx-ease) .3s;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-photo {
    transform: scale(1.07);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-name::after {
    width: 62px;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-cta {
    padding-inline-start: 16px;
    color: #10161c;
    background: var(--fk-text-main);
    border-color: var(--fk-text-main);
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-cta-label {
    max-width: 120px;
    margin-inline-end: 10px;
    opacity: 1;
}

.apx-card:is(.is-front, .is-pinned, :focus-visible) .apx-cta-icon {
    transform: translateX(-4px);
    color: #10161c;
    background: var(--fk-gold);
}

/* — فعال‌شدن با ماوس (فقط دستگاه‌هایی که hover واقعی دارند) — */
@media (hover: hover) and (pointer: fine) {
    .apx-card:hover {
        border-color: rgba(var(--tint), .5);
        box-shadow: 0 28px 60px rgba(var(--fk-shadow-rgb), .55), 0 0 0 1px rgba(var(--tint), .2), 0 0 46px rgba(var(--tint), .16);
    }

    .apx-card:hover::before {
        opacity: 1;
    }

    .apx-card:hover::after {
        transform: translateX(-130%);
        transition: transform 1.1s var(--apx-ease);
    }

    .apx-card:hover .apx-spot {
        opacity: 1;
    }

    .apx-card:hover .apx-watermark {
        letter-spacing: .16em;
        -webkit-text-stroke-color: rgba(201, 168, 76, .34);
    }

    .apx-card:hover .apx-road::after {
        opacity: .9;
        animation: apx-road .7s linear infinite;
    }

    .apx-card:hover .apx-shadow {
        transform: scaleX(.64);
    }

    .apx-card:hover .apx-flare {
        opacity: 1;
        transform: scaleY(1) scaleX(1);
        transition: opacity .6s ease .35s, transform .9s var(--apx-ease) .3s;
    }

    .apx-card:hover .apx-photo {
        transform: scale(1.07);
    }

    .apx-card:hover .apx-name::after {
        width: 62px;
    }

    .apx-card:hover .apx-cta {
        padding-inline-start: 16px;
        color: #10161c;
        background: var(--fk-text-main);
        border-color: var(--fk-text-main);
    }

    .apx-card:hover .apx-cta-label {
        max-width: 120px;
        margin-inline-end: 10px;
        opacity: 1;
    }

    .apx-card:hover .apx-cta-icon {
        transform: translateX(-4px);
        color: #10161c;
        background: var(--fk-gold);
    }
}


@keyframes apx-road {
    to {
        background-position-x: -104px;
    }
}

/* =========================================================
   حرکت کمتر (دسترس‌پذیری)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
    .apx-card,
    .apx-card * {
        animation: none !important;
    }

    .apx-card {
        transform: none !important;
    }

    .apx-car-side,
    .apx-car-front {
        transform: none !important;
        filter: none !important;
        transition: opacity .25s ease !important;
    }

    .apx-card::after {
        display: none;
    }
}

/* =========================================================
   لودینگ صفحه‌ی محصولات
   تا وقتی .apx-page کلاس is-ready نگرفته، شبکه‌ی کارت‌ها دیده نمی‌شود
   (JS بعد از بارگذاری و دیکد همه‌ی تصاویر آن را اضافه می‌کند).
   اگر JS اجرا نشد، بعد از ۱۵ ثانیه خودکار همه‌چیز نمایش داده می‌شود.
   ========================================================= */
.apx-grid {
    transition: opacity .4s ease;
}

.apx-page:not(.is-ready) .apx-grid {
    opacity: 0;
    pointer-events: none;
    animation: apx-failsafe-show .01s linear 15s forwards;
}

.apx-loader {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: var(--fk-bg);
    transition: opacity .45s ease, visibility 0s linear .45s;
}

.apx-page:not(.is-ready) .apx-loader {
    animation: apx-failsafe-hide .01s linear 15s forwards;
}

.apx-page.is-ready .apx-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.apx-loader-box {
    position: sticky;
    top: 34vh;
    width: min(360px, 82vw);
    margin-top: 12vh;
    text-align: center;
    direction: rtl;
}

.apx-loader-track {
    position: relative;
    direction: ltr;
    height: 2px;
    margin: 44px 0 22px;
    border-radius: 2px;
    background: repeating-linear-gradient(90deg, rgba(var(--fk-white-rgb), .26) 0 18px, transparent 18px 34px);
    animation: apx-road .9s linear infinite;
}

.apx-loader-fill {
    position: absolute;
    left: 0;
    top: -1px;
    height: 4px;
    width: 0;
    border-radius: 4px;
    background: linear-gradient(90deg, transparent, var(--fk-gold));
    box-shadow: 0 0 14px rgba(201, 168, 76, .55);
    transition: width .45s var(--apx-ease);
}

.apx-loader-car {
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 92px;
    margin-left: -92px;
    line-height: 0;
    color: var(--fk-gold);
    transition: left .45s var(--apx-ease);
    animation: apx-car-bob .5s ease-in-out infinite alternate;
}

    .apx-loader-car svg {
        display: block;
        filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
    }

.apx-loader-text {
    font-size: .95rem;
    font-weight: 600;
    color: var(--fk-text-soft);
}

.apx-loader-num {
    margin-top: 6px;
    font-size: .8rem;
    letter-spacing: .04em;
    color: var(--fk-text-muted);
}

@keyframes apx-car-bob {
    from { transform: translateY(0); }
    to   { transform: translateY(-1.5px); }
}

@keyframes apx-failsafe-show {
    to { opacity: 1; pointer-events: auto; }
}

@keyframes apx-failsafe-hide {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}

@media (prefers-reduced-motion: reduce) {
    .apx-loader-track,
    .apx-loader-car {
        animation: none !important;
    }
}

.apx-lat {
    display: inline-block;
    direction: ltr;
    unicode-bidi: isolate;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    letter-spacing: .02em;
    font-variant-numeric: lining-nums;
}
