/* Унікальні оболонки секцій головної */

.home-section {
  position: relative;
  padding-block: var(--space-2xl);
}

/* 01 — категорії: топо-сітка + рейл */
.home-section--categories {
  background-color: var(--color-bg-primary);
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 20h40M20 0v40' stroke='%23323A2E' stroke-width='0.35' fill='none' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 40px 40px;
  overflow: hidden;
}

/* 02 — бренди: річка логотипів */
.home-section--brands {
  background-color: var(--color-bg-secondary);
  border-block: 1px solid var(--color-border-subtle);
  padding-bottom: 0;
  overflow: hidden;
}

.home-section--brands .container {
  position: relative;
}

.home-section--brands .container::before {
  content: '';
  position: absolute;
  top: calc(-1 * var(--space-2xl));
  bottom: 0;
  left: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--color-accent) 0%, transparent 92%);
  border-radius: 0 2px 2px 0;
  pointer-events: none;
}

/* 03 — товари */
.home-section--products {
  background-color: var(--color-bg-primary);
  padding-top: var(--space-2xl);
  border-top: 1px solid var(--color-border-subtle);
}

.home-section--brands + .home-section--products {
  margin-top: var(--space-2xl);
  padding-top: var(--space-3xl);
}

.home-section--products + .home-section--benefits {
  margin-top: var(--space-2xl);
}

/* 04 — цінності: компас */
.home-section--benefits {
  background-color: var(--color-bg-secondary);
  padding-block: var(--space-3xl);
  background-image:
    radial-gradient(ellipse 70% 55% at 50% 55%, rgba(205, 176, 106, 0.06) 0%, transparent 70%);
}

/* ── Заголовки секцій ── */

.section-head {
  margin-bottom: var(--space-xl);
}

.section-head__marker {
  font-family: var(--font-display);
  line-height: 1;
  color: var(--color-accent);
  letter-spacing: 0.04em;
}

.section-head__title {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0;
  line-height: 1.1;
}

.section-head__meta {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  line-height: 1.4;
  margin: 0;
}

/* 01 rail */
.section-head--rail {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-md) var(--space-lg);
  align-items: center;
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-head--rail .section-head__marker {
  font-size: clamp(2rem, 5vw, 3.5rem);
  opacity: 0.6;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--color-border-subtle);
  padding-right: var(--space-md);
  min-width: 2.75ch;
}

.section-head--rail .section-head__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-xs);
  min-width: 0;
}

/* 02 split */
.section-head--split {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md) var(--space-xl);
  margin-bottom: var(--space-2xl);
}

.section-head--split .section-head__lead {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  min-width: 0;
}

.section-head--split .section-head__eyebrow {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--color-accent);
}

.section-head--split .section-head__marker {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  opacity: 0.5;
}

.section-head--split .section-head__title-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* 03 editorial */
.section-head--editorial {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border-subtle);
}

.section-head--editorial .section-head__stack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-xs);
  min-width: 0;
}

.section-head--editorial .section-head__marker {
  font-size: clamp(1.25rem, 3vw, 2rem);
  opacity: 0.6;
}

.section-head--editorial .section-head__aside {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--color-text-muted);
  line-height: 1.4;
}

@media (min-width: 768px) {
  .section-head--editorial {
    grid-template-columns: 1fr auto;
    align-items: end;
  }

  .section-head--editorial .section-head__aside {
    text-align: right;
    max-width: 14ch;
  }
}

/* 04 stripe — сітка без кривих flex-wrap ліній */
.section-head--stripe {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "marker title tag"
    "line line line";
  column-gap: var(--space-md);
  row-gap: var(--space-sm);
  align-items: center;
  margin-bottom: var(--space-xl);
}

.section-head--stripe .section-head__marker {
  grid-area: marker;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  opacity: 0.6;
}

.section-head--stripe .section-head__title {
  grid-area: title;
  min-width: 0;
}

.section-head--stripe .section-head__tag {
  grid-area: tag;
  font-size: 0.5625rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-accent);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--color-border);
  background-color: var(--color-bg-elevated);
  white-space: nowrap;
}

.section-head--stripe::after {
  grid-area: line;
  content: '';
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--color-border-strong), transparent);
}

@media (max-width: 767px) {
  .section-head--split {
    flex-direction: column;
    align-items: flex-start;
  }

  .section-head--rail {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .section-head--rail .section-head__marker {
    align-self: auto;
    border-right: none;
    border-bottom: 1px solid var(--color-border-subtle);
    padding-right: 0;
    padding-bottom: var(--space-sm);
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
  }

  .section-head--stripe {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "marker title"
      "tag tag"
      "line line";
  }

  .section-head--stripe .section-head__tag {
    justify-self: start;
  }
}
