/* Phone layout fixes — hero, reviews, cart FAB, Komerza embed */

/* Hero marketing block only on the real homepage */
body:not([data-pagename="home"]) .theme-header__hero {
  display: none !important;
}

@media (max-width: 767px) {
  /* Compact homepage hero */
  body[data-pagename="home"] .theme-header__hero {
    padding: 1.25em 0 2.25em 0 !important;
    margin-bottom: -24px !important;
    min-height: 0 !important;
    background-position: center top !important;
  }
  body[data-pagename="home"] .theme-header__hero .heroTitle {
    font-size: clamp(22px, 7vw, 30px) !important;
    line-height: 1.2 !important;
    margin-bottom: 0.35em !important;
  }
  body[data-pagename="home"] .theme-header__hero .heroDesc {
    font-size: 14px !important;
    line-height: 1.45 !important;
    max-width: 100% !important;
  }
  body[data-pagename="home"] .theme-header__hero .heroDesc br {
    display: none;
  }

  /* Reviews: stop the empty tall card */
  .zombieReviews_wrapper {
    margin-top: 28px !important;
  }
  .zombieReviews_track {
    align-items: flex-start !important;
    padding-bottom: 4px !important;
  }
  .zombieReviews_slide {
    flex-basis: 100% !important;
    height: auto !important;
    align-self: flex-start !important;
  }
  .zombieReviews_wrapper .dcReviewRow {
    height: auto !important;
    min-height: 0 !important;
    padding: 14px 16px !important;
    gap: 12px !important;
  }
  .zombieReviews_wrapper .dcReviewText {
    line-height: 1.45 !important;
  }
  .zombieReviews_title {
    font-size: 22px !important;
  }
  .zombieReviews_buttons {
    position: static !important;
    transform: none !important;
    justify-content: center;
    margin-top: 8px;
  }

  /* Product / home videos don't spill edge-to-edge */
  .product-videos {
    padding: 18px 14px !important;
    margin-top: 20px !important;
  }
  .product-videos .title {
    font-size: 20px !important;
  }
  .product-videos_grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  .zombieProductVideo,
  .zombieVideos_slide,
  .product-videos iframe {
    max-width: 100% !important;
  }

  /* Floating cart above bottom nav */
  [data-zombie-cart-link] {
    right: 14px !important;
    bottom: 72px !important;
    min-width: 48px !important;
    height: 48px !important;
    padding: 0 12px !important;
  }

  /* Komerza checkout embed — keep inside the phone frame */
  html.zombie-embed-open,
  html.zombie-embed-open body {
    overflow: hidden !important;
  }
  iframe[src*="checkout.komerza.com"],
  iframe[src*="embed.komerza"],
  iframe[src*="komerza.com/embed"] {
    max-width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 24px) !important;
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - 24px) !important;
    border-radius: 12px !important;
  }
  /* Outer shell Komerza mounts (fixed overlay wrappers) */
  body > div:has(> iframe[src*="komerza"]),
  body > div:has(iframe[src*="checkout.komerza"]) {
    padding: 10px 8px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
}
