/**
 * توافق عام مع قوالب WordPress — يعمل مع أي ثيم.
 */
:root {
  --mkch-mobile-nav-height: 0px;
}

body.mkch-active.mkch-full-layout {
  background: #0d0618 !important;
}

/* ─── وضع الصفحة الكاملة: إخفاء هيدر/فوتر القالب ─── */
body.mkch-active.mkch-full-layout #masthead,
body.mkch-active.mkch-full-layout header.site-header,
body.mkch-active.mkch-full-layout .site-header,
body.mkch-active.mkch-full-layout #site-header,
body.mkch-active.mkch-full-layout .header-wrapper,
body.mkch-active.mkch-full-layout .main-header-bar-wrap,
body.mkch-active.mkch-full-layout .ct-header,
body.mkch-active.mkch-full-layout #header,
body.mkch-active.mkch-full-layout header.wp-block-template-part,
body.mkch-active.mkch-full-layout .wp-site-blocks > header {
  display: none !important;
}

body.mkch-active.mkch-full-layout #colophon,
body.mkch-active.mkch-full-layout footer.site-footer,
body.mkch-active.mkch-full-layout .site-footer,
body.mkch-active.mkch-full-layout footer#footer,
body.mkch-active.mkch-full-layout .footer-widgets,
body.mkch-active.mkch-full-layout footer.wp-block-template-part,
body.mkch-active.mkch-full-layout .wp-site-blocks > footer {
  display: none !important;
}

/* FSE — إخفاء أجزاء القالب مع الإبقاء على #mkch-homepage */
body.mkch-active.mkch-full-layout .wp-site-blocks > *:not(#mkch-homepage):not(script):not(style) {
  display: none !important;
}

body.mkch-active.mkch-full-layout .wp-site-blocks > #mkch-homepage {
  display: block !important;
}

/* إعادة ضبط حاويات المحتوى */
body.mkch-active #primary,
body.mkch-active #content,
body.mkch-active .site-content,
body.mkch-active main.site-main,
body.mkch-active .entry-content,
body.mkch-active .page-content,
body.mkch-active .content-area,
body.mkch-active .woocommerce,
body.mkch-active .elementor,
body.mkch-active .wp-block-post-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

body.mkch-active .site-main,
body.mkch-active #main {
  padding-top: 0 !important;
}

@media (max-width: 1100px) {
  body.mkch-active.mkch-full-layout {
    padding-bottom: calc(var(--mkch-mobile-nav-height, 0px) + env(safe-area-inset-bottom, 0px));
  }

  body.mkch-active.mkch-full-layout #mkch-homepage .compact-footer {
    margin-bottom: calc(var(--mkch-mobile-nav-height, 0px) + env(safe-area-inset-bottom, 0px));
  }
}

/* ─── وضع المحتوى فقط: الإبقاء على هيدر/فوتر القالب ─── */
body.mkch-content-only #masthead,
body.mkch-content-only header.site-header,
body.mkch-content-only .site-header,
body.mkch-content-only #site-header,
body.mkch-content-only #colophon,
body.mkch-content-only footer.site-footer,
body.mkch-content-only .site-footer,
body.mkch-content-only footer#footer,
body.mkch-content-only header.wp-block-template-part,
body.mkch-content-only footer.wp-block-template-part {
  display: block !important;
}

body.mkch-content-only .mkch-internal-header,
body.mkch-content-only .mkch-internal-footer {
  display: none !important;
}

body.mkch-content-only {
  background: inherit !important;
}

/* شريط الجوال السفلي — إظهار فوق محتوى ماكيوت */
@media (max-width: 1100px) {
  .xtra-fixed-mobile-nav,
  .storefront-handheld-footer-bar,
  .mobile-bottom-bar,
  .footer-bar,
  .ct-mobile-actions,
  .wd-toolbar {
    z-index: 999999 !important;
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  body.mkch-active.mkch-full-layout .xtra-fixed-mobile-nav,
  body.mkch-active.mkch-full-layout .storefront-handheld-footer-bar {
    display: block !important;
  }

  body.mkch-drawer-open .side-drawer,
  body.mkch-drawer-open .drawer-overlay.open {
    z-index: 10000001 !important;
  }

  body.mkch-drawer-open .drawer-overlay.open {
    z-index: 10000000 !important;
  }
}
