/**
 * Atelier — global homepage/storefront perf overrides for the legacy stack
 * (aiz-core, Bootstrap, Slick carousels, smart bar, header dropdowns).
 * Scope: only when theme wrapper has .aiz-atelier (homepage_select === atelier).
 */

/* --- aiz-core #smart-bar: blur(60px) is extreme on mobile/low-power GPUs --- */
.aiz-main-wrapper.aiz-atelier #smart-bar {
    backdrop-filter: blur(14px) saturate(1.06);
    -webkit-backdrop-filter: blur(14px) saturate(1.06);
    background-color: rgba(255, 255, 255, 0.93);
    box-shadow: 0 -6px 22px rgba(0, 0, 0, 0.07);
}

@media (max-width: 991.98px) {
    .aiz-main-wrapper.aiz-atelier #smart-bar {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background-color: #f7f6f4 !important;
    }
}

/* Permanent will-change on dropdowns keeps layers alive — drop until open */
.aiz-main-wrapper.aiz-atelier .header-drop {
    will-change: auto;
}

/* --- Lazy-loaded home sections + flash strip: narrow “transition: all 0.5s” cost --- */
.aiz-main-wrapper.aiz-atelier #section_featured .has-transition,
.aiz-main-wrapper.aiz-atelier #section_best_selling .has-transition,
.aiz-main-wrapper.aiz-atelier #section_newest .has-transition,
.aiz-main-wrapper.aiz-atelier #todays_deal .has-transition,
.aiz-main-wrapper.aiz-atelier #auction_products .has-transition,
.aiz-main-wrapper.aiz-atelier #section_home_categories .has-transition,
.aiz-main-wrapper.aiz-atelier #section_watches .has-transition,
.aiz-main-wrapper.aiz-atelier #relatedProduct .has-transition,
.aiz-main-wrapper.aiz-atelier #recentShoesCollection .has-transition,
.aiz-main-wrapper.aiz-atelier #section_shoes .has-transition,
.aiz-main-wrapper.aiz-atelier #flash_deal .has-transition,
.aiz-main-wrapper.aiz-atelier #section_featured_preorder_products .has-transition {
    transition-property: transform, opacity, color, background-color, border-color, box-shadow;
    transition-duration: 0.22s;
    transition-timing-function: ease;
}

/* Gentler hover zoom than aiz-core 1.05 — less raster work per frame */
.aiz-main-wrapper.aiz-atelier .hov-scale-img:hover img,
.aiz-main-wrapper.aiz-atelier .hov-scale:hover {
    transform: scale(1.022);
}

.aiz-main-wrapper.aiz-atelier .slick-slider .slick-track,
.aiz-main-wrapper.aiz-atelier .slick-slider .slick-list {
    transform: translateZ(0);
}

/* Isolate carousel slides so hover/blur on one row doesn’t repaint the whole main column */
.aiz-main-wrapper.aiz-atelier #section_featured .carousel-box,
.aiz-main-wrapper.aiz-atelier #section_best_selling .carousel-box,
.aiz-main-wrapper.aiz-atelier #section_newest .carousel-box,
.aiz-main-wrapper.aiz-atelier #todays_deal .carousel-box,
.aiz-main-wrapper.aiz-atelier #auction_products .carousel-box,
.aiz-main-wrapper.aiz-atelier #section_home_categories .carousel-box,
.aiz-main-wrapper.aiz-atelier #section_watches .carousel-box,
.aiz-main-wrapper.aiz-atelier #section_shoes .carousel-box,
.aiz-main-wrapper.aiz-atelier #flash_deal .carousel-box {
    contain: layout style;
}

/* Fast scroll: legacy transitions briefly squashed (atelier-scroll-perf.js toggles html class) */
@media (prefers-reduced-motion: no-preference) {
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_featured .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_best_selling .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_newest .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #todays_deal .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #auction_products .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_home_categories .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_watches .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #relatedProduct .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #recentShoesCollection .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_shoes .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #flash_deal .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier #section_featured_preorder_products .has-transition,
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier .hov-scale-img img {
        transition-duration: 0.001ms !important;
        transition-delay: 0s !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aiz-main-wrapper.aiz-atelier .hov-scale-img:hover img,
    .aiz-main-wrapper.aiz-atelier .hov-scale:hover {
        transform: none;
    }
}

/* Bottom nav chrome — softer shadow than aiz-core default spread */
.aiz-main-wrapper.aiz-atelier .aiz-bottom-bar {
    box-shadow: 0 6px 20px rgba(121, 121, 162, 0.08);
}

/* Marquee: drop layer promotion while fast-scrolling */
@media (prefers-reduced-motion: no-preference) {
    html.atelier-scroll-active .aiz-main-wrapper.aiz-atelier .atelier-announcement-bar__marquee-inner {
        will-change: auto;
    }
}

/* Featured category hubs — flat cards (loads after atelier-featured-categories.css) */
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards],
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] *,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] *::before,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] *::after {
    box-shadow: none !important;
    text-shadow: none !important;
}

.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-hub__hero-col::before,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-hub__bloom,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-hub__mesh,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-hub__floats,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-hub__bridge,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-ecat-atmos,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-subcard__halo,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-feature-cinema {
    display: none !important;
}

.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-feature-photo,
.aiz-main-wrapper.aiz-atelier #atelierFeaturedCategories[data-explore-cards] .atelier-lux-submedia__img {
    filter: contrast(1.08) saturate(1.06) brightness(1.02) !important;
}
