/**
 * Astral Commerce 3.5.2 — Product details flow correction.
 *
 * The previous layout removed hero minimum heights but three independent
 * spacing layers remained: after-summary margin, product-story padding and
 * the first PDP section's top padding. Together they created the large blank
 * area beneath the gallery. This file collapses those layers into one
 * controlled gap.
 */

.acp-product-detail-page .acp-product-hero {
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.acp-product-detail-page .acp-product-after-summary {
  min-height: 0 !important;
  height: auto !important;
  margin-top: clamp(28px, 3vw, 42px) !important;
  padding-top: 0 !important;
}

/* Retire the legacy 76–120px story spacer. */
.acp-product-detail-page .acp-product-story {
  min-height: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* The first visible details section must not add another 62–92px above its
 * heading. Later sections retain their normal vertical rhythm. */
.acp-product-detail-page .acp-product-story > .acp-pdp-section:first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.acp-product-detail-page .acp-product-after-summary > :first-child,
.acp-product-detail-page .acp-product-story > :first-child {
  margin-top: 0 !important;
}

@media (max-width: 979px) {
  .acp-product-detail-page .acp-product-after-summary {
    margin-top: 34px !important;
  }
}

@media (max-width: 640px) {
  .acp-product-detail-page .acp-product-after-summary {
    margin-top: 28px !important;
  }
}
