/* ==========================================================================
   Kaike Global — public site
   Brand palette from the company logo: red, near-black, white.
   Motion is opt-in per element via [data-reveal] and disabled entirely for
   visitors who ask for reduced motion.
   ========================================================================== */

:root {
    --kg-red: #e11b22;
    --kg-red-bright: #ff3a41;
    --kg-red-dark: #b0141a;
    --kg-red-soft: rgba(225, 27, 34, .08);
    --kg-ink: #0c0f13;
    --kg-ink-2: #14181d;
    --kg-ink-3: #232a33;
    --kg-body: #39424e;
    --kg-muted: #6b7480;
    --kg-line: #e6eaef;
    --kg-bg: #ffffff;
    --kg-bg-muted: #f5f7fa;

    --kg-shadow-sm: 0 1px 2px rgba(12, 15, 19, .05), 0 4px 12px rgba(12, 15, 19, .05);
    --kg-shadow-lg: 0 2px 6px rgba(12, 15, 19, .06), 0 24px 56px rgba(12, 15, 19, .13);
    --kg-shadow-red: 0 12px 32px rgba(225, 27, 34, .28);

    --kg-radius-sm: 10px;
    --kg-radius: 16px;
    --kg-radius-lg: 24px;

    --kg-ease: cubic-bezier(.16, 1, .3, 1);
    --kg-ease-out: cubic-bezier(.22, .61, .36, 1);

    --bs-primary: #e11b22;
    --bs-primary-rgb: 225, 27, 34;
    --bs-link-color: #b0141a;
    --bs-link-color-rgb: 176, 20, 26;
    --bs-link-hover-color: #8c0f14;
    --bs-body-color: #39424e;
    --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
        "Noto Sans", "Noto Naskh Arabic", "Segoe UI Historic", Tahoma,
        "Microsoft YaHei", "PingFang SC", "Noto Sans SC", Arial, sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--bs-body-font-family);
    color: var(--bs-body-color);
    background: var(--kg-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--kg-ink);
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.02em;
}

:where(html[lang="zh"], html[lang="ar"]) h1,
:where(html[lang="zh"], html[lang="ar"]) h2,
:where(html[lang="zh"], html[lang="ar"]) h3 {
    letter-spacing: 0;
    line-height: 1.3;
}

:where(html[lang="zh"], html[lang="ar"]) p,
:where(html[lang="zh"], html[lang="ar"]) li {
    line-height: 1.95;
}

a {
    text-decoration: none;
}

img {
    max-width: 100%;
}

.skip-link {
    position: absolute;
    inset-inline-start: -9999px;
    top: 0;
    z-index: 3000;
    background: var(--kg-ink);
    color: #fff;
    padding: .6rem 1rem;
}

.skip-link:focus {
    inset-inline-start: 0;
}

:focus-visible {
    outline: 3px solid var(--kg-red);
    outline-offset: 2px;
}

/* ==========================================================================
   1. Motion system
   ========================================================================== */

/* Cross-document page transitions where the browser supports them. */
@view-transition {
    navigation: auto;
}

/* --- scroll reveal ------------------------------------------------------ */
/* Everything below is scoped to html.js-motion, which an inline script in the
   layout adds before first paint. Without scripting the content simply shows. */

.js-motion [data-reveal] {
    opacity: 0;
    transition:
        opacity .8s var(--kg-ease),
        transform .8s var(--kg-ease),
        filter .8s var(--kg-ease);
    transition-delay: var(--reveal-delay, 0ms);
    will-change: opacity, transform;
}

.js-motion [data-reveal="up"],
.js-motion [data-reveal=""] {
    transform: translate3d(0, 34px, 0);
}

.js-motion [data-reveal="down"] {
    transform: translate3d(0, -28px, 0);
}

.js-motion [data-reveal="scale"] {
    transform: scale(.92);
}

.js-motion [data-reveal="blur"] {
    filter: blur(12px);
    transform: translate3d(0, 20px, 0);
}

/* Direction aware: slides in from the inline start edge. */
.js-motion [data-reveal="in"] {
    transform: translate3d(-40px, 0, 0);
}

.js-motion[dir="rtl"] [data-reveal="in"] {
    transform: translate3d(40px, 0, 0);
}

.js-motion [data-reveal="out"] {
    transform: translate3d(40px, 0, 0);
}

.js-motion[dir="rtl"] [data-reveal="out"] {
    transform: translate3d(-40px, 0, 0);
}

.js-motion [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
    filter: none;
    will-change: auto;
}

/* --- keyframes ---------------------------------------------------------- */

@keyframes kg-float-slow {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    50%      { transform: translate3d(3%, -5%, 0) scale(1.08); }
}

@keyframes kg-float-slower {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1.05); }
    50%      { transform: translate3d(-4%, 4%, 0) scale(.95); }
}

@keyframes kg-rise {
    from { opacity: 0; transform: translate3d(0, 26px, 0); }
    to   { opacity: 1; transform: none; }
}

@keyframes kg-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes kg-sweep {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}

@keyframes kg-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(8px); }
}

@keyframes kg-marquee {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(-50%, 0, 0); }
}

@keyframes kg-shimmer {
    from { background-position: 200% 50%; }
    to   { background-position: -60% 50%; }
}

@keyframes kg-zoom-slow {
    from { transform: scale(1); }
    to   { transform: scale(1.09); }
}

/* --- page enter choreography ------------------------------------------- */
/* Applied on product and category pages so opening one feels deliberate.  */

.page-enter > * {
    animation: kg-rise .75s var(--kg-ease) both;
}

.page-enter > *:nth-child(1) { animation-delay: .04s; }
.page-enter > *:nth-child(2) { animation-delay: .12s; }
.page-enter > *:nth-child(3) { animation-delay: .2s; }
.page-enter > *:nth-child(4) { animation-delay: .28s; }
.page-enter > *:nth-child(5) { animation-delay: .36s; }

/* --- scroll progress + back to top ------------------------------------- */

.scroll-progress {
    position: fixed;
    inset-block-start: 0;
    inset-inline-start: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: 0 50%;
    background: linear-gradient(90deg, var(--kg-red), var(--kg-red-bright));
    z-index: 2000;
    pointer-events: none;
}

html[dir="rtl"] .scroll-progress {
    transform-origin: 100% 50%;
}

.to-top {
    position: fixed;
    inset-block-end: 1.35rem;
    inset-inline-end: 1.35rem;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--kg-red);
    color: #fff;
    font-size: 1.1rem;
    box-shadow: var(--kg-shadow-red);
    opacity: 0;
    transform: translateY(14px) scale(.85);
    pointer-events: none;
    transition: opacity .35s var(--kg-ease), transform .35s var(--kg-ease);
    z-index: 1500;
}

.to-top.is-visible {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

.to-top:hover {
    background: var(--kg-red-dark);
    transform: translateY(-3px);
}

/* ==========================================================================
   2. Buttons
   ========================================================================== */

.btn {
    --bs-btn-font-weight: 700;
    --bs-btn-padding-x: 1.4rem;
    --bs-btn-border-radius: 10px;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: transform .3s var(--kg-ease), box-shadow .3s var(--kg-ease),
        background-color .25s ease, color .25s ease, border-color .25s ease;
}

.btn-primary {
    --bs-btn-bg: var(--kg-red);
    --bs-btn-border-color: var(--kg-red);
    --bs-btn-hover-bg: var(--kg-red-dark);
    --bs-btn-hover-border-color: var(--kg-red-dark);
    --bs-btn-active-bg: var(--kg-red-dark);
    --bs-btn-active-border-color: var(--kg-red-dark);
    --bs-btn-disabled-bg: #e8a0a3;
    --bs-btn-disabled-border-color: #e8a0a3;
    box-shadow: 0 6px 18px rgba(225, 27, 34, .22);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--kg-shadow-red);
}

.btn-outline-primary {
    --bs-btn-color: var(--kg-red-dark);
    --bs-btn-border-color: rgba(225, 27, 34, .45);
    --bs-btn-hover-bg: var(--kg-red);
    --bs-btn-hover-border-color: var(--kg-red);
    --bs-btn-active-bg: var(--kg-red-dark);
    --bs-btn-active-border-color: var(--kg-red-dark);
}

.btn-outline-primary:hover {
    transform: translateY(-2px);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

/* A light sheen that sweeps across primary buttons on hover. */
.btn-primary::after,
.btn-light::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, .32) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform .7s var(--kg-ease);
}

