/* Homepage intro scene: activated only after successful runtime measurements. */
html {
    scroll-behavior: auto !important;
}

body.home .n9-home-intro-header-spacer {
    display: none;
}

/*
 * Stable first paint: approximate the measured desktop geometry before the
 * deferred runtime controller starts. The measured value replaces this
 * provisional height without a visible old-layout/new-layout jump.
 */
@media (min-width: 1024px) and (min-height: 720px) {
    /* Reserve the measured rail before Slick/Elementor finish booting. */
    body.home .elementor-widget-kitchor-products,
    body.home .elementor-widget-kitchor-products .slick-list {
        min-height: 104px;
    }

    body.home .kitchor-lite-hero__viewport {
        height: max(300px, calc(100svh - 327px - clamp(20px, 3vh, 34px)));
        min-height: max(300px, calc(100svh - 327px - clamp(20px, 3vh, 34px)));
    }

    body.home.admin-bar .kitchor-lite-hero__viewport {
        height: max(300px, calc(100svh - 359px - clamp(20px, 3vh, 34px)));
        min-height: max(300px, calc(100svh - 359px - clamp(20px, 3vh, 34px)));
    }

    body.home .kitchor-lite-hero__track,
    body.home .kitchor-lite-hero__slide {
        height: 100%;
        min-height: 100%;
    }
}

@media (max-width: 1023px) {
    /* Mobile Slick settles at roughly 160px; reserve it to prevent reflow. */
    body.home .elementor-widget-kitchor-products,
    body.home .elementor-widget-kitchor-products .slick-list {
        min-height: 160px;
    }
}

html.n9-home-intro-enabled body.home .n9-home-intro-header-spacer {
    display: block;
}

html.n9-home-intro-enabled body.home #masthead,
html.n9-home-intro-enabled body.home header.site-header {
    position: fixed !important;
    z-index: 1000;
    top: 0 !important;
    right: 0;
    left: 0;
    width: auto;
    transform: translate3d(0, var(--n9-home-intro-header-exit, 0px), 0) !important;
    transition: none !important;
}

html.n9-home-intro-enabled body.home #masthead,
html.n9-home-intro-enabled body.home header.site-header,
html.n9-home-intro-enabled body.home #masthead > .elementor > .elementor-top-section,
html.n9-home-intro-enabled body.home header.site-header > .elementor > .elementor-top-section {
    background: transparent !important;
}

html.n9-home-intro-enabled body.home #masthead::before,
html.n9-home-intro-enabled body.home header.site-header::before {
    position: absolute;
    z-index: 0;
    top: 0;
    right: 0;
    left: 0;
    height: 96%;
    pointer-events: none;
    content: "";
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, .99) 0%,
        rgba(255, 255, 255, .98) 36%,
        rgba(255, 255, 255, .72) 68%,
        rgba(255, 255, 255, .24) 88%,
        rgba(255, 255, 255, 0) 100%
    );
}

html.n9-home-intro-enabled body.home #masthead > .elementor,
html.n9-home-intro-enabled body.home header.site-header > .elementor {
    position: relative;
    z-index: 1;
}

