/*
 * Heikaya v6.20.1 — PHONE-ONLY homepage redesign.
 * Desktop/tablet are intentionally untouched.
 */

@media (max-width: 767px) {

    /* ==========================================================
       HERO — text overlays the image on phones
       ========================================================== */
    body.home .lumiere-hero,
    body.home .lumiere-hero--slider {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: clamp(520px, 138vw, 650px) !important;
        min-height: 520px !important;
        max-height: 650px !important;
        overflow: hidden !important;
        background: #15120f !important;
    }

    body.home .lumiere-hero__visual {
        position: absolute !important;
        inset: 0 !important;
        z-index: 1 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        max-height: none !important;
        background: #15120f !important;
    }

    body.home .lumiere-hero__slides,
    body.home .lumiere-hero__slide {
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
    }

    body.home .lumiere-hero__slide-image {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    /* Premium contrast layer so copy stays readable over any uploaded image. */
    body.home .lumiere-hero__content {
        position: absolute !important;
        inset: 0 !important;
        z-index: 4 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-end !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 100% !important;
        margin: 0 !important;
        padding: 42px 24px 48px !important;
        background:
            linear-gradient(
                180deg,
                rgba(12,10,8,.08) 10%,
                rgba(12,10,8,.20) 42%,
                rgba(12,10,8,.70) 100%
            ) !important;
        color: #fffdf9 !important;
        text-align: left !important;
        pointer-events: none !important;
    }

    body.home .lumiere-hero__content > * {
        pointer-events: auto !important;
    }

    body.home .lumiere-hero__content::before {
        width: 48px !important;
        margin: 0 0 15px !important;
        background: #fffdf9 !important;
    }

    body.home .lumiere-hero__content .lumiere-eyebrow {
        margin: 0 !important;
        color: #fffdf9 !important;
        font-size: 9px !important;
        font-weight: 600 !important;
        letter-spacing: .17em !important;
        text-shadow: 0 2px 15px rgba(0,0,0,.30) !important;
    }

    body.home .lumiere-hero h1,
    body.home .lumiere-hero__content h1 {
        max-width: 92% !important;
        margin: 12px 0 0 !important;
        color: #fffdf9 !important;
        font-size: clamp(42px, 12vw, 58px) !important;
        line-height: .94 !important;
        text-shadow: 0 3px 22px rgba(0,0,0,.32) !important;
    }

    body.home .lumiere-hero__text {
        max-width: 88% !important;
        margin: 17px 0 22px !important;
        color: rgba(255,253,249,.94) !important;
        font-size: 13.5px !important;
        line-height: 1.6 !important;
        text-shadow: 0 2px 15px rgba(0,0,0,.25) !important;
    }

    body.home .lumiere-hero__content .lumiere-button {
        width: auto !important;
        min-width: 164px !important;
        min-height: 46px !important;
        border-color: #fffdf9 !important;
        background: #fffdf9 !important;
        color: #15120f !important;
    }

    /* The user asked to remove the hero timer/progress line on phones. */
    body.home .lumiere-hero__progress {
        display: none !important;
    }

    body.home .lumiere-hero__counter {
        top: 14px !important;
        right: 14px !important;
        z-index: 6 !important;
        color: #fffdf9 !important;
        background: rgba(21,18,15,.44) !important;
        border-color: rgba(255,253,249,.28) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
    }

    /* ==========================================================
       SUBCOLLECTION CARDS — larger, same arrows / slider behavior
       ========================================================== */
    body.home .heikaya-phone-collection__rail {
        gap: 12px !important;
        padding: 0 16px 8px !important;
        scroll-padding-inline: 16px !important;
    }

    body.home .heikaya-phone-category-card {
        flex: 0 0 min(78vw, 330px) !important;
        width: min(78vw, 330px) !important;
        max-width: min(78vw, 330px) !important;
        scroll-snap-align: center !important;
    }

    body.home .heikaya-phone-category-card__media {
        aspect-ratio: 1 / 1 !important;
        border-radius: 14px !important;
    }

    body.home .heikaya-phone-category-card__media img {
        padding: 7px !important;
    }

    body.home .heikaya-phone-category-card__title {
        min-height: 48px !important;
        padding: 11px 5px 0 !important;
        font-size: 19px !important;
        line-height: 1.08 !important;
    }

    body.home .heikaya-phone-category-arrow {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
    }

    body.home .heikaya-phone-category-arrow--prev {
        left: 17px !important;
    }

    body.home .heikaya-phone-category-arrow--next {
        right: 17px !important;
    }

    /* ==========================================================
       PRODUCT SHOWCASES — same visual language as subcollections
       Featured Selection / Bohemia / New Arrivals / Silver /
       Candle Holder and any matching homepage product grid.
       ========================================================== */

    body.home .heikaya-phone-product-slider {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }

    body.home .heikaya-phone-product-slider > .lumiere-featured-products__grid,
    body.home .heikaya-phone-product-slider > .heikaya-phone-product-rail {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: stretch !important;
        gap: 12px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 16px 9px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        scroll-behavior: smooth !important;
        scroll-padding-inline: 16px !important;
        scrollbar-width: none !important;
        -webkit-overflow-scrolling: touch !important;
        box-sizing: border-box !important;
    }

    body.home .heikaya-phone-product-slider > .lumiere-featured-products__grid::-webkit-scrollbar,
    body.home .heikaya-phone-product-slider > .heikaya-phone-product-rail::-webkit-scrollbar {
        display: none !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product {
        flex: 0 0 min(78vw, 330px) !important;
        width: min(78vw, 330px) !important;
        max-width: min(78vw, 330px) !important;
        min-width: min(78vw, 330px) !important;
        margin: 0 !important;
        scroll-snap-align: center !important;
        display: flex !important;
        flex-direction: column !important;
        align-self: stretch !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product__image {
        display: block !important;
        width: 100% !important;
        aspect-ratio: 1 / 1 !important;
        overflow: hidden !important;
        border: 1px solid rgba(21,18,15,.07) !important;
        border-radius: 14px !important;
        background: #fff !important;
        box-shadow: none !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product__image img {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        padding: 7px !important;
        object-fit: contain !important;
        object-position: center !important;
        transform: none !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product__body {
        display: flex !important;
        flex: 1 1 auto !important;
        flex-direction: column !important;
        min-height: 92px !important;
        padding: 11px 5px 0 !important;
        text-align: center !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product h3,
    body.home .heikaya-phone-product-slider .lumiere-featured-product h3 a {
        display: -webkit-box !important;
        min-height: 41px !important;
        margin: 0 !important;
        overflow: hidden !important;
        color: #15120f !important;
        font-family: "Cormorant Garamond", Georgia, serif !important;
        font-size: 19px !important;
        font-weight: 500 !important;
        line-height: 1.08 !important;
        text-align: center !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 2 !important;
    }

    body.home .heikaya-phone-product-slider .lumiere-featured-product__price {
        margin-top: auto !important;
        padding-top: 11px !important;
        color: #15120f !important;
        font-family: Montserrat, Arial, sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        text-align: center !important;
    }

    body.home .heikaya-phone-product-arrow {
        position: absolute !important;
        top: min(39vw, 165px) !important;
        z-index: 35 !important;
        display: grid !important;
        place-items: center !important;
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid rgba(21,18,15,.13) !important;
        border-radius: 50% !important;
        background: rgba(255,253,249,.97) !important;
        color: #15120f !important;
        box-shadow: 0 4px 12px rgba(21,18,15,.08) !important;
        transform: translateY(-50%) !important;
        cursor: pointer !important;
    }

    body.home .heikaya-phone-product-arrow--prev {
        left: 17px !important;
    }

    body.home .heikaya-phone-product-arrow--next {
        right: 17px !important;
    }

    body.home .heikaya-phone-product-arrow svg {
        width: 18px !important;
        height: 18px !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 1.7 !important;
        stroke-linecap: round !important;
        stroke-linejoin: round !important;
    }

    body.home .heikaya-phone-product-arrow[disabled] {
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Existing grids are no longer two columns on phones once initialized. */
    body.home .lumiere-featured-products__grid.heikaya-phone-product-rail {
        grid-template-columns: none !important;
    }

    /* Keep section CTA buttons beneath the slider, unchanged in purpose. */
    body.home .lumiere-featured-products__action {
        margin: 22px 0 0 !important;
        padding: 0 16px !important;
    }
}

/* If a phone was rotated after initialization, make the injected wrapper
   transparent on larger viewports so desktop/tablet layout remains unchanged. */
@media (min-width: 768px) {
    .heikaya-phone-product-slider {
        display: contents !important;
    }

    .heikaya-phone-product-arrow {
        display: none !important;
    }
}