.btn-primary:hover::after,
.btn-light:hover::after {
    transform: translateX(120%);
}

.btn-lg {
    --bs-btn-padding-x: 1.7rem;
    --bs-btn-padding-y: .75rem;
    --bs-btn-font-size: 1.02rem;
}

/* ==========================================================================
   3. Top bar + header
   ========================================================================== */

.topbar {
    background: var(--kg-ink);
    color: rgba(255, 255, 255, .74);
    font-size: .82rem;
    padding: .5rem 0;
    position: relative;
    z-index: 1040;
}

/* Scoped to the contact links: a bare ".topbar a" would also colour the language
   dropdown items white, making them invisible against the white menu. */
.topbar-contact a {
    color: rgba(255, 255, 255, .74);
    transition: color .2s ease;
}

.topbar-contact a:hover {
    color: #fff;
}

.topbar-contact .bi {
    color: var(--kg-red-bright);
    margin-inline-end: .2rem;
}

.btn-language {
    --bs-btn-color: rgba(255, 255, 255, .88);
    --bs-btn-border-color: rgba(255, 255, 255, .22);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: rgba(255, 255, 255, .12);
    --bs-btn-hover-border-color: rgba(255, 255, 255, .4);
    --bs-btn-padding-y: .18rem;
    --bs-btn-border-radius: 7px;
    font-size: .82rem;
    box-shadow: none;
}

.btn-language:hover {
    transform: none;
}

/* --- language dropdown -------------------------------------------------- */
/* Selectors are anchored on ".topbar .dropdown-menu" rather than a marker class
   so the menu is styled correctly no matter which markup revision is served. */

.topbar .dropdown-menu,
.language-menu {
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius-sm);
    box-shadow: var(--kg-shadow-lg);
    padding: .4rem;
    min-width: 11.5rem;
    animation: kg-rise .28s var(--kg-ease) both;
}

.topbar .dropdown-item,
.language-menu .dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem .65rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: .92rem;
    color: var(--kg-ink-2);
    transition: background-color .2s ease, color .2s ease;
}

.topbar .dropdown-item:hover,
.topbar .dropdown-item:focus,
.language-menu .dropdown-item:hover,
.language-menu .dropdown-item:focus {
    background: var(--kg-red-soft);
    color: var(--kg-red-dark);
}

/* Bootstrap's default active colour is blue; keep the brand red instead. */
.topbar .dropdown-item.active,
.topbar .dropdown-item:active,
.language-menu .dropdown-item.active,
.language-menu .dropdown-item:active {
    background: var(--kg-red);
    color: #fff;
}

.lang-code,
.topbar .dropdown-item .small {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    color: var(--kg-muted);
    opacity: 1;
}

.topbar .dropdown-item:hover .lang-code,
.topbar .dropdown-item:focus .lang-code,
.topbar .dropdown-item:hover .small,
.language-menu .dropdown-item:hover .lang-code,
.language-menu .dropdown-item:focus .lang-code {
    color: var(--kg-red-dark);
}

.topbar .dropdown-item.active .lang-code,
.topbar .dropdown-item.active .small,
.language-menu .dropdown-item.active .lang-code,
.language-menu .dropdown-item:active .lang-code {
    color: rgba(255, 255, 255, .8);
}

.site-header {
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--kg-line);
    z-index: 1030;
    transition: box-shadow .35s var(--kg-ease), background-color .35s var(--kg-ease);
}

.site-header .navbar {
    padding-block: .8rem;
    transition: padding .35s var(--kg-ease);
}

/* Condensed state once the visitor scrolls. */
.site-header.is-stuck {
    box-shadow: 0 6px 28px rgba(12, 15, 19, .1);
    background: rgba(255, 255, 255, .96);
}

.site-header.is-stuck .navbar {
    padding-block: .4rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    transition: transform .35s var(--kg-ease);
}

.navbar-brand:hover {
    transform: scale(1.03);
}

.navbar-brand img {
    width: auto;
    max-height: 46px;
    transition: max-height .35s var(--kg-ease);
}

.site-header.is-stuck .navbar-brand img {
    max-height: 38px;
}

.site-header .nav-link {
    color: var(--kg-ink-2);
    font-weight: 650;
    font-size: .95rem;
    padding-inline: .9rem !important;
    position: relative;
    transition: color .25s ease;
}

.site-header .nav-link::after {
    content: "";
    position: absolute;
    inset-inline: .9rem;
    bottom: .35rem;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--kg-red), var(--kg-red-bright));
    transform: scaleX(0);
    transform-origin: var(--kg-origin, left) 50%;
    transition: transform .35s var(--kg-ease);
}

html[dir="rtl"] .site-header .nav-link::after {
    --kg-origin: right;
}

.site-header .nav-link:hover,
.site-header .nav-link.active,
.site-header .nav-link.show {
    color: var(--kg-red);
}

.site-header .nav-link:hover::after,
.site-header .nav-link.active::after {
    transform: scaleX(1);
}

.site-header .dropdown-menu {
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius-sm);
    box-shadow: var(--kg-shadow-lg);
    padding: .45rem;
    animation: kg-rise .3s var(--kg-ease) both;
}

.site-header .dropdown-item {
    border-radius: 8px;
    font-size: .92rem;
    padding: .5rem .65rem;
    transition: background-color .2s ease, color .2s ease, padding-inline-start .2s ease;
}

.site-header .dropdown-item:hover {
    background: var(--kg-red-soft);
    color: var(--kg-red-dark);
    padding-inline-start: .95rem;
}

.site-header .dropdown-item:active,
.site-header .dropdown-item.active {
    background: var(--kg-red);
    color: #fff;
}

.site-header .dropdown-item .bi {
    color: var(--kg-red);
}

.site-header .dropdown-item:active .bi,
.site-header .dropdown-item.active .bi {
    color: #fff;
}

.nav-search {
    min-width: 235px;
}

.nav-search .form-control {
    border-radius: 8px 0 0 8px;
}

html[dir="rtl"] .nav-search .form-control {
    border-radius: 0 8px 8px 0;
}

.nav-search .form-control:focus {
    border-color: var(--kg-red);
    box-shadow: 0 0 0 .2rem var(--kg-red-soft);
}

/* ==========================================================================
   3b. Exploded car explorer
   --------------------------------------------------------------------------
   The car IS the category menu: every component inside the chassis is a real
   link to a category. Scrolling pulls the car apart, hovering isolates one
   component, selecting one fans out its subcategories.

   Default state is the EXPLODED, fully-labelled diagram, so a browser with no
   scroll-timeline support and no JavaScript still shows a usable, readable
   parts map. The assembled start state is only introduced where it can be
   animated back out again.
   ========================================================================== */

.car-section {
    position: relative;
    /* Scroll distance the explosion plays out over. */
    height: 320vh;
    background:
        radial-gradient(120% 80% at 50% 0%, #f7f9fc 0%, var(--kg-bg) 55%),
        var(--kg-bg);
    /* clip, NOT hidden: overflow:hidden would make this a scroll container and
       view() timelines inside would resolve against it instead of the viewport. */
    overflow: clip;
}

.car-sticky {
    position: sticky;
    inset-block-start: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-block: clamp(1.5rem, 4vh, 3rem);
}

.car-head {
    text-align: center;
    max-width: 760px;
    margin: 0 auto clamp(.5rem, 2vh, 1.25rem);
}

.car-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--kg-red-dark);
    margin-bottom: .7rem;
}

.car-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--kg-red);
    box-shadow: 0 0 0 0 rgba(225, 27, 34, .55);
    animation: kg-car-pulse 2.4s ease-out infinite;
}

@keyframes kg-car-pulse {
    to { box-shadow: 0 0 0 12px rgba(225, 27, 34, 0); }
}

.car-title {
    font-size: clamp(1.6rem, 3.6vw, 3rem);
    margin-bottom: .6rem;
    text-wrap: balance;
}

.car-lead {
    color: var(--kg-muted);
    font-size: clamp(.95rem, 1.3vw, 1.1rem);
    margin-bottom: 0;
}

.car-stage {
    position: relative;
    width: 100%;
}

.car-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: min(66vh, 620px);
    overflow: visible;
}

/* ---------------------------------------------------------------- chassis */

