/* Elementor: zero padding on homepage sections */
.jm-elementor-section,
.elementor-section.jm-elementor-section {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Homepage titles — sections render outside .jm-home in per-section Elementor shortcodes */
.elementor .jm-home__title,
.elementor .jm-home__section-title,
.elementor .jm-home__eyebrow,
.elementor .jm-home__section-sub,
.elementor-widget-shortcode .jm-home__title,
.elementor-widget-shortcode .jm-home__section-title,
.elementor-widget-shortcode .jm-home__eyebrow,
.elementor-widget-shortcode .jm-home__section-sub {
  font-family: Jomolhari, serif !important;
  font-weight: 400 !important;
}

.elementor .jm-home__feature h3,
.elementor .jm-home__sanctuary-card h3,
.elementor-widget-shortcode .jm-home__feature h3,
.elementor-widget-shortcode .jm-home__sanctuary-card h3 {
  font-family: Inter, sans-serif !important;
}

/* Features grid — keep title dividers aligned across columns (subgrid) */
.elementor .jm-home__features-grid,
.elementor-widget-shortcode .jm-home__features-grid {
  grid-template-rows: auto auto 1fr;
  row-gap: 24px;
}

.elementor .jm-home__feature,
.elementor-widget-shortcode .jm-home__feature {
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 3;
  gap: 0;
}

.elementor .jm-home__feature h3,
.elementor-widget-shortcode .jm-home__feature h3 {
  min-height: 0;
  align-self: stretch;
  box-sizing: border-box;
}

.elementor-section.jm-elementor-section > .elementor-container {
  max-width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-html .elementor-widget-container {
  padding: 0 !important;
  margin: 0 !important;
}

.elementor .jm-home {
  width: 100%;
  max-width: 100%;
}

.entry-content:has(.jm-home),
.elementor:has(.jm-home) .e-con,
.elementor:has(.jm-home) .elementor-section {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Hero image — Elementor/WordPress global img rules must not upscale */
.elementor-widget-shortcode .jm-home__hero-img,
.elementor .jm-home__hero-grid > .jm-home__hero-img,
.elementor .jm-home__hero-img {
  flex: 0 0 auto !important;
  width: clamp(300px, 27.3vw, 520px) !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
}

.elementor .jm-home__hero-grid {
  display: flex !important;
  gap: clamp(40px, 4.9vw, 70px) !important;
  align-items: center !important;
}

.elementor .jm-home__hero-copy {
  flex: 1 1 auto !important;
  min-width: 0 !important;
  max-width: 750px !important;
}

@media (max-width: 1199px) {
  .elementor-widget-shortcode .jm-home__hero-img,
  .elementor .jm-home__hero-img {
    flex: 0 1 auto !important;
    width: min(100%, clamp(320px, 55vw, 480px)) !important;
    max-width: 100% !important;
  }

  .elementor .jm-home__hero-grid {
    flex-direction: column !important;
  }

  .elementor .jm-home__hero-copy {
    max-width: none !important;
    text-align: center !important;
  }
}

@media (max-width: 768px) {
  .elementor .jm-home__hero-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 20px !important;
  }

  .elementor .jm-home__hero-copy {
    display: contents !important;
  }

  .elementor-widget-shortcode .jm-home__hero-img,
  .elementor .jm-home__hero-grid > .jm-home__hero-img,
  .elementor .jm-home__hero-img {
    order: 2 !important;
    flex: none !important;
    width: min(100%, 297px) !important;
    max-width: 76vw !important;
    border-radius: 12px !important;
    aspect-ratio: 297 / 257 !important;
    height: auto !important;
    object-fit: cover !important;
  }

  .elementor .jm-home__hero-text {
    order: 1 !important;
    width: 100% !important;
    max-width: 320px !important;
    text-align: center !important;
  }

  .elementor .jm-home__hero-text .jm-home__title {
    max-width: 238px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-align: center !important;
  }

  .elementor .jm-home__actions,
  .elementor-widget-shortcode .jm-home__actions {
    order: 3 !important;
    flex-wrap: nowrap !important;
    gap: 11px !important;
    margin-top: 4px !important;
    max-width: 353px !important;
    width: 100% !important;
    padding: 0 !important;
    justify-content: center !important;
  }

  .elementor .jm-home__btn,
  .elementor-widget-shortcode .jm-home__btn,
  .elementor .jm-home__actions a.jm-home__btn {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    max-width: 144px !important;
    width: auto !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
  }

  .elementor .jm-home__btn-icon,
  .elementor-widget-shortcode .jm-home__btn-icon {
    width: 16px !important;
    height: 16px !important;
    max-width: 16px !important;
  }

  .elementor .jm-home__spotlight,
  .elementor-widget-shortcode .jm-home__spotlight {
    min-height: min(158vw, 621px) !important;
    padding: 50px 0 48px !important;
    background-color: #F4F2ED !important;
    background-image: url(https://www.jmartin.my/wp-content/uploads/2026/06/mobile-bg-2.webp) !important;
    background-position: center top !important;
    background-size: 100% auto !important;
    background-repeat: no-repeat !important;
    box-sizing: border-box !important;
  }

  .elementor-widget-shortcode:has(.jm-home__spotlight) .elementor-widget-container,
  .elementor-element:has(.jm-home__spotlight) {
    overflow: visible !important;
  }

  .elementor .jm-home__spotlight-actions,
  .elementor-widget-shortcode .jm-home__spotlight-actions {
    display: flex !important;
    justify-content: center !important;
    margin-top: 20px !important;
    margin-bottom: 0 !important;
  }

  .elementor .jm-home__spotlight-actions .jm-home__btn,
  .elementor-widget-shortcode .jm-home__spotlight-actions .jm-home__btn {
    flex: none !important;
    width: 176px !important;
    max-width: 176px !important;
    min-width: 0 !important;
    height: 36px !important;
    padding: 0 20px !important;
    font-size: 12px !important;
    border-radius: 8px !important;
    gap: 8px !important;
  }

  .elementor .jm-home__spotlight-actions .jm-home__btn-arrow,
  .elementor-widget-shortcode .jm-home__spotlight-actions .jm-home__btn-arrow {
    width: 16px !important;
    height: 6px !important;
  }
}

/* Hero buttons — desktop only (global rules were overriding mobile sizes on WordPress) */
@media (min-width: 769px) {
.elementor .jm-home__actions,
.elementor-widget-shortcode .jm-home__actions {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  gap: 20px !important;
  margin-top: 60px !important;
}

.elementor .jm-home__btn,
.elementor-widget-shortcode .jm-home__btn,
.elementor .jm-home__actions a.jm-home__btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  min-width: 200px !important;
  width: auto !important;
  max-width: none !important;
  height: 48px !important;
  padding: 0 57px !important;
  border-radius: 12px !important;
  font-family: Inter, sans-serif !important;
  font-size: 20px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
  white-space: nowrap !important;
  text-decoration: none !important;
  flex-shrink: 0 !important;
}

.elementor .jm-home__btn-icon,
.elementor-widget-shortcode .jm-home__btn-icon {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px !important;
  flex-shrink: 0 !important;
  object-fit: contain !important;
}
}

.elementor .jm-home__btn--primary,
.elementor-widget-shortcode .jm-home__btn--primary {
  background: #5f6b4f !important;
  color: #fff !important;
  border: 1px solid #5f6b4f !important;
}

.elementor .jm-home__btn--outline,
.elementor-widget-shortcode .jm-home__btn--outline {
  background: transparent !important;
  color: #0a2819 !important;
  border: 1px solid #0a2819 !important;
}

.elementor .jm-home__btn--outline:hover,
.elementor-widget-shortcode .jm-home__btn--outline:hover {
  background: #0a2819 !important;
  color: #fff !important;
  border-color: #0a2819 !important;
}

.elementor .jm-home__btn--outline:hover .jm-home__btn-icon,
.elementor-widget-shortcode .jm-home__btn--outline:hover .jm-home__btn-icon {
  filter: brightness(0) invert(1) !important;
}

/* Homepage products — override WooCommerce defaults in Elementor */
.elementor .jm-home__products .woocommerce ul.products li.product a,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product a,
.elementor .jm-home__products .woocommerce ul.products li.product .woocommerce-loop-product__title,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: #545454 !important;
  text-decoration: none !important;
}

.elementor .jm-home__products .woocommerce ul.products li.product .price,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .price,
.elementor .jm-home__products .woocommerce ul.products li.product .price .amount,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .price .amount {
  color: #929e6a !important;
}

.elementor .jm-home__products .woocommerce ul.products li.product .button,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .button,
.elementor .jm-home__products .woocommerce ul.products li.product a.add_to_cart_button,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product a.add_to_cart_button {
  display: none !important;
}

.elementor .jm-home__products .woocommerce ul.products li.product .jm-product-image-frame,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .jm-product-image-frame {
  background: #e5e0d3 !important;
}

.elementor .jm-home__products .woocommerce ul.products li.product .jm-product-image-frame img,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product .jm-product-image-frame img,
.elementor .jm-home__products .woocommerce ul.products li.product a img,
.elementor-widget-shortcode .jm-home__products .woocommerce ul.products li.product a img {
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* My Account — Elementor page wrapper overrides (exclude logged-out login card) */
.elementor .entry-content:has(.woocommerce-MyAccount-navigation),
.elementor-widget-shortcode .entry-content:has(.woocommerce-MyAccount-navigation),
.woocommerce-account:not(.jm-login) .entry-content,
body.woocommerce-account:not(.jm-login) .entry-content,
.woocommerce-account.jm-login.logged-in .entry-content,
body.woocommerce-account.jm-login.logged-in .entry-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  margin: 0 !important;
}

body.woocommerce-account:not(.jm-login) .woocommerce,
.woocommerce-account:not(.jm-login) .woocommerce,
body.woocommerce-account.jm-login.logged-in .woocommerce,
.woocommerce-account.jm-login.logged-in .woocommerce {
  display: grid !important;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr) !important;
  max-width: 1440px !important;
  margin: 0 auto !important;
  width: 100% !important;
  float: none !important;
}

