/**
 * Header & Footer Builder – Frontend Styles
 */

/* ── Custom header/footer wrapper ── */
#sits-custom-header, .sits-custom-header-wrap { position: relative; z-index: 1000; width: 100%; }
#sits-custom-footer, .sits-custom-footer-wrap { position: relative; width: 100%; }

/* ===================================================================
   Issue 3: Hide the theme's native header when our custom one is active.
   Covers Hello Elementor, Astra, GeneratePress, OceanWP, Neve, Blocksy,
   Storefront, and the generic Elementor Pro ThemeBuilder header location.
   =================================================================== */

body.sits-custom-header .site-header,
body.sits-custom-header #site-header,
body.sits-custom-header #masthead,
body.sits-custom-header .header-area,
body.sits-custom-header .header-main,
body.sits-custom-header .header-wrap,
body.sits-custom-header .header-wrapper,
body.sits-custom-header .main-header,
body.sits-custom-header .top-header,
body.sits-custom-header #top,
body.sits-custom-header #header,
/* Astra */
body.sits-custom-header .ast-desktop-header-wrap,
body.sits-custom-header #ast-fixed-header,
body.sits-custom-header .ast-header-html-markup,
/* OceanWP */
body.sits-custom-header #site-header-inner,
/* Neve */
body.sits-custom-header .header-main-inner,
/* Blocksy */
body.sits-custom-header [data-id="header"],
/* Hello Elementor — theme header + Elementor Pro location header */
body.sits-custom-header header.site-header,
body.sits-custom-header .site-header.elementor-page-header,
body.sits-custom-header header.elementor-location-header,
body.sits-custom-header .elementor-location-header:not(.sits-custom-header-wrap):not(#sits-custom-header),
/* Storefront */
body.sits-custom-header .storefront-primary-navigation,
/* Generic fallback */


/* ===================================================================
   Hide the theme's native footer when ours is active.
   =================================================================== */

body.sits-custom-footer .site-footer,
body.sits-custom-footer #colophon,
body.sits-custom-footer #site-footer,
body.sits-custom-footer .footer-area,
body.sits-custom-footer .footer-main,
body.sits-custom-footer .footer-wrap,
body.sits-custom-footer .footer-wrapper,
body.sits-custom-footer .main-footer,
body.sits-custom-footer #footer,
body.sits-custom-footer .footer-credits,
/* Astra */
body.sits-custom-footer .ast-footer-html-markup,
/* OceanWP */
body.sits-custom-footer #footer-inner,
/* Blocksy */
body.sits-custom-footer [data-id="footer"],
/* Hello Elementor */
body.sits-custom-footer footer.site-footer,
body.sits-custom-footer footer.elementor-location-footer,
body.sits-custom-footer .elementor-location-footer:not(.sits-custom-footer-wrap):not(#sits-custom-footer),
/* Generic fallback */


/* ── Fix body margins when theme header is hidden ── */
body.sits-custom-header { padding-top: 0 !important; margin-top: 0 !important; }
body.sits-custom-footer { padding-bottom: 0 !important; }
body.sits-custom-header .page-content,
body.sits-custom-header #page,
body.sits-custom-header .site,
body.sits-custom-header main { margin-top: 0 !important; }

/* ── Clear floats ── */
.sits-custom-header-wrap::after, .sits-custom-footer-wrap::after { content: ""; display: table; clear: both; }

/* ===================================================================
   Elementor editor overlay controls
   =================================================================== */

.sits-hf-editor-wrapper { position: relative; }
.sits-hf-editor-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.3); z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity 0.2s;
}
.sits-hf-editor-wrapper:hover .sits-hf-editor-overlay { opacity: 1; }
.sits-hf-editor-controls { color: #fff; padding: 8px 16px; border-radius: 4px; font-size: 13px; font-weight: 600; }

/* ── Hide post title for HF template posts ── */
body.elementor-page.elementor-page-sits-hf-template .entry-title,
body.elementor-page.elementor-page-sits-hf-template .page-title,
body.elementor-page.elementor-page-sits-hf-template .entry-header,
body.elementor-page.elementor-page-sits-hf-template .page-header,
body.elementor-page-template-canvas .entry-title,
body.elementor-page-template-canvas .page-title,
body.elementor-page-template-canvas .entry-header,
.sits-hf-post-title-hidden { display: none !important; }

/* ── Archive Loop wrapper ── */
.sits-archive-loop { width: 100%; }
.sits-archive-item { width: 100%; }