.car-chassis {
    fill: none;
    stroke: var(--kg-ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.car-body {
    fill: color-mix(in srgb, var(--kg-ink) 4%, #fff);
    stroke: var(--kg-ink);
    stroke-width: 2.6;
}

.car-glass {
    fill: color-mix(in srgb, var(--kg-red) 7%, #eef2f7);
    stroke: var(--kg-ink);
    stroke-width: 2;
}

.car-line,
.car-arch {
    stroke: color-mix(in srgb, var(--kg-ink) 34%, transparent);
    stroke-width: 1.6;
}

.car-wheel circle {
    stroke: var(--kg-ink);
    stroke-width: 2.6;
    fill: none;
}

.car-wheel .car-rim {
    stroke-width: 1.8;
    stroke: color-mix(in srgb, var(--kg-ink) 45%, transparent);
}

.car-wheel .car-hub {
    fill: var(--kg-red);
    stroke: none;
}

.car-ground {
    stroke: color-mix(in srgb, var(--kg-ink) 22%, transparent);
    stroke-width: 2;
    stroke-dasharray: 2 10;
}

.car-shadow {
    fill: rgba(12, 15, 19, .07);
    stroke: none;
}

/* -------------------------------------------------------------- components */

.car-part {
    /* Default: already exploded and legible. */
    translate: var(--tx) var(--ty);
}

.car-leader {
    stroke: color-mix(in srgb, var(--kg-red) 55%, transparent);
    stroke-width: 1.6;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    fill: none;
}

.car-anchor {
    fill: var(--kg-red);
    opacity: .85;
}

.car-spread {
    transform-box: fill-box;
    transform-origin: center;
    transition: scale .45s var(--kg-ease), translate .45s var(--kg-ease);
}

.car-hotspot {
    cursor: pointer;
}

.car-hit {
    fill: transparent;
    stroke: none;
}

.car-ring {
    fill: #fff;
    stroke: color-mix(in srgb, var(--kg-ink) 16%, transparent);
    stroke-width: 2;
    transition: stroke .3s ease, fill .3s ease, filter .35s ease;
}

.car-glyph {
    fill: none;
    stroke: var(--kg-ink);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke .3s ease;
}

.car-label text {
    text-anchor: middle;
    fill: var(--kg-ink);
    font-family: var(--bs-body-font-family);
}

.car-label-name {
    font-size: 21px;
    font-weight: 750;
}

.car-label-meta {
    font-size: 15px;
    font-weight: 600;
    fill: var(--kg-muted);
}

html[dir="rtl"] .car-label text {
    direction: rtl;
}

/* --------------------------------------------------------------- hover state */

/* Everything drifts a little further apart while the pointer is on the diagram. */
.car-svg:hover .car-spread {
    translate: calc(var(--tx) * .05) calc(var(--ty) * .05);
}

.car-svg:has(.car-part:hover) .car-part:not(:hover) {
    opacity: .22;
}

.car-part {
    transition: opacity .35s var(--kg-ease);
}

.car-part:hover .car-spread,
.car-part:focus-within .car-spread {
    scale: 1.14;
}

.car-part:hover .car-ring,
.car-part:focus-within .car-ring {
    fill: var(--kg-red);
    stroke: var(--kg-red);
    filter: drop-shadow(0 10px 22px rgba(225, 27, 34, .38));
}

.car-part:hover .car-glyph,
.car-part:focus-within .car-glyph {
    stroke: #fff;
}

.car-part:hover .car-label-name,
.car-part:focus-within .car-label-name {
    fill: var(--kg-red-dark);
}

.car-hotspot:focus-visible .car-ring {
    stroke: var(--kg-ink);
    stroke-width: 3;
}

/* Dim the whole car while a component is being inspected. */
.car-svg:has(.car-part:hover) .car-chassis {
    opacity: .35;
}

.car-chassis {
    transition: opacity .4s var(--kg-ease);
}

/* --------------------------------------------- scroll-driven explosion */

@supports (animation-timeline: view()) {
    .car-section {
        view-timeline-name: --car-tl;
        view-timeline-axis: block;
    }

    /* Start assembled, then fly apart as the section is scrolled through. */
    .car-part {
        translate: 0 0;
        animation: kg-car-explode linear both;
        animation-timeline: --car-tl;
        animation-range: contain calc(1% + var(--i) * 1.4%) contain calc(46% + var(--i) * 1.4%);
    }

    .car-leader {
        stroke-dashoffset: 1;
        animation: kg-car-draw linear both;
        animation-timeline: --car-tl;
        animation-range: contain calc(3% + var(--i) * 1.4%) contain calc(48% + var(--i) * 1.4%);
    }

    .car-label {
        opacity: 0;
        animation: kg-car-label linear both;
        animation-timeline: --car-tl;
        animation-range: contain calc(20% + var(--i) * 1.4%) contain calc(52% + var(--i) * 1.4%);
    }

    .car-body,
    .car-glass {
        animation: kg-car-ghost linear both;
        animation-timeline: --car-tl;
        animation-range: contain 4% contain 40%;
    }

    .car-head {
        animation: kg-car-head linear both;
        animation-timeline: --car-tl;
        animation-range: contain 2% contain 24%;
    }
}

@keyframes kg-car-explode {
    to { translate: var(--tx) var(--ty); }
}

@keyframes kg-car-draw {
    to { stroke-dashoffset: 0; }
}

@keyframes kg-car-label {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes kg-car-ghost {
    to { opacity: .22; }
}

@keyframes kg-car-head {
    to { opacity: 0; translate: 0 -32px; }
}

/* ------------------------- JS fallback for browsers without scroll timelines */

.js-motion.no-view-timeline .car-part {
    translate: 0 0;
    transition: translate .95s var(--kg-ease) calc(var(--i) * 55ms), opacity .35s var(--kg-ease);
}

.js-motion.no-view-timeline .car-leader {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset .95s var(--kg-ease) calc(var(--i) * 55ms);
}

.js-motion.no-view-timeline .car-label {
    opacity: 0;
    transition: opacity .5s var(--kg-ease) calc(320ms + var(--i) * 55ms);
}

.js-motion.no-view-timeline .car-stage.is-exploded .car-part {
    translate: var(--tx) var(--ty);
}

.js-motion.no-view-timeline .car-stage.is-exploded .car-leader {
    stroke-dashoffset: 0;
}

.js-motion.no-view-timeline .car-stage.is-exploded .car-label {
    opacity: 1;
}

/* ------------------------------------------------- subcategory fan-out */

.car-detail {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: grid;
    place-items: center;
}

.car-detail[hidden] {
    display: none;
}

.car-detail-backdrop {
    position: absolute;
    inset: -20% -10%;
    background: color-mix(in srgb, #fff 82%, transparent);
    backdrop-filter: blur(6px);
    animation: kg-fade .35s var(--kg-ease) both;
}

.car-detail-panel {
    position: relative;
    z-index: 2;
    width: min(760px, 94%);
    text-align: center;
    padding: clamp(1.25rem, 3vw, 2rem);
    background: #fff;
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius-lg);
    box-shadow: var(--kg-shadow-lg);
    animation: kg-car-panel .45s var(--kg-ease) both;
}

@keyframes kg-car-panel {
    from { opacity: 0; transform: translateY(18px) scale(.94); }
    to   { opacity: 1; transform: none; }
}

.car-detail-close {
    position: absolute;
    inset-block-start: .6rem;
    inset-inline-end: .6rem;
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: var(--kg-bg-muted);
    color: var(--kg-ink);
    transition: background-color .25s ease, color .25s ease, rotate .35s var(--kg-ease);
}

.car-detail-close:hover {
    background: var(--kg-red);
    color: #fff;
    rotate: 90deg;
}

.car-detail-eyebrow {
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--kg-red);
    margin-bottom: .35rem;
}

.car-detail-title {
    font-size: clamp(1.3rem, 2.4vw, 1.9rem);
    margin-bottom: 1.1rem;
}

.car-detail-fan {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 1.35rem;
}

.car-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .9rem;
    border-radius: 100px;
    border: 1px solid var(--kg-line);
    background: var(--kg-bg-muted);
    color: var(--kg-ink);
    font-size: .9rem;
    font-weight: 650;
    transition: background-color .25s ease, color .25s ease, border-color .25s ease, translate .25s var(--kg-ease);
}

.car-chip:hover {
    background: var(--kg-red);
    border-color: var(--kg-red);
    color: #fff;
    translate: 0 -3px;
}

.car-detail-cta {
    margin-top: .2rem;
}

/* ------------------------------------------------------------ footer bits */

.car-foot {
    margin-top: clamp(.75rem, 2vh, 1.5rem);
    text-align: center;
}

.car-hint {
    font-size: .86rem;
    color: var(--kg-muted);
    margin-bottom: .7rem;
}

.car-hint .bi {
    color: var(--kg-red);
}

.car-quick {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .4rem;
}

.car-quick-link {
    font-size: .8rem;
    font-weight: 650;
    color: var(--kg-muted);
    border: 1px solid var(--kg-line);
    border-radius: 100px;
    padding: .25rem .7rem;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

.car-quick-link:hover {
    background: var(--kg-ink);
    border-color: var(--kg-ink);
    color: #fff;
}

/* --------------------------------------------------------------- small screens */

@media (max-width: 991.98px) {
    .car-section {
        height: auto;
    }

    .car-sticky {
        position: static;
        min-height: 0;
    }

    /* Too little room to explode into: show the assembled car, and let the
       quick links carry navigation. */
    .car-svg {
        max-height: none;
    }

    .car-label-name { font-size: 26px; }
    .car-label-meta { font-size: 19px; }
}

@media (max-width: 575.98px) {
    .car-hint {
        display: none;
    }
}

/* ==========================================================================
   4. Hero
   ========================================================================== */

/* --- the aurora hero ---------------------------------------------------- */

.hero-aurora {
    position: relative;
    min-height: clamp(430px, 62vh, 660px);
    display: flex;
    align-items: center;
    background: var(--kg-ink);
    overflow: hidden;
    isolation: isolate;
}

.hero-aurora .container {
    position: relative;
    z-index: 3;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    z-index: 1;
    pointer-events: none;
}

.hero-orb-1 {
    width: 46vw;
    height: 46vw;
    min-width: 340px;
    min-height: 340px;
    inset-inline-start: -8vw;
    top: -14vh;
    background: radial-gradient(circle at 30% 30%, var(--kg-red) 0%, rgba(225, 27, 34, 0) 70%);
    animation: kg-float-slow 16s ease-in-out infinite;
}

.hero-orb-2 {
    width: 38vw;
    height: 38vw;
    min-width: 280px;
    min-height: 280px;
    inset-inline-end: -6vw;
    bottom: -18vh;
    background: radial-gradient(circle at 60% 40%, #3b4a5e 0%, rgba(59, 74, 94, 0) 70%);
    animation: kg-float-slower 22s ease-in-out infinite;
}

.hero-grid {
    position: absolute;
    inset: 0;
    z-index: 2;
    background-image:
        linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 90% 70% at 50% 40%, #000 30%, transparent 75%);
    pointer-events: none;
}

.hero-content {
    max-width: 700px;
    color: #fff;
    padding-block: 3.5rem;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    padding: .4rem .85rem;
    border-radius: 100px;
    margin-bottom: 1.4rem;
    animation: kg-rise .8s var(--kg-ease) .05s both;
}

.hero-eyebrow .bi {
    color: var(--kg-red-bright);
}

.hero-title {
    color: #fff;
    font-size: clamp(2rem, 5vw, 3.9rem);
    font-weight: 850;
    margin-bottom: 1.1rem;
    animation: kg-rise .9s var(--kg-ease) .16s both;
}

/* Gradient sweep on the accent word. */
.hero-title .accent {
    background: linear-gradient(100deg, var(--kg-red-bright) 0%, #ff8a8f 40%, var(--kg-red-bright) 70%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: kg-shimmer 6s linear infinite;
}

/* The company tagline, treated as a gradient accent line under the headline. */
.hero-accent-line {
    font-size: clamp(1.02rem, 1.8vw, 1.4rem);
    font-weight: 750;
    background: linear-gradient(100deg, var(--kg-red-bright) 0%, #ffb3b6 42%, var(--kg-red-bright) 72%);
    background-size: 220% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 1.15rem;
    animation:
        kg-rise .9s var(--kg-ease) .24s both,
        kg-shimmer 7s linear 1s infinite;
}

.hero-lead {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255, 255, 255, .82);
    max-width: 560px;
    margin-bottom: 2rem;
    animation: kg-rise .9s var(--kg-ease) .36s both;
}

/* When a banner image is uploaded for the home page it becomes the hero backdrop. */
.hero-aurora.has-image {
    background-size: cover;
    background-position: center;
}

.hero-aurora.has-image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(90deg, rgba(8, 10, 13, .9) 0%, rgba(8, 10, 13, .62) 55%, rgba(8, 10, 13, .3) 100%);
}

html[dir="rtl"] .hero-aurora.has-image::after {
    background: linear-gradient(270deg, rgba(8, 10, 13, .9) 0%, rgba(8, 10, 13, .62) 55%, rgba(8, 10, 13, .3) 100%);
}

.hero-aurora.has-image .hero-orb {
    opacity: .3;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    animation: kg-rise .9s var(--kg-ease) .48s both;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem;
    margin-top: 2.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    animation: kg-rise .9s var(--kg-ease) .52s both;
}

.hero-meta-item {
    display: flex;
    flex-direction: column;
}

.hero-meta-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hero-meta-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255, 255, 255, .5);
    margin-top: .35rem;
}

.hero-scroll-cue {
    position: absolute;
    inset-inline: 0;
    bottom: 1.1rem;
    z-index: 3;
    text-align: center;
    color: rgba(255, 255, 255, .5);
    font-size: 1.4rem;
    animation: kg-bob 2.4s ease-in-out infinite;
}

/* ==========================================================================
   4b. Showcase slider (foot of the home page)
   --------------------------------------------------------------------------
   Deliberately still: the image is shown whole, at its own proportions, with
   no pan or zoom. Only the transition BETWEEN slides is animated.
   ========================================================================== */

.showcase-frame {
    position: relative;
    border-radius: var(--kg-radius-lg);
    overflow: hidden;
    background: var(--kg-ink);
    border: 1px solid var(--kg-line);
    box-shadow: var(--kg-shadow-lg);
}

.showcase-frame .carousel,
.showcase-frame .carousel-inner,
.showcase-frame .carousel-item {
    height: 100%;
}

/* A stable box so swapping slides never shifts the page height (no CLS),
   whatever proportions the uploaded images have. */
.showcase-frame .carousel-inner {
    aspect-ratio: 16 / 7;
}

@media (max-width: 767.98px) {
    .showcase-frame .carousel-inner {
        aspect-ratio: 4 / 3;
    }
}

.showcase-image {
    width: 100%;
    height: 100%;
    /* contain, not cover: show the whole image rather than cropping it. */
    object-fit: contain;
    object-position: center;
    /* No zoom/pan animation here by design. */
}

/* Crossfade between slides. Bootstrap's .carousel-fade handles the opacity;
   this just makes it slower and softer than the default. */
.showcase-frame .carousel-item {
    transition: opacity .9s var(--kg-ease);
}

/* The caption re-animates each time its slide becomes active, because the
   rule only matches while .active is present. */
.showcase-caption {
    position: absolute;
    inset-inline: 0;
    inset-block-end: 0;
    padding: clamp(1.1rem, 3vw, 2.25rem);
    padding-block-start: clamp(2.5rem, 7vw, 5rem);
    background: linear-gradient(0deg, rgba(8, 10, 13, .92) 0%, rgba(8, 10, 13, .6) 55%, rgba(8, 10, 13, 0) 100%);
    color: #fff;
    text-align: start;
}

.showcase-title {
    color: #fff;
    font-size: clamp(1.15rem, 2.4vw, 1.9rem);
    margin-bottom: .4rem;
}

.showcase-text {
    color: rgba(255, 255, 255, .86);
    font-size: clamp(.9rem, 1.2vw, 1.05rem);
    margin-bottom: .9rem;
    max-width: 62ch;
}

.showcase-btn {
    margin-bottom: 0;
}

.carousel-item.active .showcase-title {
    animation: kg-rise .7s var(--kg-ease) .12s both;
}

.carousel-item.active .showcase-text {
    animation: kg-rise .7s var(--kg-ease) .24s both;
}

.carousel-item.active .showcase-btn {
    animation: kg-rise .7s var(--kg-ease) .36s both;
}

/* ------------------------------------------------------------ controls */

.showcase-frame .carousel-control-prev,
.showcase-frame .carousel-control-next {
    width: 12%;
    opacity: 0;
    transition: opacity .3s ease;
}

.showcase-frame:hover .carousel-control-prev,
.showcase-frame:hover .carousel-control-next,
.showcase-frame:focus-within .carousel-control-prev,
.showcase-frame:focus-within .carousel-control-next {
    opacity: .9;
}

.showcase-frame .carousel-control-prev-icon,
.showcase-frame .carousel-control-next-icon {
    width: 2.6rem;
    height: 2.6rem;
    padding: .7rem;
    border-radius: 50%;
    background-color: rgba(12, 15, 19, .55);
    background-size: 1.1rem;
}

.showcase-indicators {
    margin-bottom: .9rem;
}

.showcase-indicators [data-bs-target] {
    width: 26px;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, .45);
    border: 0;
    transition: background-color .3s ease, width .3s var(--kg-ease);
}

.showcase-indicators .active {
    background: var(--kg-red-bright);
    width: 42px;
}

/* ==========================================================================
   5. Page banner
   ========================================================================== */

.page-banner {
    position: relative;
    background: linear-gradient(120deg, #1b2128 0%, var(--kg-ink) 100%);
    background-size: cover;
    background-position: center;
    overflow: hidden;
    isolation: isolate;
}

.page-banner.has-image::before {
    content: "";
    position: absolute;
    inset: -2%;
    background: inherit;
    background-size: cover;
    background-position: center;
    z-index: 0;
    animation: kg-zoom-slow 18s ease-out both;
}

.page-banner-overlay {
    position: relative;
    z-index: 2;
    background: linear-gradient(90deg, rgba(8, 10, 13, .85), rgba(8, 10, 13, .5));
    padding-block: clamp(2.75rem, 7vw, 5.5rem);
}

html[dir="rtl"] .page-banner-overlay {
    background: linear-gradient(270deg, rgba(8, 10, 13, .85), rgba(8, 10, 13, .5));
}

.page-banner:not(.has-image) .page-banner-overlay {
    background: transparent;
}

.page-banner:not(.has-image)::after {
    content: "";
    position: absolute;
    width: 40vw;
    height: 40vw;
    min-width: 300px;
    min-height: 300px;
    inset-inline-end: -10vw;
    top: -60%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 27, 34, .5) 0%, rgba(225, 27, 34, 0) 68%);
    filter: blur(60px);
    z-index: 1;
    animation: kg-float-slow 18s ease-in-out infinite;
}

.page-banner-title {
    color: #fff;
    font-size: clamp(1.7rem, 3.6vw, 2.9rem);
    margin: 0;
    animation: kg-rise .8s var(--kg-ease) .06s both;
}

.page-banner-subtitle {
    color: rgba(255, 255, 255, .8);
    margin: .65rem 0 0;
    max-width: 720px;
    font-size: 1.02rem;
    animation: kg-rise .8s var(--kg-ease) .2s both;
}

/* ==========================================================================
   6. Sections
   ========================================================================== */

.section {
    padding-block: clamp(3rem, 6vw, 5.5rem);
    position: relative;
}

.section-muted {
    background: var(--kg-bg-muted);
}

.section-dark {
    background: var(--kg-ink);
    color: rgba(255, 255, 255, .78);
}

.section-dark h2,
.section-dark h3 {
    color: #fff;
}

.section-head {
    text-align: center;
    max-width: 780px;
    margin: 0 auto clamp(1.75rem, 3.5vw, 3rem);
}

.section-eyebrow {
    display: inline-block;
    font-size: .76rem;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--kg-red);
    margin-bottom: .7rem;
}