body.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-navigation {
  float: none !important;
  width: auto !important;
}

body.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce-account .woocommerce-MyAccount-content {
  float: none !important;
  width: auto !important;
}

@media (min-width: 769px) and (max-width: 1024px) {
  body.woocommerce-account:not(.jm-login) .woocommerce,
  .woocommerce-account:not(.jm-login) .woocommerce,
  body.woocommerce-account.jm-login.logged-in .woocommerce,
  .woocommerce-account.jm-login.logged-in .woocommerce {
    display: grid !important;
    grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) !important;
  }
}

/* iPad Air landscape (~1180px) — narrower sidebar so orders table has more room */
@media (min-width: 1025px) and (max-width: 1194px) and (orientation: landscape) {
  body.woocommerce-account:not(.jm-login) .woocommerce,
  .woocommerce-account:not(.jm-login) .woocommerce,
  body.woocommerce-account.jm-login.logged-in .woocommerce,
  .woocommerce-account.jm-login.logged-in .woocommerce {
    display: grid !important;
    grid-template-columns: minmax(150px, 200px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 768px) {
  body.woocommerce-account:not(.jm-login) .woocommerce,
  .woocommerce-account:not(.jm-login) .woocommerce,
  body.woocommerce-account.jm-login.logged-in .woocommerce,
  .woocommerce-account.jm-login.logged-in .woocommerce {
    grid-template-columns: 1fr !important;
    max-width: none !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-navigation,
  .woocommerce-account .woocommerce-MyAccount-navigation {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.woocommerce-account .woocommerce-MyAccount-content,
  .woocommerce-account .woocommerce-MyAccount-content {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.woocommerce-account .woocommerce-EditAccountForm,
  .woocommerce-account .woocommerce-EditAccountForm,
  .elementor .woocommerce-EditAccountForm,
  .elementor-widget-shortcode .woocommerce-EditAccountForm {
    max-width: none !important;
    width: 100% !important;
  }
}

.elementor .woocommerce-MyAccount-content::before,
.elementor-widget-shortcode .woocommerce-MyAccount-content::before,
body.woocommerce-account.woocommerce-edit-account .woocommerce-MyAccount-content::before {
  font-family: Jomolhari, serif !important;
  font-weight: 400 !important;
}

.elementor .woocommerce-EditAccountForm,
.elementor-widget-shortcode .woocommerce-EditAccountForm {
  max-width: 880px !important;
  width: 100% !important;
}

.elementor .woocommerce-EditAccountForm fieldset legend,
.elementor-widget-shortcode .woocommerce-EditAccountForm fieldset legend {
  font-family: Jomolhari, serif !important;
  font-weight: 400 !important;
}

.elementor .woocommerce-EditAccountForm button[name="save_account_details"],
.elementor-widget-shortcode .woocommerce-EditAccountForm button[name="save_account_details"] {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  background: #5f6b4f !important;
  color: #fff !important;
  border: 0 !important;
  text-transform: uppercase !important;
}

/* Cart page — WooCommerce Blocks */
.woocommerce-cart .entry-content,
body.woocommerce-cart .entry-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.woocommerce-cart .wp-block-woocommerce-cart,
.woocommerce-cart .wp-block-woocommerce-cart {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart,
.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) min(483px, 100%) !important;
  gap: clamp(24px, 3.3vw, 40px) !important;
  align-items: start !important;
  margin: 0 !important;
}

body.woocommerce-cart .wc-block-cart__sidebar,
.woocommerce-cart .wc-block-cart__sidebar {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart,
  .woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 640px) {
  body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart,
  .woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
    gap: clamp(40px, 3.3vw, 40px) !important;
  }
}

.elementor .wc-block-cart__totals-title,
.elementor-widget-shortcode .wc-block-cart__totals-title {
  font-family: Inter, sans-serif !important;
  font-weight: 600 !important;
}

.elementor .wc-block-cart__submit-button,
.elementor-widget-shortcode .wc-block-cart__submit-button {
  width: 100% !important;
  max-width: none !important;
  background: #46563b !important;
  color: #fff !important;
  border: 0 !important;
  text-transform: uppercase !important;
}

/* Checkout page — WooCommerce Blocks */
.woocommerce-checkout .entry-content,
body.woocommerce-checkout .entry-content {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.woocommerce-checkout .wp-block-woocommerce-checkout,
.woocommerce-checkout .wp-block-woocommerce-checkout {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
}

body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout,
.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) min(560px, 100%) !important;
  gap: 40px !important;
  align-items: start !important;
  margin: 0 !important;
}

@media (max-width: 1024px) {
  body.woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout,
  .woocommerce-checkout .wc-block-components-sidebar-layout.wc-block-checkout {
    grid-template-columns: 1fr !important;
  }
}

/* FAQ page — Elementor full-width */
.entry-content:has(.jm-faq),
.elementor:has(.jm-faq) .e-con,
.elementor:has(.jm-faq) .elementor-section {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.elementor .jm-faq__title,
.elementor-widget-shortcode .jm-faq__title {
  font-family: Jomolhari, serif !important;
  font-weight: 400 !important;
}

.elementor .jm-faq__question,
.elementor-widget-shortcode .jm-faq__question,
.elementor .jm-faq__tab,
.elementor-widget-shortcode .jm-faq__tab {
  font-family: Inter, sans-serif !important;
}

/* About Us page — Elementor full-width */
.entry-content:has(.jm-about),
.elementor:has(.jm-about) .e-con,
.elementor:has(.jm-about) .elementor-section {
  max-width: none !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.elementor .jm-about__section-title,
.elementor-widget-shortcode .jm-about__section-title,
.elementor .jm-about__philosophy-num,
.elementor-widget-shortcode .jm-about__philosophy-num {
  font-family: Jomolhari, serif !important;
  font-weight: 400 !important;
}

