/* RC22 staging: align only outer rhythm; product-category spacing is the reference.
   Do not modify the approved header/footer, cards, typography or product internals. */

/* Landing uses a nested main, while catalog and product use the template main. */
body.home .friedify-shop {
    padding-top: 28px;
    padding-bottom: 32px;
}
body.single-product .wp-site-blocks > main {
    padding-top: 28px;
    padding-bottom: 32px;
    box-sizing: border-box;
}

@media (min-width: 782px) {
/* The externally inserted pills are the first child of template main.
   Keep their 30px height and 10px gap, and prevent inherited block margins. */
body:is(.single-product, .woocommerce-shop, .tax-product_cat) .wp-site-blocks > main > .friedify-language-external {
    margin-block-start: 0 !important;
    margin-block-end: 10px !important;
}
}

@media (max-width: 781px) {
    body.home .friedify-shop {
        padding-top: 14px;
        padding-bottom: 24px;
    }
    body.single-product .wp-site-blocks > main {
        padding-top: 14px;
        padding-bottom: 24px;
        padding-inline: 8px;
    }
    /* The product template previously added 14px on each side on top of its
       parent padding. Match the catalog's 8px + 8px outer content rhythm. */
    body.single-product div.product,
    body.single-product .woocommerce-breadcrumb {
        padding-inline: 0 !important;
        box-sizing: border-box;
    }
    /* Remove the product template’s extra 18px breadcrumb top gap. */
    body.single-product .woocommerce-breadcrumb {
        margin-top: 0 !important;
    }
}

/* Product breadcrumb: avoid a second top margin above the approved page rhythm. */
@media (min-width: 782px) {
    body.single-product .woocommerce-breadcrumb { margin-top: 0 !important; }
}

/* RC22 pills alignment 5: landing page is the measured reference.
   Only external pills on catalog/product templates; never change main or content. */
@media (min-width: 782px) {
    /* Product pills start 8.8125px higher than the landing/catalog pills.
       Compensate the bottom margin so breadcrumbs/gallery do not move. */
    body.single-product .wp-site-blocks > main > .friedify-language-external {
        margin-top: 8.8125px !important;
        margin-bottom: 1.1875px !important;
    }
}