.section-title {
    font-size: clamp(1.55rem, 2.9vw, 2.4rem);
    margin-bottom: .7rem;
}

.section-head .section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--kg-red), var(--kg-red-bright));
    border-radius: 3px;
    margin: 1rem auto 0;
    transform: scaleX(1);
    transition: transform .8s var(--kg-ease) .25s;
}

/* The rule draws itself once the heading block is revealed. */
.js-motion .section-head[data-reveal]:not(.is-revealed) .section-title::after {
    transform: scaleX(0);
}

.section-subtitle {
    font-size: 1.28rem;
    margin-bottom: .9rem;
    padding-inline-start: .85rem;
    border-inline-start: 4px solid var(--kg-red);
}

.section-lead {
    color: var(--kg-muted);
    font-size: 1.04rem;
    margin-bottom: .8rem;
}

.section-image {
    width: 100%;
    border-radius: var(--kg-radius-lg);
    margin-block: 1.5rem;
    box-shadow: var(--kg-shadow-lg);
}

.prose p {
    margin-bottom: 1.05rem;
    color: var(--kg-body);
    line-height: 1.85;
}

.section-intro .section-lead {
    font-size: 1.06rem;
    line-height: 1.9;
}

/* ==========================================================================
   7. Marquee
   ========================================================================== */