html.n9-home-intro-enabled body.home.admin-bar #masthead,
html.n9-home-intro-enabled body.home.admin-bar header.site-header {
    top: 32px !important;
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero {
    transform: scale(var(--n9-home-intro-hero-scale, 1)) !important;
    transform-origin: center center;
    transition: none !important;
}

html.n9-home-intro-enabled body.home #masthead.n9-home-intro-motion-active,
html.n9-home-intro-enabled body.home header.site-header.n9-home-intro-motion-active,
html.n9-home-intro-enabled body.home .kitchor-lite-hero.n9-home-intro-motion-active {
    will-change: transform;
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport {
    height: var(--n9-home-intro-hero-height) !important;
    min-height: var(--n9-home-intro-hero-height) !important;
    transition: none !important;
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__track,
html.n9-home-intro-enabled body.home .kitchor-lite-hero__slide {
    height: 100% !important;
    min-height: 100% !important;
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__slide {
    box-sizing: border-box;
    padding-bottom: clamp(36px, 5vh, 56px);
}

@media (min-width: 1024px) and (min-height: 720px) {
    body.home .kitchor-lite-hero__headline {
        font-size: clamp(58px, 3.45vw, 66px) !important;
        line-height: 1.02 !important;
    }
}

/* The homepage contains a single products widget; semantic selectors survive Elementor ID changes. */
body.home .elementor-widget-kitchor-products .woocommerce-carousel,
body.home .elementor-widget-kitchor-products .slick-list {
    position: relative;
    overflow: hidden !important;
    padding-bottom: 0 !important;
}

/* Fade the moving slides into the page background instead of hard-clipping them. */
html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport,
body.home .elementor-widget-kitchor-products .slick-list {
    --n9-home-edge-fade: clamp(28px, 5vw, 96px);
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport::before,
html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport::after,
body.home .elementor-widget-kitchor-products .slick-list::before,
body.home .elementor-widget-kitchor-products .slick-list::after {
    position: absolute;
    z-index: 4;
    top: 0;
    bottom: 0;
    width: var(--n9-home-edge-fade);
    pointer-events: none;
    content: "";
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport::before,
body.home .elementor-widget-kitchor-products .slick-list::before {
    left: 0;
    background: linear-gradient(to right, #fff 0%, rgba(255,255,255,.92) 28%, rgba(255,255,255,0) 100%);
}

html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport::after,
body.home .elementor-widget-kitchor-products .slick-list::after {
    right: 0;
    background: linear-gradient(to left, #fff 0%, rgba(255,255,255,.92) 28%, rgba(255,255,255,0) 100%);
}

@media screen and (max-width: 767px) {
    html.n9-home-intro-enabled body.home .kitchor-lite-hero__viewport,
    body.home .elementor-widget-kitchor-products .slick-list {
        --n9-home-edge-fade: 24px;
    }
}

body.home .elementor-widget-kitchor-products .slick-track {
    display: flex !important;
    align-items: stretch !important;
}

body.home .elementor-widget-kitchor-products .slick-slide {
    height: auto !important;
}

body.home .elementor-widget-kitchor-products .slick-slide > div,
body.home .elementor-widget-kitchor-products ul.products li.product {
    display: flex !important;
    min-width: 0;
    width: 100% !important;
    height: 100% !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product {
    flex-direction: column;
    padding: 4px 6px 8px !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product .product-block {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    overflow: hidden;
    box-sizing: border-box;
    border: 1px solid rgba(18, 31, 52, .055);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(18, 31, 52, .035) !important;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s cubic-bezier(.2, .72, .18, 1) !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product .content-product-imagin {
    margin-bottom: 0 !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product .product-caption {
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: 13px 10px 14px !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product .product-caption-bottom {
    display: none !important;
}

body.home .elementor-widget-kitchor-products ul.products li.product .woocommerce-loop-product__title,
body.home .elementor-widget-kitchor-products ul.products li.product .price {
    min-width: 0;
    overflow-wrap: anywhere;
}

@media (hover: hover) and (pointer: fine) {
    body.home .elementor-widget-kitchor-products ul.products li.product:hover .product-block,
    body.home .elementor-widget-kitchor-products ul.products li.product:focus-within .product-block {
        border-color: rgba(247, 169, 132, .18);
        box-shadow: 0 12px 30px rgba(18, 31, 52, .065) !important;
        transform: translate3d(0, -2px);
    }
}

@media screen and (max-width: 767px) {
    body.home .elementor-widget-kitchor-products ul.products li.product .product-block {
        border-color: transparent !important;
        box-shadow: 0 8px 24px rgba(18, 31, 52, .025) !important;
    }
}

@media screen and (max-width: 782px) {
    html.n9-home-intro-enabled body.home.admin-bar #masthead,
    html.n9-home-intro-enabled body.home.admin-bar header.site-header {
        top: 46px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.n9-home-intro-enabled body.home #masthead,
    html.n9-home-intro-enabled body.home header.site-header,
    html.n9-home-intro-enabled body.home .kitchor-lite-hero {
        transform: none !important;
        will-change: auto;
    }

    body.home .elementor-widget-kitchor-products ul.products li.product .product-block {
        transition: none !important;
        transform: none !important;
    }
}
