/* One homepage section gap, shared by the content and footer placements. */
body#index {
  --pinksparkle-section-gap: 40px;
}

body#index .page-content--home {
  row-gap: var(--pinksparkle-section-gap) !important;
}

/* Retain horizontal centering and each module's internal content spacing. */
body#index .page-content--home > section {
  margin-block: 0 !important;
}

/* Our Story needs a tighter transition from the preceding product section. */
body#index .page-content--home > .palms-about.beautys-about {
  margin-top: calc(16px - var(--pinksparkle-section-gap)) !important;
  padding-top: 0;
}

/* Compact, balanced spacing around Our Products. */
body#index .page-content--home > .dazzle-home-faq {
  padding-bottom: 0;
}
body#index .page-content--home > .dazzle-brand-story {
  margin-block: calc(48px - var(--pinksparkle-section-gap)) !important;
  padding-block: 0;
}

body#index .page-content--home > .pinksparkle-products {
  margin-top: calc(48px - var(--pinksparkle-section-gap)) !important;
  padding-block: 0;
}

/* Our Products is the final home section, followed by the newsletter. */
body#index:has(.page-content--home > .pinksparkle-products) #footer > .pinksparkle-newsletter {
  margin-top: 48px !important;
}

body#index .page-content--home > .palms-countdown {
  border-top-width: 0 !important;
}

/* No additional wrapper padding between the final home section and footer. */
body#index #center-column {
  padding-bottom: 0 !important;
}

body#index #footer > :is(.pinksparkle-newsletter, .beautys-services, .mona-instagram, .beautys-footer) {
  margin-top: var(--pinksparkle-section-gap) !important;
  margin-bottom: 0 !important;
}

/* Avoid stacking services bottom padding, section gap and gallery top padding. */
body#index #footer > .beautys-services {
  padding-bottom: 12px;
}
body#index #footer > .mona-instagram {
  margin-top: 16px !important;
  padding-top: 0;
}

@media (max-width: 767px) {
  body#index {
    --pinksparkle-section-gap: 24px;
  }
  body#index .page-content--home > .palms-about.beautys-about {
    margin-top: calc(12px - var(--pinksparkle-section-gap)) !important;
  }
  body#index .page-content--home > .pinksparkle-products {
    margin-top: calc(32px - var(--pinksparkle-section-gap)) !important;
  }
  body#index:has(.page-content--home > .pinksparkle-products) #footer > .pinksparkle-newsletter {
    margin-top: 32px !important;
  }
  body#index #footer > .mona-instagram {
    margin-top: 12px !important;
  }
  body#index .page-content--home > .dazzle-brand-story {
    margin-block: calc(32px - var(--pinksparkle-section-gap)) !important;
  }
}
