/* BHJ Coupon responsive fix — tablet/mobile (v20261002f)
   Targets: form overflow, hero centering/padding,
   leftover blowouts. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.page,
.section,
.hero,
.visit,
.guarantee,
.showroom-cta,
.collection-grid,
.gia-grid,
.reviews-grid,
.action-row,
.form-panel,
.hero-copy,
.trust,
.product-card,
.product-image {
  max-width: 100%;
  min-width: 0;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* ===== A) Form: kill min-content / iti / flex overflow ===== */
.form-panel,
#f9p2x,
#iauju6,
#iauju6.ll-empty-block,
.ll-form,
#it1r4o,
#it1r4o.ll-form,
[class*="klaviyo-form"],
.ll-form__input-w,
.ll-form__input-w--ch,
.coupon-form {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

#iauju6 {
  align-items: stretch !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.ll-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.ll-form select,
.ll-form textarea,
.ll-form__input-i,
.ll-form__input-textarea,
.ll-form__input-date,
.iti,
.iti input,
.iti__tel-input,
input.ll-form__input-i,
textarea.ll-form__input-textarea {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

.iti {
  display: block !important;
}

.iti__flag-container {
  flex-shrink: 0;
}

#ieo6l7,
.ll-form button[type="submit"],
.ll-btn-temp {
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* Images that GrapesJS blew out */
#j5e8v {
  max-width: 100% !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
#bq0do {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
}
#s6j2a {
  height: auto !important;
}
#c3f7w {
  width: 100% !important;
  max-width: 100% !important;
}
.load-more,
.visit-copy .btn {
  min-height: 44px;
}

/* ===== Tablet + below (≤1023) ===== */
@media (max-width: 1023px) {
  #c3f7w {
    width: 100% !important;
    max-width: 36rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  #p6w3j,
  .gia-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .collection-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px;
  }
  .reviews-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .hero-copy,
  .form-panel,
  .showroom-cta {
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* B) Hero: balanced padding + centered stack */
  .hero-copy,
  #r6t9b {
    height: auto !important;
    min-height: 0 !important;
    padding: 40px 22px !important;
    align-items: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .hero-copy h1,
  #a8k2m {
    width: 100% !important;
    max-width: 22em !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-wrap: balance;
    box-sizing: border-box !important;
  }

  .hero-copy p,
  #c3f7w {
    width: 100% !important;
    max-width: 36rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
    text-wrap: pretty;
    box-sizing: border-box !important;
  }

  #q9v2d {
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
  }

  .section {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .form-panel,
  #f9p2x {
    padding: 32px 20px !important;
  }

  .action-row {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 12px !important;
  }
  .action-row .btn {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  /* Trust logos row — wrap rather than shrink tiny */
  #jan1e {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 16px 28px !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    box-sizing: border-box !important;
  }
  #i8tncc {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }
  #p7a3b,
  #ivqd3,
  #iazax {
    width: auto !important;
    max-width: none !important;
    min-width: 88px !important;
    height: 36px !important;
    min-height: 32px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
  }
  #j5e8v {
    height: auto !important;
    max-height: 432px;
  }
}

/* ===== Phone (≤767) ===== */
@media (max-width: 767px) {
  #p6w3j,
  .collection-grid,
  .gia-grid,
  .reviews-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .hero-copy,
  #r6t9b {
    padding: 36px 18px !important;
    min-height: 0 !important;
  }

  .form-panel,
  #f9p2x {
    padding: 28px 18px !important;
  }

  .section,
  #q9v2d {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* C) Tighten type so lines wrap evenly */
  .hero-copy h1,
  #a8k2m {
    font-size: clamp(26px, 7.2vw, 36px) !important;
    letter-spacing: -0.02em !important;
    line-height: 1.12 !important;
    max-width: 100% !important;
    text-wrap: balance;
  }

  .hero-copy p,
  #c3f7w {
    font-size: clamp(14px, 3.9vw, 16px) !important;
    line-height: 1.5 !important;
    max-width: 100% !important;
    text-wrap: pretty;
  }

  .section p,
  .visit-copy p,
  .guarantee p {
    font-size: clamp(14px, 3.8vw, 16px) !important;
    text-wrap: pretty;
  }

  .section h2,
  .section h3,
  .showroom-cta h2,
  .visit-copy h2 {
    text-wrap: balance;
    max-width: 100% !important;
  }

  #r6t9b {
    min-height: 320px;
    padding-bottom: 36px !important;
  }

  /* Trust logos — fixed readable size; wrap 2+1 if needed */
  #jan1e {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 14px 22px !important;
    width: 100% !important;
  }
  #p7a3b,
  #ivqd3,
  #iazax {
    width: auto !important;
    max-width: none !important;
    min-width: 92px !important;
    height: 36px !important;
    min-height: 32px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    flex: 0 0 auto !important;
  }

  #o9eyl {
    font-size: clamp(14px, 3.8vw, 16px) !important;
    line-height: 1.4 !important;
    text-wrap: pretty;
  }

  /* Re-assert form containment after GrapesJS ≤576/992 ID rules */
  .form-panel,
  #f9p2x,
  #iauju6,
  .ll-form,
  #it1r4o,
  [class*="klaviyo-form"],
  .ll-form__input-w {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .ll-form input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  .ll-form select,
  .ll-form textarea,
  .ll-form__input-i,
  .ll-form__input-textarea,
  .iti,
  .iti input,
  .iti__tel-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  .action-row,
  .action-row .btn {
    width: 100% !important;
    max-width: 100% !important;
  }
}

/* ===== Narrow (~375–430) ===== */
@media (max-width: 430px) {
  .hero-copy,
  #r6t9b {
    padding: 32px 16px !important;
  }

  .form-panel,
  #f9p2x {
    padding: 24px 16px !important;
  }

  .section,
  #q9v2d {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .btn,
  #ieo6l7,
  .ll-form button[type="submit"] {
    font-size: 15px !important;
    min-height: 48px !important;
  }

  #p7a3b,
  #ivqd3,
  #iazax {
    min-width: 80px !important;
    height: 32px !important;
    min-height: 28px !important;
    max-height: 36px !important;
  }

  #c3f7w,
  #a8k2m {
    width: 100% !important;
    max-width: 100% !important;
  }
}
