/* =========================================================
   HOMEPAGE HIERARCHY — final typography and featured showcase
   Loaded last so homepage has one clear visual hierarchy while
   keeping catalog, checkout, invoice, and shared modal behavior intact.
   ========================================================= */

.storefront-homepage {
  --home-heading-serif: 'Source Serif 4', Georgia, serif;
  --home-heading-sans: 'Manrope', sans-serif;
}

/* Hero: one editorial lead, one decisive accent, no duplicate metadata row. */
.storefront-homepage .storefront-hero-inner {
  padding-top: clamp(2.15rem, 4vw, 3.6rem);
  padding-bottom: clamp(2.8rem, 4.8vw, 4.25rem);
}

.storefront-homepage .storefront-hero-copy {
  max-width: 38rem;
}

.storefront-homepage .storefront-hero-title-split {
  max-width: 11.5ch;
  display: flex;
  flex-direction: column;
  gap: 0.04em;
  margin-top: 0.88rem;
  color: var(--home-text);
  font-family: var(--home-heading-serif);
  font-size: clamp(3rem, 5vw, 4.65rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.048em;
  text-wrap: balance;
}

.storefront-homepage .storefront-hero-title-split span {
  color: inherit;
  font: inherit;
}

.storefront-homepage .storefront-hero-title-split strong {
  width: fit-content;
  color: var(--home-primary);
  font-family: var(--home-heading-sans);
  font-size: 0.84em;
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -0.055em;
}

.storefront-homepage .storefront-hero-description {
  max-width: 35rem;
  margin-top: 1.05rem;
  color: var(--home-text-soft);
  font-size: clamp(0.92rem, 1.35vw, 1.02rem);
  font-weight: 520;
  line-height: 1.65;
}

.storefront-homepage .storefront-hero-actions {
  margin-top: 1.35rem;
}

/* Section hierarchy: serif statement + bold Manrope accent, no repeated eyebrow/copy stack. */
.storefront-homepage .storefront-home-shell {
  padding-top: clamp(3.7rem, 6vw, 5.4rem);
  padding-bottom: clamp(3.7rem, 6vw, 5.4rem);
}

.storefront-homepage .storefront-home-section-header,
.storefront-homepage .storefront-faq-copy {
  display: grid;
  gap: 0;
  align-items: end;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--home-border);
}

