/* Match the unchanged XStore header's inner container, only on the homepage. */
@media (min-width: 1024px) {
    body.home {
        --bambu-home-inner-width: min(var(--bambu-desktop-content-max), calc(100% - 2 * var(--bambu-desktop-side-gutter)));
    }
    body.home .bambu-home-hero {
        --bambu-hero-content-left: max(var(--bambu-desktop-side-gutter), calc((100% - var(--bambu-desktop-content-max)) / 2));
    }

    /* Elementor's outer containers retain their full-width backgrounds and vertical settings. */
    body.home .elementor > .e-con.e-con-boxed {
        padding-inline: 0;
        --content-width: var(--bambu-desktop-content-max);
    }
    body.home .elementor > .e-con.e-con-boxed > .e-con-inner,
    body.home .elementor > .elementor-section.elementor-section-boxed > .elementor-container {
        width: var(--bambu-home-inner-width);
        max-width: var(--bambu-desktop-content-max);
        margin-inline: auto;
        padding-inline: 0;
        box-sizing: border-box;
    }

    /* Do not apply another gutter inside the already aligned content container. */
    body.home .elementor-widget-bambu-hot-products,
    body.home .elementor-widget-bambu-product-showcase-tabs,
    body.home .elementor-widget-etheme_categories.bambu-home-category-ribbon {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-inline: 0;
    }
    body.home :is(.elementor-widget-bambu-hot-products, .elementor-widget-bambu-product-showcase-tabs) > .elementor-widget-container,
    body.home :is(.bambu-hot, .bambu-showcase) {
        width: 100%;
        max-width: 100%;
        padding-inline: 0;
        margin-inline: 0;
    }

    /* Preserve the ribbon container; its existing Swiper distributes natural-size desktop items. */
    body.home .bambu-home-category-ribbon :is(.elementor-widget-container, .swiper-entry, .categoriesCarousel) {
        width: 100%;
        padding-inline: 0;
        margin-inline: 0;
    }
    body.home .bambu-home-category-ribbon .swiper-slide { padding-inline: 0; }
    body.home .bambu-home-category-ribbon.bambu-ribbon-desktop-layout .swiper-slide {
        width: var(--bambu-ribbon-item-width) !important;
    }
    body.home .bambu-home-category-ribbon[data-bambu-ribbon-distribution="spaced"] :is(.swiper-custom-left, .swiper-custom-right) {
        visibility: hidden;
    }
    body.home .bambu-home-category-ribbon .category-grid.content-under {
        width: 100%;
        max-width: 100%;
        padding-inline: 0;
        margin-inline: 0;
    }
    body.home .bambu-home-category-ribbon .category-grid.content-under > a { width: 100%; margin-inline: 0; }
    body.home .bambu-home-category-ribbon .category-grid.content-under > a img { width: 100%; object-fit: contain; }
    body.home .bambu-home-category-ribbon.bambu-ribbon-desktop-layout .category-grid.content-under > a img {
        height: var(--bambu-ribbon-image-box-height);
    }

    body.home .et-footers-wrapper footer.footer > .container {
        width: var(--bambu-home-inner-width);
        max-width: var(--bambu-desktop-content-max);
        margin-inline: auto;
        padding-inline: 0;
    }
}
