/*
 * Astrum Tech — Elementor Compatibility Styles
 * Loaded only when Elementor is active (enqueued via functions.php).
 *
 * Resets Elementor's default container and section padding to align
 * with Astrum's native spacing scale, and ensures brand tokens are
 * inherited by Elementor widgets.
 */

/* ── Inherit Astrum brand tokens inside all Elementor containers ── */
.elementor-section,
.elementor-container,
.e-con,
.e-con-inner {
  font-family: var(--wp--preset--font-family--body, 'Inter', sans-serif);
  color: var(--wp--preset--color--contrast, #171717);
}

/* ── Remove Elementor default max-width override on full-width sections ── */
.elementor-section.elementor-section-full_width > .elementor-container {
  max-width: 1600px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Elementor buttons inherit Astrum pill style ── */
.elementor-button {
  border-radius: var(--astrum-radius-btn, 999px) !important;
  font-weight: 500;
}
.elementor-button.elementor-button-primary,
.elementor-button[style*="background"] {
  background-color: var(--astrum-primary, #3b0023) !important;
  border-color: var(--astrum-primary, #3b0023) !important;
}

/* ── Elementor heading widget — match theme letter-spacing ── */
.elementor-widget-heading .elementor-heading-title {
  letter-spacing: -0.025em;
  line-height: 1.05;
}

/* ── Elementor image widget — match theme card radius ── */
.elementor-widget-image .elementor-image img {
  border-radius: var(--astrum-radius-card, 16px);
}

/* ── Fix Elementor editor ruler/sidebar z-index conflict with sticky header ── */
#elementor-editor-wrapper {
  z-index: 9998;
}
.astrum-header.is-scrolled {
  z-index: 200; /* Keep below Elementor editor overlay */
}

/* ── Elementor Full Width page template — no side padding on main ── */
body.elementor-page .site-main,
body.elementor-page main {
  padding-left: 0;
  padding-right: 0;
}

/* ── Elementor popup modal — ensure above header ── */
.elementor-popup-modal {
  z-index: 9999 !important;
}

/* ── WooCommerce product widget inside Elementor ── */
.elementor-widget-woocommerce-products .products,
.elementor-widget-wc-archive-products .products {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (max-width: 900px) {
  .elementor-widget-woocommerce-products .products,
  .elementor-widget-wc-archive-products .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Announcement bar — keep above Elementor sticky header if both active ── */
.astrum-announcement-bar {
  position: relative;
  z-index: 201;
}
