/*
Theme Name: Pale Retail — Cards
Theme URI: https://palecoffee.pl
Description: Child theme of Pixl for palecoffee.pl retail store. Provides the visual layer for the fullscreen scroll-snap card layout rendered by the retail_variations plugin. Follows the same child-theme pattern as pale-b2b-poolrooms.
Author: Pale
Template: pixl
Version: 0.2.0
License: GNU General Public License v2 or later
Text Domain: pale-retail-cards
*/

/* ---------------------------------------------------------------------------
   The card layout CSS lives in the retail_variations plugin (enqueued only
   when [pale_retail_store] renders). This stylesheet handles theme-level
   overrides that sit on top of Pixl's base.

   The store page should use the "Store (fullscreen)" template — that strips
   header, footer, title, and the constrained-width wrapper entirely. The
   rules below are a safety net in case the default Page template is used.
   --------------------------------------------------------------------------- */

/* ── Fullscreen takeover ───────────────────────────────────────────────── */

/* The store container IS the viewport — no body scroll. */
body:has(.pale-store) {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

/* Kill any max-width constraint Pixl's layout engine puts on the content
   wrapper. The wp-block-post-content and wp-block-group containers all
   inherit a constrained max-width from theme.json — override them when
   the store is present. */
body:has(.pale-store) .wp-block-post-content,
body:has(.pale-store) .wp-block-post-content > *,
body:has(.pale-store) .wp-block-group {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ── Hide Pixl chrome (safety net for default Page template) ────────── */

/* Pixl's header is a <header> template-part containing .pixl-header. */
body:has(.pale-store) header.wp-block-template-part,
body:has(.pale-store) .pixl-header {
    display: none !important;
}

/* The 100px spacer after the header. */
body:has(.pale-store) .wp-block-spacer {
    display: none !important;
}

/* Post title and featured image — the Page template includes both. */
body:has(.pale-store) .wp-block-post-title,
body:has(.pale-store) .wp-block-post-featured-image {
    display: none !important;
}

/* Post-meta partial and footer template part. */
body:has(.pale-store) .wp-block-template-part[class*="footer"],
body:has(.pale-store) footer.wp-block-template-part {
    display: none !important;
}

/* Pixl's footer pattern (loaded via the footer template part). */
body:has(.pale-store) .wp-block-group.has-global-padding.is-layout-constrained:last-child {
    display: none !important;
}
