/**
 * Albasy Marketplace — Hide Theme Header/Footer/Sidebar
 * Applied on pages with body class .alb-plugin-page
 * Covers: Astra, GeneratePress, OceanWP, StoreFront, Flavor,
 * flavor flavor Twenty Twenty-*, flavor Flavor flavor, Flavor flavor, Elementor, flavor flavor.
 * @version 2.0.0
 */

/* ═══════════════════════════════════════════════════════════
   1. THEME HEADER — hide on Albasy pages
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page header:not(.ape-navbar):not(.ape-topbar):not(.alb-tb):not([class*="alb-"]):not([class*="ape-"]),
body.alb-plugin-page #masthead,
body.alb-plugin-page .site-header,
body.alb-plugin-page .main-header,
body.alb-plugin-page #site-header,
body.alb-plugin-page .header-main,
body.alb-plugin-page .header-wrapper,
body.alb-plugin-page #header,
body.alb-plugin-page .page-header:not([class*="alb-"]),
body.alb-plugin-page .top-header,
body.alb-plugin-page .bottom-header,
body.alb-plugin-page .ast-header-stacked,
body.alb-plugin-page .ast-above-header-wrap,
body.alb-plugin-page .ast-below-header-wrap,
body.alb-plugin-page .ast-primary-header-bar,
body.alb-plugin-page .ast-mobile-header-wrap,
body.alb-plugin-page .inside-header,
body.alb-plugin-page #site-navigation,
body.alb-plugin-page .navigation-search,
body.alb-plugin-page #site-header-inner,
body.alb-plugin-page .oceanwp-mobile-menu-icon,
body.alb-plugin-page .storefront-primary-navigation,
body.alb-plugin-page .storefront-secondary-navigation,
body.alb-plugin-page .wp-site-blocks > header,
body.alb-plugin-page .has-global-padding > header,
body.alb-plugin-page .elementor-location-header,
body.alb-plugin-page [data-elementor-type="header"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ═══════════════════════════════════════════════════════════
   2. THEME FOOTER — hide on Albasy pages
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page footer:not([class*="alb-"]),
body.alb-plugin-page #colophon,
body.alb-plugin-page .site-footer,
body.alb-plugin-page .main-footer,
body.alb-plugin-page #site-footer,
body.alb-plugin-page #footer,
body.alb-plugin-page .footer-wrapper,
body.alb-plugin-page .footer-widgets,
body.alb-plugin-page .footer-bar,
body.alb-plugin-page .ast-footer-overlay,
body.alb-plugin-page .ast-small-footer,
body.alb-plugin-page .site-below-footer-wrap,
body.alb-plugin-page .ast-footer-row-inline,
body.alb-plugin-page #footer-widgets,
body.alb-plugin-page #footer-bottom,
body.alb-plugin-page .storefront-handheld-footer-bar,
body.alb-plugin-page .wp-site-blocks > footer,
body.alb-plugin-page .has-global-padding > footer,
body.alb-plugin-page .elementor-location-footer,
body.alb-plugin-page [data-elementor-type="footer"] {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ═══════════════════════════════════════════════════════════
   3. THEME SIDEBAR — hide on Albasy pages
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page aside:not([class*="alb-"]):not([class*="ape-"]),
body.alb-plugin-page .sidebar,
body.alb-plugin-page #secondary,
body.alb-plugin-page .widget-area {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════
   4. THEME PAGE TITLE + BREADCRUMBS — hide duplicates
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page .entry-title:not(.product_title),
body.alb-plugin-page .page-title:not([class*="alb-"]),
body.alb-plugin-page .ast-archive-description,
body.alb-plugin-page .woocommerce-products-header__title:not(.product_title),
body.alb-plugin-page .woocommerce-breadcrumb,
body.alb-plugin-page .breadcrumb,
body.alb-plugin-page .breadcrumbs,
body.alb-plugin-page nav.woocommerce-breadcrumb {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════
   5. THEME NAV MENUS — hide wp_nav_menu on Albasy pages
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page .primary-menu-container,
body.alb-plugin-page .secondary-menu-container,
body.alb-plugin-page #primary-menu,
body.alb-plugin-page .menu-primary-container,
body.alb-plugin-page .main-navigation:not([class*="alb-"]):not([class*="ape-"]),
body.alb-plugin-page .nav-menu:not([class*="alb-"]):not([class*="ape-"]),
body.alb-plugin-page .wp-block-navigation:not([class*="alb-"]) {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════
   6. WOOCOMMERCE DEFAULT ELEMENTS
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page .woocommerce-store-notice,
body.alb-plugin-page .woocommerce-demo-store,
body.alb-plugin-page .storefront-sticky-add-to-cart {
    display: none !important;
}

/* WooCommerce header cart widget (mini-cart, "CFA 0 · 0 article") */
body.alb-plugin-page .site-header-cart,
body.alb-plugin-page .woocommerce-mini-cart,
body.alb-plugin-page .widget_shopping_cart,
body.alb-plugin-page .widget_product_search,
body.alb-plugin-page .wc-block-mini-cart,
body.alb-plugin-page .wc-block-product-search,
body.alb-plugin-page .widget_shopping_cart_content {
    display: none !important;
}

/* Theme search bar (not Albasy search) */
body.alb-plugin-page .search-form:not([class*="alb-"]):not([class*="ape-"]),
body.alb-plugin-page .wp-block-search:not([class*="alb-"]),
body.alb-plugin-page .woocommerce-product-search:not([class*="alb-"]) {
    display: none !important;
}

/* "Bonjour, username" WooCommerce greeting */
body.alb-plugin-page .woocommerce-MyAccount-navigation-link,
body.alb-plugin-page .woocommerce-info:not([class*="alb-"]) {
    /* Keep visible — only hide if inside theme header */
}
body.alb-plugin-page header .woocommerce-info,
body.alb-plugin-page .site-header .woocommerce-info {
    display: none !important;
}


/* ═══════════════════════════════════════════════════════════
   7. FULL-WIDTH — content area takes 100%
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page .site-content,
body.alb-plugin-page #content,
body.alb-plugin-page .content-area,
body.alb-plugin-page #primary,
body.alb-plugin-page .container,
body.alb-plugin-page .site-main,
body.alb-plugin-page main {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

body.alb-plugin-page .entry-content,
body.alb-plugin-page .post-content,
body.alb-plugin-page article.page,
body.alb-plugin-page article.post {
    width: 100% !important;
    max-width: 100% !important;
}


/* ═══════════════════════════════════════════════════════════
   8. WP ADMIN BAR — adjust for Albasy pages
═══════════════════════════════════════════════════════════ */
body.alb-plugin-page:not(.logged-in) #wpadminbar {
    display: none !important;
}
body.alb-plugin-page:not(.logged-in) {
    margin-top: 0 !important;
    /* BugFix v550 : NE PAS remettre padding-top à 0.
       La navbar .alb-tb est fixed → le body DOIT avoir padding-top:60px
       sinon tout le contenu est caché sous la navbar pour les visiteurs. */
}