.marquee {
    background: var(--kg-ink);
    border-block: 1px solid rgba(255, 255, 255, .07);
    padding-block: .95rem;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 2.75rem;
    width: max-content;
    animation: kg-marquee 34s linear infinite;
}

.marquee:hover .marquee-track {
    animation-play-state: paused;
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: rgba(255, 255, 255, .62);
    font-size: .92rem;
    font-weight: 650;
    white-space: nowrap;
    transition: color .25s ease;
}

.marquee-item:hover {
    color: #fff;
}

.marquee-item .bi {
    color: var(--kg-red-bright);
}

.marquee-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--kg-red);
    flex: 0 0 auto;
}

/* ==========================================================================
   8. Stat band
   ========================================================================== */

.stat-band {
    background: linear-gradient(135deg, var(--kg-ink) 0%, #1c242e 100%);
    padding-block: clamp(2.5rem, 5vw, 3.75rem);
    position: relative;
    overflow: hidden;
}

.stat-band::before {
    content: "";
    position: absolute;
    width: 50vw;
    height: 50vw;
    inset-inline-start: 50%;
    top: -80%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 27, 34, .28) 0%, rgba(225, 27, 34, 0) 70%);
    filter: blur(70px);
    animation: kg-float-slower 24s ease-in-out infinite;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-number {
    display: block;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 850;
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.stat-number .suffix {
    color: var(--kg-red-bright);
}

.stat-caption {
    display: block;
    margin-top: .6rem;
    font-size: .84rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255, 255, 255, .55);
}

/* ==========================================================================
   9. Category cards
   ========================================================================== */

.category-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius);
    overflow: hidden;
    color: inherit;
    /* position:relative is what .stretched-link on the title anchors against. */
    position: relative;
    isolation: isolate;
    transition: transform .45s var(--kg-ease), box-shadow .45s var(--kg-ease), border-color .45s ease;
}

.category-card::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--kg-red), var(--kg-red-bright));
    transform: scaleX(0);
    transform-origin: var(--kg-origin, left) 50%;
    transition: transform .45s var(--kg-ease);
    z-index: 4;
}

html[dir="rtl"] .category-card::before {
    --kg-origin: right;
}

.category-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--kg-shadow-lg);
    border-color: transparent;
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-card-media {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    background: var(--kg-bg-muted);
    overflow: hidden;
    position: relative;
}

.category-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--kg-ease);
}

.category-card:hover .category-card-media img {
    transform: scale(1.09);
}

.category-card-media .bi {
    font-size: 2.6rem;
    color: var(--kg-red);
    transition: transform .5s var(--kg-ease);
}

.category-card:hover .category-card-media .bi {
    transform: scale(1.18) rotate(-6deg);
}

.category-card-body {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1rem 1.1rem 1.2rem;
    flex: 1 1 auto;
}

.category-card-title {
    font-weight: 750;
    color: var(--kg-ink);
    font-size: 1.02rem;
    transition: color .25s ease;
}

.category-card:hover .category-card-title {
    color: var(--kg-red);
}

.category-card-text {
    color: var(--kg-muted);
    font-size: .86rem;
    line-height: 1.6;
}

.category-card-count {
    margin-top: .4rem;
    font-size: .78rem;
    font-weight: 700;
    color: var(--kg-red-dark);
}

.category-card-arrow {
    margin-top: auto;
    padding-top: .7rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--kg-red-dark);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .4s var(--kg-ease), transform .4s var(--kg-ease);
}

.category-card:hover .category-card-arrow {
    opacity: 1;
    transform: none;
}

