/* Include the document canvas so empty/overscroll areas never fall back to browser white. */
:where(html, body, .editor-styles-wrapper) {
    background-color: var(--wp--preset--color--base);
}
.wp-site-blocks,
.editor-styles-wrapper > .is-root-container,
.wp-site-blocks > main:not(.has-background),
#curikeep-home-content:not(.has-background) {
    background-color: inherit;
}

/* The canvas palette must not recolor existing foregrounds or UI controls. */
:is(.curikeep-hero, .curikeep-header__cart-count, .curikeep-cart-drawer__panel, .curikeep-product__zoom, .curikeep-product-cart-flight),
.wp-site-blocks :is(button, input, select, textarea, .wp-element-button, .wc-block-components-button, .curikeep-product__quantity-controls) {
    --wp--preset--color--base: #F8F8F6;
}
.wp-site-blocks :is(.curikeep-account, .curikeep-order-tracking) {
    --ck-base: #F8F8F6;
}

/* Woo 11.2 Cart's mobile product span otherwise creates implicit price columns. */
@media (max-width: 600px) {
    body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
        grid-template-columns: 80px minmax(0, 1fr);
    }
    body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
        grid-column: 2 / 3;
        min-width: 0;
    }
    body.woocommerce-cart .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
        grid-column: 2 / 3;
        grid-row: 2;
        padding-top: 0;
    }
}

/* Keep Cart's native loading footprint while Blocks resolves the current session.
 * Match the existing skeleton rather than reserving the full empty-product list.
 * The viewport cap avoids excess space on short screens; real content can grow. */
body.woocommerce-cart .wp-block-woocommerce-cart {
    min-block-size: min(28rem, calc(100svh - 8rem));
}
@media (max-width: 782px) {
    body.woocommerce-cart .wp-block-woocommerce-cart {
        min-block-size: min(41.5rem, calc(100svh - 8rem));
    }
}
/* Loading/updated messages share one line so Drawer items do not jump 34px. */
.curikeep-cart-drawer .curikeep-cart-drawer__status {
    box-sizing: border-box;
    min-block-size: 34px;
}
