/*
 * GULBERAA global layout density layer.
 * Purpose: remove accidental blank/oversized spacing and create a fuller,
 * editorial e-commerce rhythm across all pages without changing content or
 * WooCommerce business logic.
 */

body.gulberaa-premium-storefront {
    --gulberaa-section-space: clamp(28px, 4vw, 56px);
    --gulberaa-content-space: clamp(18px, 2.5vw, 34px);
}

/* Keep the site visually full without forcing every section to touch. */
body.gulberaa-premium-storefront .site-main {
    min-height: 0;
}

body.gulberaa-premium-storefront .site-main > :where(.elementor-section,.elementor-element,.e-con),
body.gulberaa-premium-storefront .site-main > .woocommerce {
    box-sizing: border-box;
}

/* Generic empty Elementor containers should not create giant blank bands. */
body.gulberaa-premium-storefront .site-main .elementor-widget-spacer {
    max-height: 48px;
}
body.gulberaa-premium-storefront .site-main .elementor-widget-spacer .elementor-spacer-inner {
    max-height: 48px;
}

/* Page-title/header areas: compact, premium, consistent. */
body.gulberaa-premium-storefront .site-main .entry-header,
body.gulberaa-premium-storefront .site-main .page-header {
    margin-bottom: var(--gulberaa-content-space);
    padding-bottom: 0;
}
body.gulberaa-premium-storefront .site-main .entry-title,
body.gulberaa-premium-storefront .site-main .page-title {
    line-height: 1.12;
}

/* Common section rhythm for Elementor pages, while respecting explicit small sections. */
body.gulberaa-premium-storefront .elementor-section.elementor-top-section:not(.elementor-motion-effects-element-type-background),
body.gulberaa-premium-storefront .e-con.e-parent {
    box-sizing: border-box;
}

/* Reduce excessive top/bottom padding only when it is clearly oversized. */
@media (min-width: 922px) {
    body.gulberaa-premium-storefront .site-main .elementor-section.elementor-top-section > .elementor-container {
        min-height: 0;
    }
    body.gulberaa-premium-storefront .site-main .elementor-section.elementor-top-section {
        --section-padding-default: clamp(24px, 3vw, 52px);
    }
}

/* WooCommerce catalogue pages: keep filters/results close to the product grid. */
body.gulberaa-premium-storefront .woocommerce .woocommerce-products-header {
    padding-bottom: 0;
}
body.gulberaa-premium-storefront .woocommerce .woocommerce-breadcrumb {
    margin-top: 0;
}

/* Product page: eliminate large gaps around the main purchase area. */
body.gulberaa-premium-storefront.single-product div.product {
    margin-top: 0;
}
body.gulberaa-premium-storefront.single-product .woocommerce-product-gallery,
body.gulberaa-premium-storefront.single-product .summary {
    margin-bottom: 0;
}

/* Related/recommended products should visually fill the page rather than float alone. */
body.gulberaa-premium-storefront .related.products,
body.gulberaa-premium-storefront .up-sells.products {
    clear: both;
}

/* Universal content cards: use density through borders/backgrounds, not giant padding. */
body.gulberaa-premium-storefront :where(.woocommerce-info,.woocommerce-message,.woocommerce-error) {
    margin-bottom: 18px;
}

/* Never allow accidental horizontal overflow from decorative elements. */
body.gulberaa-premium-storefront,
body.gulberaa-premium-storefront .site-content {
    overflow-x: clip;
}

/* Mobile density: fuller viewport, smaller gaps, no cramped content. */
@media (max-width: 767px) {
    body.gulberaa-premium-storefront .site-main .elementor-widget-spacer {
        max-height: 28px;
    }
    body.gulberaa-premium-storefront .site-main .elementor-widget-spacer .elementor-spacer-inner {
        max-height: 28px;
    }
    body.gulberaa-premium-storefront .site-main .entry-header,
    body.gulberaa-premium-storefront .site-main .page-header {
        margin-bottom: 18px;
    }
}

/* Accessibility: do not remove intentional spacing from reduced-motion users. */
@media (prefers-reduced-motion: reduce) {
    body.gulberaa-premium-storefront * {
        scroll-behavior: auto !important;
    }
}