/* ==========================================================================
   10. Part cards
   ========================================================================== */

.part-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius);
    overflow: hidden;
    transition: transform .45s var(--kg-ease), box-shadow .45s var(--kg-ease);
}

.part-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--kg-shadow-lg);
}

.part-card-media {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: var(--kg-bg-muted);
    overflow: hidden;
}

.part-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .7s var(--kg-ease);
}

.part-card:hover .part-card-media img {
    transform: scale(1.08);
}

/* Quick-look ribbon that slides up over the image. */
.part-card-peek {
    position: absolute;
    inset-inline: 0;
    bottom: 0;
    padding: .55rem;
    text-align: center;
    font-size: .8rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(0deg, rgba(12, 15, 19, .92), rgba(12, 15, 19, .4));
    transform: translateY(100%);
    transition: transform .45s var(--kg-ease);
}

.part-card:hover .part-card-peek,
.part-card:focus-within .part-card-peek {
    transform: none;
}

.part-card-badge {
    position: absolute;
    top: .6rem;
    inset-inline-end: .6rem;
    background: var(--kg-red);
    color: #fff;
    font-size: .68rem;
    line-height: 1;
    padding: .38rem .5rem;
    border-radius: 7px;
    box-shadow: 0 4px 12px rgba(225, 27, 34, .35);
    z-index: 2;
}

.part-card-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding: .9rem 1rem 1.05rem;
}

.part-card-category {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--kg-red-dark);
    font-weight: 800;
}

.part-card-title {
    font-size: 1rem;
    margin: .35rem 0 .55rem;
    line-height: 1.4;
}

.part-card-title a {
    color: var(--kg-ink);
    transition: color .25s ease;
}

.part-card:hover .part-card-title a {
    color: var(--kg-red);
}

.part-card-meta {
    margin: 0 0 .8rem;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .12rem .6rem;
    font-size: .8rem;
}

.part-card-meta dt {
    color: var(--kg-muted);
    font-weight: 500;
}

.part-card-meta dd {
    margin: 0;
    color: var(--kg-body);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.part-card-footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
    padding-top: .7rem;
    border-top: 1px solid var(--kg-line);
}

.part-card-price {
    font-weight: 800;
    color: var(--kg-ink);
    font-size: 1rem;
}

.part-card-price-muted {
    color: var(--kg-muted);
    font-weight: 650;
    font-size: .82rem;
}

.part-card-link {
    font-size: .82rem;
    font-weight: 750;
    color: var(--kg-red-dark);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
}

.part-card-link .bi {
    transition: transform .35s var(--kg-ease);
}

html[dir="rtl"] .part-card-link .bi-arrow-right::before {
    content: "\f12f"; /* bi-arrow-left */
}

.part-card:hover .part-card-link .bi {
    transform: translateX(4px);
}

html[dir="rtl"] .part-card:hover .part-card-link .bi {
    transform: translateX(-4px);
}

/* ==========================================================================
   11. Feature and why cards
   ========================================================================== */

.feature-card,
.why-card {
    height: 100%;
    background: #fff;
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius);
    padding: 1.75rem 1.5rem;
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition: transform .45s var(--kg-ease), box-shadow .45s var(--kg-ease);
}

/* Red wash that grows from the corner on hover. */
.feature-card::before,
.why-card::before {
    content: "";
    position: absolute;
    inset-block-start: 0;
    inset-inline-end: 0;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 27, 34, .1) 0%, rgba(225, 27, 34, 0) 70%);
    transform: translate(35%, -35%) scale(.6);
    transition: transform .6s var(--kg-ease);
    z-index: -1;
}

.feature-card:hover,
.why-card:hover {
    transform: translateY(-7px);
    box-shadow: var(--kg-shadow-lg);
}

.feature-card:hover::before,
.why-card:hover::before {
    transform: translate(20%, -20%) scale(1.5);
}

.feature-icon,
.why-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 15px;
    background: linear-gradient(135deg, var(--kg-red-soft), rgba(225, 27, 34, .16));
    color: var(--kg-red);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    transition: transform .5s var(--kg-ease), background-color .35s ease, color .35s ease;
}

.feature-card:hover .feature-icon,
.why-card:hover .why-icon {
    transform: translateY(-4px) rotate(-8deg) scale(1.06);
    background: var(--kg-red);
    color: #fff;
}

.feature-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.feature-title,
.why-title {
    font-size: 1.08rem;
    margin-bottom: .55rem;
}

.feature-text,
.why-text {
    color: var(--kg-muted);
    font-size: .93rem;
    line-height: 1.75;
    margin-bottom: 0;
}

.feature-index {
    position: absolute;
    inset-block-start: 1.1rem;
    inset-inline-end: 1.25rem;
    font-size: .8rem;
    font-weight: 800;
    color: var(--kg-line);
    transition: color .35s ease;
}

.feature-card:hover .feature-index {
    color: rgba(225, 27, 34, .35);
}

.why-card {
    text-align: center;
}

.why-card .why-icon {
    margin-inline: auto;
}

/* ==========================================================================
   12. Call to action band
   ========================================================================== */

.cta-band {
    background: linear-gradient(120deg, var(--kg-red-dark) 0%, var(--kg-red) 55%, #f0454b 100%);
    color: #fff;
    padding-block: clamp(2.5rem, 5vw, 4rem);
    position: relative;
    overflow: hidden;
}

.cta-band::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(ellipse 80% 90% at 80% 20%, #000, transparent 70%);
}

.cta-band > .container {
    position: relative;
    z-index: 2;
}

.cta-title {
    color: #fff;
    font-size: clamp(1.3rem, 2.5vw, 2rem);
    margin-bottom: .55rem;
}

.cta-text {
    color: rgba(255, 255, 255, .92);
    margin-bottom: 0;
}

.cta-text-lead {
    font-size: 1.08rem;
}

.cta-band .btn-light {
    --bs-btn-color: var(--kg-red-dark);
    --bs-btn-hover-color: var(--kg-red-dark);
    font-weight: 800;
}

/* ==========================================================================
   13. Breadcrumb + sidebar
   ========================================================================== */

.breadcrumb {
    font-size: .86rem;
    margin-bottom: 1.6rem;
}

.breadcrumb a {
    color: var(--kg-muted);
    transition: color .2s ease;
}

.breadcrumb a:hover {
    color: var(--kg-red);
}

.breadcrumb-item.active {
    color: var(--kg-ink);
    font-weight: 650;
}

.sidebar {
    background: var(--kg-bg-muted);
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius);
    padding: 1.3rem 1.1rem;
    position: sticky;
    top: 96px;
}

.sidebar-title {
    font-size: 1.02rem;
    margin-bottom: .85rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid var(--kg-line);
}

.sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.sidebar-list a {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .65rem;
    border-radius: 9px;
    color: var(--kg-body);
    font-size: .91rem;
    font-weight: 550;
    transition: background-color .25s ease, color .25s ease, transform .25s var(--kg-ease);
}

.sidebar-list a:hover {
    background: #fff;
    color: var(--kg-red);
    transform: translateX(3px);
}

html[dir="rtl"] .sidebar-list a:hover {
    transform: translateX(-3px);
}

.sidebar-list a.active {
    background: var(--kg-red);
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 27, 34, .25);
}

.sidebar-list .bi {
    color: var(--kg-red);
}

.sidebar-list a.active .bi,
.sidebar-list a:hover .bi {
    color: inherit;
}

.category-head {
    margin-bottom: 1.75rem;
}

.category-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
    align-items: center;
    font-size: .86rem;
    color: var(--kg-muted);
    margin-bottom: 0;
}

.category-meta-sep {
    opacity: .5;
}

.eyebrow-link {
    color: var(--kg-red-dark);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ==========================================================================
   13b. Category tree sidebar
   ========================================================================== */

.category-tree {
    padding: 1.1rem 1rem;
}

.tree-filter {
    position: relative;
    margin-bottom: .85rem;
}

.tree-filter .bi {
    position: absolute;
    inset-inline-start: .65rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--kg-muted);
    font-size: .85rem;
    pointer-events: none;
}

.tree-filter .form-control {
    padding-inline-start: 2rem;
    border-radius: 9px;
    background: #fff;
}

.tree-filter .form-control:focus {
    border-color: var(--kg-red);
    box-shadow: 0 0 0 .2rem var(--kg-red-soft);
}

