/*
 * One-plate hero for the resin sub-sections «до 1 см» and «1+ см» (owner, 10 Nov 2026).
 * template-parts/commerce/resin-layer-hero.php. Loaded only on those two categories.
 * The category-hero rules of the resin section style a different layout, so this file resets them on the plate.
 */

.em26-category-hero.em26-layer-hero {
  display: block !important;
  position: relative;
  min-height: 0 !important;
  margin: 0 0 2rem !important;
  padding: 2.25rem 2.5rem 0 !important;
  overflow: hidden !important;
  border: 1px solid rgba(22, 53, 61, 0.1) !important;
  border-radius: 22px !important;
  background: var(--em26-surface, #fffefa) !important;
  box-shadow: 0 1px 0 rgba(22, 53, 61, 0.04), 0 24px 48px -36px rgba(22, 53, 61, 0.35) !important;
}

.em26-category-hero.em26-layer-hero::before,
.em26-category-hero.em26-layer-hero::after {
  content: none !important;
}

.em26-layer-hero__top {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 2.75rem;
  align-items: stretch;
}

.em26-layer-hero--no-chart .em26-layer-hero__top {
  grid-template-columns: minmax(0, 1fr);
}

.em26-layer-hero .em26-category-hero__content {
  display: flex;
  flex-direction: column;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.em26-layer-hero .em26-eyebrow {
  margin: 0 !important;
}

.em26-layer-hero h1 {
  max-width: 14ch;
  margin: 0.9rem 0 1rem !important;
  font-size: clamp(2rem, 1.25rem + 2vw, 2.9rem) !important;
  line-height: 1.03 !important;
  letter-spacing: -0.028em !important;
  text-wrap: balance;
}

.em26-layer-hero .em26-category-hero__lead {
  max-width: 34rem !important;
  margin: 0 !important;
  color: #5d7075 !important;
  font-size: 1.05rem !important;
  line-height: 1.55 !important;
}

/* ---------- layer chart ---------- */

.em26-layer-chart {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding-left: 2.75rem;
  border-left: 1px solid rgba(22, 53, 61, 0.1);
}

.em26-layer-chart__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}

.em26-layer-chart__title {
  margin: 0;
  color: var(--em26-ink, #16353d);
  font: 600 0.72rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.em26-layer-chart__legend {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: #5d7075;
  font: 500 0.68rem/1 "IBM Plex Mono", monospace;
}

.em26-layer-chart__grad {
  width: 1.8rem;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(90deg, #129a9a, #1d5dbb, #b31368);
}

.em26-layer-chart__dash {
  width: 1.4rem;
  height: 6px;
  margin-left: 0.5rem;
  border: 1.5px dashed rgba(22, 53, 61, 0.34);
  border-left: 0;
  border-radius: 0 4px 4px 0;
}

.em26-layer-chart__plot {
  --n: 10.5rem;
  --v: 4.75rem;
  position: relative;
  padding-top: 1.4rem;
}

.em26-layer-chart__axis {
  position: absolute;
  top: 0;
  right: var(--v);
  bottom: 0;
  left: var(--n);
  pointer-events: none;
}

.em26-layer-chart__zone {
  position: absolute;
  top: 1.1rem;
  bottom: 0;
  border-radius: 6px;
  background: rgba(18, 154, 154, 0.07);
}

.em26-layer-chart__tick {
  position: absolute;
  top: 0;
  bottom: 0;
  border-left: 1px dotted rgba(22, 53, 61, 0.16);
}

.em26-layer-chart__tick b {
  position: absolute;
  top: 0;
  transform: translateX(-50%);
  color: #5d7075;
  font: 500 0.66rem/1 "IBM Plex Mono", monospace;
  white-space: nowrap;
}

.em26-layer-chart__tick.is-first {
  border-left-color: transparent;
}

.em26-layer-chart__tick.is-first b {
  transform: none;
}

.em26-layer-chart__tick.is-last b {
  transform: translateX(-100%);
}

.em26-layer-chart__row {
  display: grid;
  grid-template-columns: var(--n) minmax(0, 1fr) var(--v);
  align-items: center;
  min-height: 2.75rem;
  border-radius: 10px;
  color: var(--em26-ink, #16353d) !important;
  text-decoration: none !important;
}

.em26-layer-chart__row + .em26-layer-chart__row {
  border-top: 1px solid rgba(22, 53, 61, 0.06);
}

.em26-layer-chart__row:hover .em26-layer-chart__name {
  color: var(--em26-cobalt, #1d5dbb);
}

.em26-layer-chart__row:focus-visible {
  outline: 2px solid var(--em26-cobalt, #1d5dbb);
  outline-offset: 3px;
}

.em26-layer-chart__name {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-right: 0.75rem;
  font: 700 0.92rem/1.15 Manrope, "Manrope Fallback", "Manrope Fallback Roboto", sans-serif;
}

.em26-layer-chart__name small {
  color: #5d7075;
  font: 500 0.66rem/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.02em;
}

.em26-layer-chart__track {
  position: relative;
  height: 10px;
}

.em26-layer-chart__bar {
  position: absolute;
  top: 0;
  height: 10px;
  border-radius: 6px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 62%, #fff), var(--c) 60%);
  box-shadow: 0 3px 8px -4px var(--c);
  transform-origin: left center;
  animation: em26-layer-grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  animation-delay: var(--d);
}

.em26-layer-chart__bar--ext {
  box-sizing: border-box;
  border: 1.5px dashed var(--c);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  background: none;
  box-shadow: none;
}

@keyframes em26-layer-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .em26-layer-chart__bar { animation: none; }
}

.em26-layer-chart__val {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.1rem;
  color: var(--em26-ink, #16353d);
  font: 600 0.74rem/1.2 "IBM Plex Mono", monospace;
  text-align: right;
}

.em26-layer-chart__val small {
  color: #5d7075;
  font: 500 0.64rem/1 "IBM Plex Mono", monospace;
}

/* ---------- «Коротко про вибір» as one strip (text unchanged) ---------- */

.em26-layer-hero .em26-resin-geo-answer {
  display: grid !important;
  grid-template-columns: 8.5rem minmax(0, 1fr);
  gap: 0 2rem;
  max-width: none !important;
  margin: 2rem -2.5rem 0 !important;
  padding: 1.25rem 2.5rem !important;
  border: 0 !important;
  border-top: 1px solid rgba(22, 53, 61, 0.1) !important;
  border-radius: 0 !important;
  background: var(--em26-paper, #f7f4ec) !important;
  box-shadow: none !important;
}

.em26-layer-hero .em26-resin-geo-answer::before,
.em26-layer-hero .em26-resin-geo-answer::after {
  content: none !important;
}

.em26-layer-hero .em26-resin-geo-answer__title {
  margin: 0.15rem 0 0 !important;
  color: var(--em26-turquoise, #129a9a) !important;
  font: 600 0.72rem/1.35 "IBM Plex Mono", monospace !important;
  letter-spacing: 0.09em !important;
  text-transform: uppercase;
}

.em26-layer-hero .em26-resin-geo-answer__grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
}

.em26-layer-hero .em26-resin-geo-answer__item {
  margin: 0 !important;
  padding: 0 1.25rem !important;
  border: 0 !important;
  border-left: 1px solid rgba(22, 53, 61, 0.12) !important;
  background: none !important;
  box-shadow: none !important;
}

.em26-layer-hero .em26-resin-geo-answer__item:first-child {
  padding-left: 0 !important;
  border-left: 0 !important;
}

.em26-layer-hero .em26-resin-geo-answer__item strong {
  display: block;
  margin: 0 0 0.25rem;
  color: var(--em26-ink, #16353d);
  font: 700 0.8rem/1.3 Manrope, "Manrope Fallback", "Manrope Fallback Roboto", sans-serif;
}

.em26-layer-hero .em26-resin-geo-answer__item p {
  margin: 0 !important;
  color: #5d7075 !important;
  font-size: 0.85rem !important;
  line-height: 1.45 !important;
}

.em26-layer-hero .em26-resin-geo-answer a {
  color: var(--em26-cobalt, #1d5dbb) !important;
  font-weight: 600;
}

/* ---------- RESIN PRO: one quiet line ---------- */

.em26-layer-hero__foot {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 -2.5rem;
  padding: 0.55rem 2.5rem 0.65rem;
  border-top: 1px solid rgba(22, 53, 61, 0.06);
  background: var(--em26-paper, #f7f4ec);
}

.em26-layer-hero__foot .em26-resin-pro-mark {
  display: inline-flex !important;
  flex: none;
  width: auto !important;
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0.2rem 0.4rem !important;
  position: static !important;
  transform: none !important;
  border-radius: 5px !important;
  box-shadow: none !important;
}

.em26-layer-hero__foot .em26-resin-pro-mark img {
  display: block;
  width: 4.1rem !important;
  height: auto !important;
}

.em26-layer-hero__foot .em26-category-hero__trust {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  box-shadow: none !important;
  color: #5d7075 !important;
  font-size: 0.74rem !important;
  line-height: 1.4 !important;
}

.em26-layer-hero__foot .em26-category-hero__trust::before {
  content: none !important;
}

.em26-layer-hero__foot .em26-category-hero__trust strong {
  color: #5d7075 !important;
  font-weight: 600 !important;
}

/* ---------- tablet ---------- */

@media (max-width: 63.99rem) {
  .em26-category-hero.em26-layer-hero { padding: 1.75rem 1.75rem 0 !important; }
  .em26-layer-hero__top { grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
  .em26-layer-chart { padding: 1.5rem 0 0; border-top: 1px solid rgba(22, 53, 61, 0.1); border-left: 0; }
  .em26-layer-hero .em26-resin-geo-answer { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; margin: 1.75rem -1.75rem 0 !important; padding: 1.25rem 1.75rem !important; }
  .em26-layer-hero .em26-resin-geo-answer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 1rem 0 !important; }
  .em26-layer-hero .em26-resin-geo-answer__item:nth-child(3) { padding-left: 0 !important; border-left: 0 !important; }
  .em26-layer-hero__foot { margin: 0 -1.75rem; padding: 0.55rem 1.75rem; }
}

/* ---------- phone ---------- */

@media (max-width: 37.5rem) {
  .em26-category-hero.em26-layer-hero { margin-right: -0.25rem !important; margin-left: -0.25rem !important; padding: 1.4rem 1rem 0 !important; border-radius: 16px !important; }
  .em26-layer-hero h1 { max-width: none; }
  .em26-layer-chart__plot { --n: 7.4rem; --v: 4.6rem; }
  .em26-layer-chart__name { font-size: 0.84rem; }
  .em26-layer-chart__val { font-size: 0.68rem; }
  .em26-layer-chart__tick:not(.is-key) b { display: none; }
  .em26-layer-hero .em26-resin-geo-answer { margin: 1.5rem -1rem 0 !important; padding: 1.1rem 1rem !important; }
  .em26-layer-hero .em26-resin-geo-answer__grid { grid-template-columns: minmax(0, 1fr) !important; gap: 0.85rem !important; }
  .em26-layer-hero .em26-resin-geo-answer__item { padding: 0 !important; border: 0 !important; }
  .em26-layer-hero__foot { align-items: flex-start; margin: 0 -1rem; padding: 0.6rem 1rem; }
  .em26-layer-hero__foot .em26-resin-pro-mark { align-self: flex-start !important; margin-left: 0 !important; }
}

/* Narrow phones (320–360 px): a wider plot and no «1 мм» label, so the scale labels do not collide. */
@media (max-width: 22.5rem) {
  .em26-layer-chart__plot { --n: 6.3rem; --v: 4rem; }
  .em26-layer-chart__name { font-size: 0.8rem; }
  .em26-layer-chart__tick.is-first b { display: none; }
  /* «до 1 см»: «1 см» sits too close to «5 см» here; the shaded zone already ends at 1 см. */
  .term-21 .em26-layer-chart__tick.is-last b { display: none; }
}