.storefront-homepage .storefront-section-title-split {
  max-width: 18ch;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 0.22em;
  color: var(--home-text);
  font-family: var(--home-heading-serif);
  font-size: clamp(2.05rem, 3.2vw, 3rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.storefront-homepage .storefront-section-title-split span {
  color: inherit;
  font: inherit;
}

.storefront-homepage .storefront-section-title-split strong {
  color: var(--home-primary);
  font-family: var(--home-heading-sans);
  font-size: 0.82em;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.storefront-homepage .storefront-catalog-button {
  min-height: 2.85rem;
  gap: 0.58rem;
  padding: 0.72rem 1rem 0.72rem 1.08rem;
  border-color: var(--home-primary);
  color: #fff;
  background: var(--home-primary);
  font-size: 0.76rem;
  font-weight: 800;
}

.storefront-homepage .storefront-catalog-button:hover {
  color: #fff;
  border-color: var(--home-primary-hover);
  background: var(--home-primary-hover);
  box-shadow: 0 10px 22px rgba(31, 64, 48, 0.12);
  transform: translateY(-2px);
}

.storefront-homepage .storefront-home-section-content,
.storefront-homepage .storefront-featured-products .storefront-featured-grid {
  margin-top: 1.25rem;
}

/* Featured showcase follows the catalogue card hierarchy. */
.storefront-homepage .storefront-featured-grid {
  gap: 1.05rem;
}

.storefront-homepage .storefront-featured-card.product-showcase-card,
.storefront-homepage .storefront-product-card.product-card-v2 {
  border-radius: 1.05rem;
  box-shadow: 0 16px 36px rgba(31, 64, 48, 0.055);
}

.storefront-homepage .storefront-featured-card.product-showcase-card:hover {
  border-color: var(--home-border-strong);
  box-shadow: 0 20px 42px rgba(31, 64, 48, 0.11);
  transform: translateY(-5px);
}

.storefront-homepage .storefront-featured-card .product-showcase-card-media,
.storefront-homepage .storefront-featured-card .storefront-product-image.product-showcase-card-media {
  aspect-ratio: 1.18 / 1;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-body,
.storefront-homepage .storefront-featured-card .product-card-v2-body.product-showcase-card-body {
  gap: 0;
  padding: 1rem;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-copy {
  display: grid;
  gap: 0.3rem;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-title,
.storefront-homepage .storefront-featured-card .product-card-v2-title.product-showcase-card-title {
  min-height: 0;
  margin: 0;
  color: var(--home-text);
  font-family: var(--home-heading-sans);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: -0.025em;
  -webkit-line-clamp: 2;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-description,
.storefront-homepage .storefront-featured-card .product-card-v2-description.product-showcase-card-description {
  min-height: 1.45em;
  max-height: 1.45em;
  margin: 0;
  color: var(--home-text-soft);
  font-family: var(--home-heading-sans);
  font-size: 0.7rem;
  font-weight: 540;
  line-height: 1.45;
  -webkit-line-clamp: 1;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-footer,
.storefront-homepage .storefront-featured-card .product-card-v2-footer.product-showcase-card-footer {
  margin-top: 0.78rem;
  padding-top: 0.72rem;
  border-top: 1px solid var(--home-border);
}

.storefront-homepage .storefront-featured-card .product-showcase-card-price-panel {
  align-items: baseline;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-price-label {
  color: var(--home-text-muted);
  font-size: 0.57rem;
  font-weight: 800;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-price,
.storefront-homepage .storefront-featured-card .product-card-v2-price.product-showcase-card-price {
  color: var(--home-primary);
  font-size: 1.02rem;
  font-weight: 800;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-actions,
.storefront-homepage .storefront-featured-card .product-card-v2-actions.product-showcase-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
  margin-top: 0.72rem;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-buy,
.storefront-homepage .storefront-featured-card .product-showcase-card-stock-out {
  order: 1;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-detail {
  order: 2;
}

.storefront-homepage .storefront-featured-card .product-showcase-card-detail,
.storefront-homepage .storefront-featured-card .product-showcase-card-buy,
.storefront-homepage .storefront-featured-card .product-showcase-card-stock-out {
  width: 100%;
  min-height: 2.55rem;
  font-size: 0.68rem;
}

/* Supporting sections: stronger content, less muted metadata. */
.storefront-homepage .storefront-benefit-card {
  gap: 0.8rem;
}

.storefront-homepage .storefront-benefit-title,
.storefront-homepage .storefront-faq-question,
.storefront-homepage .storefront-testimonial-name {
  color: var(--home-text);
  font-family: var(--home-heading-sans);
  font-weight: 800;
}

.storefront-homepage .storefront-benefit-description,
.storefront-homepage .storefront-faq-answer,
.storefront-homepage .storefront-testimonial-quote {
  color: var(--home-text-soft);
  font-weight: 520;
}

.storefront-homepage .storefront-testimonial-card {
  padding: 1.25rem;
}

.storefront-homepage .storefront-testimonial-quote {
  margin-top: 0;
  font-size: 0.86rem;
  line-height: 1.68;
}

.storefront-homepage .storefront-testimonial-role {
  color: var(--home-text-muted);
  font-size: 0.65rem;
  font-weight: 650;
}

.storefront-homepage .storefront-faq-layout {
  gap: 1.5rem 3rem;
}

.storefront-homepage .storefront-faq-copy {
  align-self: start;
}

.storefront-homepage .storefront-faq-item summary {
  min-height: 3.6rem;
}

.storefront-homepage .storefront-faq-answer {
  max-width: 56rem;
}

/* Cohesive dark hierarchy with visible section boundaries. */
html[data-theme='dark'] body.storefront-homepage {
  --home-canvas: #08140f;
  --home-surface: #102119;
  --home-surface-soft: #13271e;
  --home-surface-muted: #183126;
  --home-text: #f1f5f1;
  --home-text-soft: #c1cec5;
  --home-text-muted: #91a398;
  --home-primary: #a5d4b5;
  --home-primary-hover: #b9e1c5;
  --home-border: #284438;
  --home-border-strong: #355849;
}

html[data-theme='dark'] body.storefront-homepage .storefront-home-band,
html[data-theme='dark'] body.storefront-homepage .storefront-hero {
  border-bottom: 1px solid var(--home-border);
}

html[data-theme='dark'] body.storefront-homepage .storefront-home-band-muted {
  border-block-color: var(--home-border);
  background: #0d1c15;
}

html[data-theme='dark'] body.storefront-homepage .storefront-featured-card.product-showcase-card,
html[data-theme='dark'] body.storefront-homepage .storefront-product-card.product-card-v2,
html[data-theme='dark'] body.storefront-homepage .storefront-testimonial-card,
html[data-theme='dark'] body.storefront-homepage .storefront-faq-item {
  border-color: var(--home-border);
  background: var(--home-surface);
  box-shadow: none;
}

html[data-theme='dark'] body.storefront-homepage .storefront-featured-card .product-showcase-card-body,
html[data-theme='dark'] body.storefront-homepage .storefront-featured-card .product-card-v2-body.product-showcase-card-body {
  background: var(--home-surface);
}

html[data-theme='dark'] body.storefront-homepage .storefront-featured-card .product-showcase-card-detail {
  color: var(--home-text);
  border-color: var(--home-border-strong);
  background: transparent;
}

html[data-theme='dark'] body.storefront-homepage .storefront-featured-card .product-showcase-card-buy {
  color: #0a1711;
  border-color: var(--home-primary);
  background: var(--home-primary);
}

html[data-theme='dark'] body.storefront-homepage .storefront-catalog-button {
  color: #0a1711;
  border-color: var(--home-primary);
  background: var(--home-primary);
}

@media (max-width: 767px) {
  .storefront-homepage .storefront-hero-title-split {
    max-width: 10.5ch;
    font-size: clamp(2.55rem, 13.3vw, 3.55rem);
  }

  .storefront-homepage .storefront-hero-title-split strong {
    font-size: 0.8em;
  }

  .storefront-homepage .storefront-hero-description {
    max-width: 31rem;
    font-size: 0.88rem;
    line-height: 1.58;
  }

  .storefront-homepage .storefront-home-shell {
    padding-top: 3.25rem;
    padding-bottom: 3.25rem;
  }

  .storefront-homepage .storefront-section-title-split {
    max-width: 14ch;
    font-size: clamp(1.75rem, 8.2vw, 2.35rem);
  }

  .storefront-homepage .storefront-catalog-button {
    width: 100%;
  }

  .storefront-homepage .storefront-featured-grid {
    display: flex;
    gap: 0.82rem;
    margin-inline: -1.25rem;
    padding: 0 1.25rem 0.55rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .storefront-homepage .storefront-featured-grid::-webkit-scrollbar {
    display: none;
  }

  .storefront-homepage .storefront-featured-grid > .storefront-featured-card {
    flex: 0 0 min(78vw, 20rem);
    scroll-snap-align: start;
  }

  .storefront-homepage .storefront-featured-card .product-showcase-card-media,
  .storefront-homepage .storefront-featured-card .storefront-product-image.product-showcase-card-media {
    aspect-ratio: 1.28 / 1;
  }

  .storefront-homepage .storefront-featured-card .product-showcase-card-copy {
    display: grid;
    grid-template-rows: auto auto;
    gap: 0.28rem;
  }

  .storefront-homepage .storefront-featured-card .product-showcase-card-title,
  .storefront-homepage .storefront-featured-card .product-card-v2-title.product-showcase-card-title {
    min-height: 0;
    font-size: 0.9rem;
  }

  .storefront-homepage .storefront-featured-card .product-showcase-card-description,
  .storefront-homepage .storefront-featured-card .product-card-v2-description.product-showcase-card-description {
    min-height: 1.45em;
    max-height: 1.45em;
    font-size: 0.68rem;
  }

  .storefront-homepage .storefront-benefit-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .storefront-homepage .storefront-benefit-card,
  .storefront-homepage .storefront-benefit-card + .storefront-benefit-card {
    padding: 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--home-border);
  }

  .storefront-homepage .storefront-benefit-card:nth-child(odd) {
    border-right: 1px solid var(--home-border);
  }

  .storefront-homepage .storefront-benefit-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .storefront-homepage .storefront-testimonial-layout {
    gap: 0.82rem;
  }
}

@media (max-width: 359px) {
  .storefront-homepage .storefront-featured-grid > .storefront-featured-card {
    flex-basis: 84vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .storefront-homepage .storefront-featured-card.product-showcase-card,
  .storefront-homepage .storefront-featured-card .product-showcase-card-image-wrap img {
    transition: none;
  }
}