.tree-empty {
    font-size: .86rem;
    color: var(--kg-muted);
    margin: .5rem 0 0;
}

.tree-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .15rem;
}

.tree-link,
.tree-summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .55rem .65rem;
    border-radius: 9px;
    color: var(--kg-body);
    font-size: .91rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .25s ease, color .25s ease;
}

.tree-summary {
    justify-content: space-between;
    list-style: none;
}

/* Hide the native disclosure triangle in every engine. */
.tree-summary::-webkit-details-marker {
    display: none;
}

.tree-summary::marker {
    content: "";
}

.tree-summary-label {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    min-width: 0;
}

.tree-link:hover,
.tree-summary:hover {
    background: #fff;
    color: var(--kg-red);
}

.tree-link.active,
.tree-summary.active {
    background: var(--kg-red);
    color: #fff;
    box-shadow: 0 6px 16px rgba(225, 27, 34, .25);
}

.tree-link .bi,
.tree-summary-label .bi {
    color: var(--kg-red);
    flex: 0 0 auto;
}

.tree-link:hover .bi,
.tree-summary:hover .bi,
.tree-link.active .bi,
.tree-summary.active .bi {
    color: inherit;
}

.tree-toggle-icon {
    font-size: .72rem;
    flex: 0 0 auto;
    transition: transform .3s var(--kg-ease);
}

.tree-branch[open] > .tree-summary .tree-toggle-icon {
    transform: rotate(45deg);
}

.tree-children {
    list-style: none;
    margin: .2rem 0 .35rem;
    padding-inline-start: .85rem;
    border-inline-start: 2px solid var(--kg-line);
    display: flex;
    flex-direction: column;
    gap: 1px;
    /* Subcategories slide open rather than snapping. */
    animation: kg-tree-open .35s var(--kg-ease) both;
}

@keyframes kg-tree-open {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}

.tree-child {
    display: block;
    padding: .4rem .6rem;
    border-radius: 7px;
    font-size: .875rem;
    color: var(--kg-muted);
    transition: background-color .2s ease, color .2s ease, padding-inline-start .2s ease;
}

.tree-child:hover {
    background: #fff;
    color: var(--kg-red);
    padding-inline-start: .8rem;
}

.tree-child.active {
    background: var(--kg-red-soft);
    color: var(--kg-red-dark);
    font-weight: 700;
}

.tree-child-all {
    font-style: italic;
}

/* ==========================================================================
   13c. Subcategory cards + chips
   ========================================================================== */

.subcategory-block {
    margin-bottom: 2.25rem;
}

.subcategory-card {
    display: flex;
    align-items: center;
    gap: .7rem;
    height: 100%;
    padding: .7rem .8rem;
    background: #fff;
    border: 1px solid var(--kg-line);
    border-radius: 12px;
    color: var(--kg-ink);
    transition: transform .35s var(--kg-ease), box-shadow .35s var(--kg-ease), border-color .3s ease;
}

.subcategory-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--kg-shadow-lg);
    border-color: transparent;
    color: var(--kg-red-dark);
}

.subcategory-media {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: var(--kg-bg-muted);
    overflow: hidden;
    color: var(--kg-red);
    font-size: 1.15rem;
}

.subcategory-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.subcategory-card:hover .subcategory-media {
    background: var(--kg-red-soft);
}

.subcategory-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.subcategory-name {
    font-weight: 700;
    font-size: .91rem;
    line-height: 1.35;
}

.subcategory-count {
    font-size: .76rem;
    color: var(--kg-muted);
}

.subcategory-arrow {
    flex: 0 0 auto;
    font-size: .8rem;
    color: var(--kg-red);
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity .3s var(--kg-ease), transform .3s var(--kg-ease);
}

html[dir="rtl"] .subcategory-arrow {
    transform: translateX(4px);
}

html[dir="rtl"] .subcategory-arrow.bi-arrow-right::before {
    content: "\f12f"; /* bi-arrow-left */
}

.subcategory-card:hover .subcategory-arrow {
    opacity: 1;
    transform: none;
}

.category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem;
    margin-top: .15rem;
}

.category-chip {
    position: relative;
    z-index: 2;
    font-size: .72rem;
    font-weight: 600;
    color: var(--kg-muted);
    background: var(--kg-bg-muted);
    border: 1px solid var(--kg-line);
    border-radius: 100px;
    padding: .12rem .5rem;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}

a.category-chip:hover {
    background: var(--kg-red);
    border-color: var(--kg-red);
    color: #fff;
}

.category-chip-more {
    font-weight: 700;
    color: var(--kg-red-dark);
}

/* ==========================================================================
   13d. Mega menu for the Spare Parts nav item
   ========================================================================== */

.mega-menu {
    padding: .9rem;
    max-width: min(94vw, 940px);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .9rem 1.4rem;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: .2rem;
}

.mega-parent {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .88rem;
    font-weight: 800;
    color: var(--kg-ink);
    padding-bottom: .35rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid var(--kg-line);
}

.mega-parent .bi {
    color: var(--kg-red);
}

.mega-parent:hover {
    color: var(--kg-red);
}

.mega-children {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-children li + li {
    margin-top: 1px;
}

.mega-children a {
    display: block;
    font-size: .84rem;
    color: var(--kg-muted);
    padding: .22rem .35rem;
    border-radius: 6px;
    transition: background-color .2s ease, color .2s ease, padding-inline-start .2s ease;
}

.mega-children a:hover {
    background: var(--kg-red-soft);
    color: var(--kg-red-dark);
    padding-inline-start: .6rem;
}

@media (max-width: 991.98px) {
    .mega-menu {
        max-width: 100%;
    }

    .mega-grid {
        grid-template-columns: 1fr;
        max-height: 60vh;
    }
}

/* ==========================================================================
   14. Product detail
   ========================================================================== */

.product-gallery-main {
    border: 1px solid var(--kg-line);
    border-radius: var(--kg-radius-lg);
    overflow: hidden;
    background: var(--kg-bg-muted);
    aspect-ratio: 4 / 3;
    position: relative;
}

.product-gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .8s var(--kg-ease), opacity .35s ease;
}

/* Crossfade while the gallery swaps images. */
.product-gallery-main img.is-swapping {
    opacity: 0;
    transform: scale(.98);
}

.product-gallery-main:hover img {
    transform: scale(1.07);
}

.product-gallery-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    margin-top: .8rem;
}

.gallery-thumb {
    width: 76px;
    height: 62px;
    padding: 0;
    border: 2px solid var(--kg-line);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    cursor: pointer;
    transition: border-color .3s ease, transform .3s var(--kg-ease);
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumb:hover {
    transform: translateY(-3px);
}

.gallery-thumb.active,
.gallery-thumb:hover {
    border-color: var(--kg-red);
}

.product-category-link {
    display: inline-block;
    font-size: .77rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--kg-red-dark);
    margin-bottom: .6rem;
}

.product-title {
    font-size: clamp(1.45rem, 2.6vw, 2.2rem);
    margin-bottom: .85rem;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 850;
    color: var(--kg-ink);
    margin-bottom: 1.4rem;
}

.product-price-muted {
    font-size: 1.02rem;
    font-weight: 650;
    color: var(--kg-muted);
}

.product-specs {
    --bs-table-bg: transparent;
    font-size: .93rem;
}

.product-specs th {
    width: 40%;
    color: var(--kg-muted);
    font-weight: 500;
}

.product-specs td {
    font-weight: 700;
    color: var(--kg-body);
    overflow-wrap: anywhere;
}

/* Spec rows cascade in when the block scrolls into view. */
.product-specs tr {
    opacity: 0;
    transform: translateY(12px);
    animation: kg-rise .6s var(--kg-ease) both;
    animation-delay: calc(.28s + var(--row, 0) * .07s);
}

.product-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-top: .6rem;
}

.spec-list {
    padding-inline-start: 1.15rem;
    color: var(--kg-body);
}

.spec-list li {
    margin-bottom: .45rem;
    line-height: 1.8;
}

/* ==========================================================================
   15. Contact
   ========================================================================== */

.contact-form .form-label {
    font-weight: 650;
    font-size: .9rem;
    margin-bottom: .32rem;
}

.contact-form .required {
    color: var(--kg-red);
}

.contact-form .form-control {
    border-radius: 10px;
    padding: .6rem .85rem;
    transition: border-color .25s ease, box-shadow .25s ease, transform .25s var(--kg-ease);
}

.contact-form .form-control:focus {
    border-color: var(--kg-red);
    box-shadow: 0 0 0 .2rem var(--kg-red-soft);
}

.contact-panel {
    background: linear-gradient(150deg, var(--kg-ink) 0%, #1d252f 100%);
    color: rgba(255, 255, 255, .85);
    border-radius: var(--kg-radius-lg);
    padding: 2rem 1.65rem;
    position: sticky;
    top: 96px;
    overflow: hidden;
    isolation: isolate;
}

.contact-panel::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    inset-inline-end: -90px;
    top: -110px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(225, 27, 34, .38) 0%, rgba(225, 27, 34, 0) 70%);
    filter: blur(40px);
    z-index: -1;
    animation: kg-float-slow 20s ease-in-out infinite;
}

.contact-panel-title {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 1.25rem;
}

.contact-list {
    list-style: none;
    margin: 0 0 1.35rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.05rem;
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    transition: transform .3s var(--kg-ease);
}

.contact-list li:hover {
    transform: translateX(4px);
}

html[dir="rtl"] .contact-list li:hover {
    transform: translateX(-4px);
}

.contact-list-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .08);
    color: var(--kg-red-bright);
    font-size: 1.05rem;
    transition: background-color .3s ease, color .3s ease;
}

.contact-list li:hover .contact-list-icon {
    background: var(--kg-red);
    color: #fff;
}

.contact-list-body {
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
}

.contact-list-label {
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: rgba(255, 255, 255, .45);
}

.contact-list a,
.contact-list-body > span:last-child {
    color: #fff;
    font-weight: 650;
    font-size: .95rem;
}

/* Several addresses stack under one label rather than sitting on one line. */
.contact-list-body a + a {
    margin-block-start: .15rem;
}

.footer-emails {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.contact-list a:hover {
    color: var(--kg-red-bright);
}

.contact-panel-note {
    margin: 0;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .12);
    font-size: .88rem;
    color: rgba(255, 255, 255, .58);
}

.search-page-form {
    max-width: 700px;
    margin: 0 auto 2.25rem;
}

.search-page-form .form-control {
    border-radius: 12px 0 0 12px;
}

html[dir="rtl"] .search-page-form .form-control {
    border-radius: 0 12px 12px 0;
}

/* ==========================================================================
   16. Empty state, pagination, error
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: clamp(2.25rem, 5vw, 3.75rem) 1rem;
    background: #fff;
    border: 1px dashed var(--kg-line);
    border-radius: var(--kg-radius-lg);
}

.empty-state .bi {
    font-size: 2.8rem;
    color: var(--kg-line);
    display: block;
    margin-bottom: .85rem;
    animation: kg-bob 3s ease-in-out infinite;
}

.empty-state p {
    margin-bottom: .4rem;
    font-weight: 650;
    color: var(--kg-ink);
}

.empty-state p.text-muted {
    font-weight: 400;
    margin-bottom: 1.1rem;
}

.pagination-wrap {
    display: flex;
    justify-content: center;
    margin-top: 2.25rem;
}

.pagination {
    --bs-pagination-color: var(--kg-body);
    --bs-pagination-hover-color: var(--kg-red-dark);
    --bs-pagination-focus-box-shadow: 0 0 0 .2rem var(--kg-red-soft);
    --bs-pagination-active-bg: var(--kg-red);
    --bs-pagination-active-border-color: var(--kg-red);
    --bs-pagination-border-radius: 9px;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: .3rem;
}

.pagination .page-link {
    transition: transform .25s var(--kg-ease), background-color .25s ease;
}

.pagination .page-item:not(.active) .page-link:hover {
    transform: translateY(-2px);
}

.error-page {
    padding-block: clamp(3.5rem, 9vw, 7rem);
}

.error-code {
    font-size: clamp(4rem, 14vw, 8.5rem);
    font-weight: 850;
    line-height: 1;
    background: linear-gradient(120deg, var(--kg-red), #ffb0b3);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: .4rem;
}

/* ==========================================================================
   17. Footer
   ========================================================================== */

.site-footer {
    background: var(--kg-ink);
    color: rgba(255, 255, 255, .66);
    padding-block: clamp(2.75rem, 5vw, 4rem) 0;
    font-size: .92rem;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    inset-block-start: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--kg-red), transparent);
}

.footer-logo {
    background: #fff;
    border-radius: 10px;
    padding: .4rem .55rem;
    margin-bottom: 1.1rem;
    max-width: 100%;
    width: auto;
}

.footer-tagline {
    margin-bottom: .55rem;
    color: rgba(255, 255, 255, .82);
}

.footer-legal {
    font-size: .84rem;
    color: rgba(255, 255, 255, .48);
}

.footer-heading {
    color: #fff;
    font-size: 1.02rem;
    margin-bottom: 1.05rem;
    padding-bottom: .6rem;
    position: relative;
}

.footer-heading::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 38px;
    height: 2px;
    background: var(--kg-red);
}

.footer-links,
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li {
    margin-bottom: .55rem;
}

.footer-links a {
    color: rgba(255, 255, 255, .66);
    display: inline-block;
    transition: color .25s ease, transform .25s var(--kg-ease);
}

.footer-links a:hover {
    color: var(--kg-red-bright);
    transform: translateX(4px);
}

html[dir="rtl"] .footer-links a:hover {
    transform: translateX(-4px);
}

.footer-contact li {
    display: flex;
    gap: .65rem;
    margin-bottom: .8rem;
    align-items: flex-start;
    overflow-wrap: anywhere;
}

.footer-contact .bi {
    color: var(--kg-red-bright);
    margin-top: .15rem;
}

.footer-contact a {
    color: rgba(255, 255, 255, .8);
    transition: color .2s ease;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-top: 1.15rem;
    flex-wrap: wrap;
}

.footer-social-label {
    font-size: .84rem;
    color: rgba(255, 255, 255, .48);
}

.footer-social a {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .8);
    transition: background-color .3s ease, color .3s ease, transform .3s var(--kg-ease);
}

.footer-social a:hover {
    background: var(--kg-red);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    margin-top: 2.5rem;
    padding-block: 1.2rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1rem;
    justify-content: space-between;
    font-size: .84rem;
    color: rgba(255, 255, 255, .48);
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 991.98px) {
    .site-header .navbar-collapse {
        padding-block: .85rem;
    }

    .site-header .nav-link::after {
        display: none;
    }

    .nav-search {
        min-width: 0;
        margin-top: .6rem;
    }

    .sidebar,
    .contact-panel {
        position: static;
    }

    .hero-meta {
        gap: 1.25rem;
        margin-top: 2rem;
    }
}

@media (max-width: 575.98px) {
    .topbar {
        font-size: .76rem;
    }

    .part-card-meta {
        display: none;
    }

    .hero-actions .btn {
        --bs-btn-padding-x: 1.1rem;
        --bs-btn-font-size: .95rem;
    }

    .hero-meta-value {
        font-size: 1.3rem;
    }

    .to-top {
        inset-block-end: 1rem;
        inset-inline-end: 1rem;
        width: 42px;
        height: 42px;
    }
}

/* ==========================================================================
   19. Reduced motion — turn the choreography off completely
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        /* animation-timeline MUST be cleared first. A scroll-driven animation ignores
           animation-duration entirely, so the duration override below does nothing to it —
           it would stay scroll-linked and could hold content at its hidden start frame. */
        animation-timeline: none !important;
        animation-range: normal !important;
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }

    /* Land on the finished state of the car diagram rather than the assembled one. */
    .car-part {
        translate: var(--tx) var(--ty) !important;
    }

    .car-leader {
        stroke-dashoffset: 0 !important;
    }

    .car-label,
    .car-head {
        opacity: 1 !important;
        translate: none !important;
    }

    .car-body,
    .car-glass {
        opacity: 1 !important;
    }

    .car-svg:hover .car-spread {
        translate: 0 0 !important;
    }

    .js-motion [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }

    .product-specs tr {
        opacity: 1;
        transform: none;
    }

    .marquee-track {
        animation: none;
        transform: none;
    }

    .hero-orb,
    .stat-band::before,
    .contact-panel::before,
    .page-banner:not(.has-image)::after {
        animation: none;
    }

    @view-transition {
        navigation: none;
    }
}
