/* texchem-hero-banery.css — 5 banerów na głównej (01.12.2026). Makiety: texchem-sklep/makiety/banery-glowna-2026-12/.
   Tokeny tylko w obrębie .txc-hx (nie nadpisujemy zmiennych motywu). Układ desktop/mobile przez container queries
   na .txc-hx (szerokość karty, nie ekranu). ODWRÓT: usunąć mu-plugin texchem-hero-banery.php. */

.txc-hx {
  --ink: #171f26;
  --ink-2: #222d36;
  --body: #586772;
  --mute: #7a8790;
  --line: #e2e7ea;
  --cloud: #f7f9fa;
  --paper: #f1f0ec;
  --white: #ffffff;
  --green: #8dc63f;
  --green-deep: #527d1f;
  --green-tint: #f3f9ea;
  --on-dark: #e9eef1;
  --on-dark-mute: #a7b3bb;
  --mask: #000;
  --shade: rgba(23, 31, 38, .18);
  --shade-2: rgba(23, 31, 38, .55);
  --font: Nunito, "Helvetica Neue", system-ui, sans-serif;
  --r-lg: 28px;
  --r-md: 18px;
  --r-sm: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  container-type: inline-size; container-name: hx;
  position: relative; margin: 0 0 32px; font-family: var(--font); color: var(--ink);
}
.txc-hx, .txc-hx * { box-sizing: border-box; }

/* --- pokaz slajdów: wszystkie w jednej komórce siatki → wysokość = najwyższy, zero CLS.
   Nieaktywne: opacity 0 + visibility hidden. (Próba z malowaniem wszystkich pod aktywnym — 01.12 — dała GORSZY LCP:
   Chrome liczył zdjęcie 2. slajdu w chwili wyjścia na wierzch, LCP 7,6 s. Nie wracać do tego.) --- */
.txc-hx-stage { display: grid; grid-template-columns: minmax(0, 1fr); }
.txc-hx-slide { grid-area: 1 / 1; min-width: 0; display: grid; opacity: 0; visibility: hidden; transition: opacity .5s var(--ease), visibility 0s linear .5s; }
.txc-hx-slide.is-on { opacity: 1; visibility: visible; transition: opacity .5s var(--ease), visibility 0s; z-index: 1; }
.txc-hx-slide > .hx { height: 100%; align-content: center; }
/* stała minimalna wysokość: podmiana fontu (Nunito) nie zmienia wysokości sceny → brak przesunięć pod banerem */
@container hx (min-width: 900px) { .txc-hx-slide > .hx { min-height: 640px; } }

/* --- nawigacja: zakładki z paskiem postępu (5 s) + pauza --- */
.txc-hx-nav { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.txc-hx-tabs { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 8px; }
.txc-hx .txc-hx-tab { position: relative; margin: 0; padding: 10px 0 12px; min-height: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--mute); font: 700 13px/1.2 var(--font); text-align: left; text-transform: none; letter-spacing: 0; cursor: pointer; }
.txc-hx .txc-hx-tab span { display: none; white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.txc-hx-tab i { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 3px; background: var(--line); overflow: clip; }
.txc-hx-tab i::after { content: ""; position: absolute; inset: 0; background: var(--green); transform: scaleX(0); transform-origin: left; }
.txc-hx-tab.is-done i::after { transform: scaleX(1); }
.txc-hx .txc-hx-tab.is-on { color: var(--ink); }
.txc-hx-tab.is-on i::after { animation: txc-hx-prog 5s linear forwards; }
.txc-hx.is-paused .txc-hx-tab.is-on i::after { animation-play-state: paused; }
.txc-hx .txc-hx-tab:hover { color: var(--ink); background: none; }
.txc-hx .txc-hx-pause { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; margin: 0; padding: 0; line-height: 1; border-radius: 50%; border: 1.5px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; transition: border-color .18s var(--ease); }
.txc-hx .txc-hx-pause:hover { border-color: var(--green); background: var(--white); color: var(--ink); }
.txc-hx-pause .i-play { display: none; }
.txc-hx.is-stopped .txc-hx-pause .i-play { display: block; }
.txc-hx.is-stopped .txc-hx-pause .i-pause { display: none; }
.txc-hx .txc-hx-tab:focus-visible, .txc-hx .txc-hx-pause:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
@keyframes txc-hx-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@container hx (min-width: 900px) {
  .txc-hx .txc-hx-tab { font-size: 15px; padding: 12px 0 14px; }
  .txc-hx .txc-hx-tab span { display: block; }
  .txc-hx-tabs { gap: 16px; }
}

/* --- Astra: nagłówki i linki w treści dostają dekor motywu — gasimy w obrębie banera --- */
.txc-hx .hx-title, .txc-hx .hx-desc, .txc-hx .hx-facts { text-align: left; }
.txc-hx .hx-title { text-transform: none; font-family: var(--font); color: var(--ink); padding: 0; }
.txc-hx .hx-title::before, .txc-hx .hx-title::after { content: none; display: none; }
.txc-hx .hx-c .hx-title { color: var(--white); }
.txc-hx a { text-decoration: none; box-shadow: none; }
.txc-hx a.hx-btn { color: var(--white); }
.txc-hx .hx-c a.hx-btn { color: var(--ink); }
.txc-hx a.hx-link { color: var(--green-deep); }
.txc-hx .hx-c a.hx-link { color: var(--on-dark); }
.txc-hx button.c-pick { margin: 0; line-height: 1.15; min-height: 0; box-shadow: none; text-transform: none; letter-spacing: 0; }
.txc-hx .hx-facts li { margin: 0; list-style: none; }
.txc-hx .hx-desc { font-family: var(--font); }
.txc-hx img { max-width: none; }
.txc-hx figure { margin: 0; }

/* ---------------------------------------------------------------- części wspólne */
.txc-hx .hx { position: relative; border-radius: var(--r-lg); overflow: clip; min-width: 0; }
.txc-hx .hx * { box-sizing: border-box; }
.txc-hx .hx-title { font-size: 34px; line-height: 1.06; letter-spacing: -.03em; font-weight: 800; margin: 0 0 12px; text-wrap: balance; overflow-wrap: break-word; min-width: 0; }
.txc-hx .hx-desc { font-size: 16px; line-height: 1.5; color: var(--body); margin: 0 0 20px; max-width: 34ch; text-wrap: pretty; }
.txc-hx .hx-cta { display: flex; flex-direction: column; gap: 10px; }
.txc-hx .hx-btn {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 18px;
  min-height: 54px; padding: 6px 6px 6px 24px; border-radius: 999px;
  background: var(--ink); color: var(--white); font-weight: 800; font-size: 16px; text-decoration: none;
  transition: transform .18s var(--ease), background-color .18s var(--ease);
}
.txc-hx .hx-btn-ico { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--green); color: var(--ink); transition: transform .18s var(--ease); }
.txc-hx .hx-btn:hover { background: var(--ink-2); }
.txc-hx .hx-btn:hover .hx-btn-ico { transform: translateX(3px); }
.txc-hx .hx-btn:active { transform: scale(.98); }
.txc-hx .hx-link { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--line); color: var(--green-deep); font-weight: 800; text-decoration: none; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.txc-hx .hx-link:hover { border-color: var(--green); background: var(--green-tint); }
.txc-hx .hx a:focus-visible, .txc-hx .hx button:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; transition: none; }
.txc-hx .hx-facts { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 0; font-size: 14px; color: var(--body); }
.txc-hx .hx-facts li { padding: 0 12px; border-left: 1px solid var(--line); }
.txc-hx .hx-facts li:first-child { padding-left: 0; border-left: 0; }
.txc-hx .hx-facts li:last-child { flex-basis: 100%; padding-left: 0; border-left: 0; }

@container hx (min-width: 900px) {
  .txc-hx .hx-title { font-size: clamp(40px, 4cqi, 54px); margin-bottom: 16px; }
  .txc-hx .hx-desc { font-size: 18px; margin-bottom: 28px; }
  .txc-hx .hx-cta { flex-direction: row; align-items: center; gap: 22px; }
  .txc-hx .hx-link { border: 0; border-bottom: 2px solid var(--green); border-radius: 0; min-height: 0; padding: 2px 0; }
  .txc-hx .hx-link:hover { background: none; border-color: var(--green-deep); }
  .txc-hx .hx-facts { margin-top: 26px; }
  .txc-hx .hx-facts li:last-child { flex-basis: auto; padding-left: 12px; border-left: 1px solid var(--line); }
}

/* ================================================================ A: fan of real swatches */
.txc-hx .hx-a { background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr); padding: 0 20px 24px; }
.txc-hx .a-copy { grid-row: 2; min-width: 0; }
.txc-hx .a-fan { grid-row: 1; position: relative; height: 250px; margin: 0 -20px 8px; --len: 190px; --bw: 46px; --spread: 160deg; }
.txc-hx .a-blade {
  position: absolute; left: calc(50% - var(--bw) / 2); bottom: 18px; width: var(--bw); height: var(--len);
  transform-origin: 50% calc(100% - 14px);
  --a: calc(var(--spread) * var(--t) - var(--spread) / 2);
  transform: rotate(var(--a));
  border-radius: 8px; overflow: clip; background: var(--white);
  box-shadow: 0 1px 0 var(--shade), -2px 2px 8px -2px var(--shade);
  animation: a-open .8s var(--ease) backwards; animation-delay: calc(var(--i) * 18ms);
  transition: transform .22s var(--ease);
}
.txc-hx .a-blade img { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: calc(100% - 30px); object-fit: cover; display: block; }
.txc-hx .a-label { position: absolute; top: 0; left: 0; right: 0; height: 30px; padding: 6px 4px 0 5px; font-size: 9px; font-weight: 800; line-height: 1; color: var(--ink); white-space: nowrap; overflow: clip; text-overflow: clip; }
.txc-hx .a-blade:hover, .txc-hx .a-blade.is-lift { transform: rotate(var(--a)) translateY(-16px); z-index: 30; }
.txc-hx .a-rivet { position: absolute; left: calc(50% - 9px); bottom: 23px; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); box-shadow: inset 0 0 0 4px var(--green); z-index: 40; }
.txc-hx .a-tag {
  position: absolute; z-index: 50; right: 14px; top: 8px; display: grid; gap: 1px; padding: 8px 12px; border-radius: var(--r-sm);
  background: var(--white); color: var(--ink); text-decoration: none; font-size: 12px; box-shadow: 0 6px 20px -8px var(--shade-2);
  animation: a-tag .4s var(--ease) both; animation-delay: .75s;
}
.txc-hx .a-tag b { font-size: 13px; }
.txc-hx .a-tag span { color: var(--body); }
@keyframes a-open { from { transform: rotate(0deg); } }
@keyframes a-tag { from { opacity: 0; transform: translateY(6px); } }

@container hx (min-width: 900px) {
  .txc-hx .hx-a { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: 24px; padding: 0 0 0 64px; min-height: 540px; }
  .txc-hx .a-copy { grid-row: 1; padding: 56px 0; }
  .txc-hx .a-fan { grid-row: 1; height: 540px; margin: 0; --len: clamp(230px, 25.5cqi, 350px); --bw: calc(var(--len) * .205); --spread: 128deg; }
  .txc-hx .a-blade { bottom: 34px; border-radius: 10px; }
  .txc-hx .a-blade img { height: calc(100% - 46px); }
  .txc-hx .a-label { height: 46px; padding: 9px 6px 0 7px; font-size: 12px; }
  .txc-hx .a-rivet { width: 24px; height: 24px; left: calc(50% - 12px); bottom: 40px; box-shadow: inset 0 0 0 6px var(--green); }
  .txc-hx .a-tag { right: auto; left: 54%; top: 34px; padding: 10px 14px; font-size: 13px; }
  .txc-hx .a-tag b { font-size: 15px; }
}

/* ================================================================ B: application photo */
.txc-hx .hx-b { background: var(--paper); display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; padding: 12px 12px 24px; }
.txc-hx .b-photo { grid-row: 1; position: relative; margin: 0; aspect-ratio: 4 / 3; border-radius: var(--r-md); overflow: clip; background: var(--paper); }
.txc-hx .b-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; animation: b-in 1s var(--ease) both; }
.txc-hx .b-chip {
  position: absolute; left: 10px; right: 10px; bottom: 10px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 36px; gap: 10px; align-items: center;
  padding: 7px; border-radius: 14px; background: var(--white); color: var(--ink); text-decoration: none; box-shadow: 0 10px 30px -12px var(--shade-2);
  animation: b-chip .5s var(--ease) both; animation-delay: .45s; transition: transform .18s var(--ease);
}
.txc-hx .b-chip img { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; display: block; }
.txc-hx .b-chip small { display: block; font-size: 12px; color: var(--body); }
.txc-hx .b-chip b { display: block; font-size: 15px; line-height: 1.2; }
.txc-hx .b-chip em { display: block; font-style: normal; font-size: 12px; color: var(--body); white-space: nowrap; overflow: clip; text-overflow: ellipsis; }
.txc-hx .b-chip-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--green-tint); color: var(--green-deep); }
.txc-hx .b-chip:hover { transform: translateY(-2px); }
.txc-hx .b-copy { grid-row: 2; min-width: 0; padding: 0 8px; }
@keyframes b-in { from { transform: scale(1.04); } }
@keyframes b-chip { from { opacity: 0; transform: translateY(10px); } }

@container hx (min-width: 900px) {
  .txc-hx .hx-b { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0 48px; padding: 20px 20px 20px 64px; align-items: center; }
  .txc-hx .b-copy { grid-row: 1; grid-column: 1; padding: 40px 0; }
  .txc-hx .b-photo { grid-row: 1; grid-column: 2; aspect-ratio: auto; align-self: stretch; min-height: 500px; border-radius: var(--r-md); }
  .txc-hx .b-chip { left: 24px; right: auto; bottom: 24px; width: 380px; grid-template-columns: 64px minmax(0, 1fr) 40px; gap: 14px; padding: 9px; }
  .txc-hx .b-chip img { width: 64px; height: 64px; }
  .txc-hx .b-chip b { font-size: 17px; }
  .txc-hx .b-chip-ico { width: 40px; height: 40px; }
}

/* ================================================================ C: 1 metre cut */
.txc-hx .hx-c { background: var(--ink); color: var(--white); display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 28px 20px 24px; --strip-w: 303px; --cut: .72; }
.txc-hx .hx-c .hx-title { color: var(--white); }
.txc-hx .hx-c .hx-desc { color: var(--on-dark-mute); }
.txc-hx .hx-c .hx-btn { background: var(--green); color: var(--ink); }
.txc-hx .hx-c .hx-btn-ico { background: var(--ink); color: var(--green); }
.txc-hx .hx-c .hx-btn:hover { background: var(--white); }
.txc-hx .hx-c .hx-link { color: var(--on-dark); border-color: var(--ink-2); }
.txc-hx .hx-c .hx-link:hover { background: var(--ink-2); }
.txc-hx .c-copy { grid-row: 1; min-width: 0; }
.txc-hx .c-measure { grid-row: 2; position: relative; min-width: 0; }
.txc-hx .c-picks { grid-row: 3; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.txc-hx .c-pick { display: grid; justify-items: center; gap: 6px; padding: 10px 4px; border-radius: var(--r-sm); border: 1.5px solid var(--ink-2); background: none; color: var(--on-dark-mute); font: 700 12px/1.15 var(--font); cursor: pointer; text-align: center; transition: border-color .18s var(--ease), background-color .18s var(--ease); }
.txc-hx .c-pick img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.txc-hx .c-pick b { display: block; color: var(--white); }
.txc-hx .c-pick em { display: none; font-style: normal; }
.txc-hx .c-pick:hover { background: var(--ink-2); }
.txc-hx .c-pick.is-on { border-color: var(--green); }

.txc-hx .c-ruler { position: relative; height: 34px; color: var(--on-dark-mute); font-size: 11px; font-weight: 700; }
.txc-hx .c-ticks {
  position: absolute; left: 0; right: 0; bottom: 0; height: 14px;
  background:
    linear-gradient(90deg, var(--on-dark-mute) 1.5px, transparent 1.5px) 0 100% / calc(100% * var(--cut) / 10) 14px repeat-x,
    linear-gradient(90deg, var(--on-dark-mute) 1px, transparent 1px) 0 100% / calc(100% * var(--cut) / 20) 7px repeat-x;
  -webkit-mask: linear-gradient(90deg, var(--mask) calc(var(--cut) * 100%), transparent 100%);
          mask: linear-gradient(90deg, var(--mask) calc(var(--cut) * 100%), transparent 100%);
}
.txc-hx .c-ruler > span { position: absolute; top: 0; left: calc(var(--p) * var(--cut) * 100%); transform: translateX(-50%); }
.txc-hx .c-ruler > span:nth-of-type(even) { display: none; }
.txc-hx .c-ruler > span:first-of-type { transform: none; }
.txc-hx .c-ruler > .c-cm { left: auto; right: 0; transform: none; display: inline; }
.txc-hx .c-strip { position: relative; height: 92px; margin-top: 6px; }
.txc-hx .c-piece, .txc-hx .c-rest { position: absolute; top: 0; bottom: 0; background-image: var(--tex); background-size: var(--strip-w) auto; background-position: 0 50%; background-color: var(--ink-2); }
.txc-hx .c-piece {
  left: 0; width: calc(var(--cut) * 100% - 3px); border-radius: 6px 2px 2px 6px; box-shadow: 0 10px 24px -10px var(--shade-2);
  text-decoration: none;
}
.txc-hx .c-rest { left: calc(var(--cut) * 100% + 3px); right: 0; border-radius: 2px 0 0 2px; background-position: calc(var(--strip-w) * var(--cut) * -1) 50%; animation: c-pull .45s var(--ease) both; animation-delay: .75s; }
.txc-hx .c-rest::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, var(--ink) 92%); }
.txc-hx .c-rest span { display: none; }
.txc-hx .c-piece-name { position: absolute; left: 8px; bottom: 8px; padding: 4px 8px; border-radius: 999px; background: var(--white); color: var(--ink); font-size: 11px; font-weight: 800; }
.txc-hx .c-cut { position: absolute; top: -48px; bottom: -8px; left: calc(var(--cut) * 100%); width: 0; border-left: 2px dashed var(--green); transform-origin: top; animation: c-cut .6s var(--ease) both; animation-delay: .2s; }
.txc-hx .c-cut b { position: absolute; top: -4px; left: -24px; width: 48px; text-align: center; padding: 4px 0; border-radius: 999px; background: var(--green); color: var(--ink); font-size: 13px; font-weight: 900; }
@keyframes c-cut { from { transform: scaleY(0); } }
@keyframes c-pull { from { transform: translateX(0); } to { transform: translateX(10px); } }

@container hx (min-width: 900px) {
  .txc-hx .hx-c { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 36px 64px; padding: 56px 64px 52px; --strip-w: 1232px; --cut: .62; }
  .txc-hx .c-copy { grid-row: 1; grid-column: 1; }
  .txc-hx .hx-c .hx-title { font-size: clamp(44px, 4.4cqi, 60px); }
  .txc-hx .c-picks { grid-row: 1; grid-column: 2; grid-template-columns: minmax(0, 1fr); align-self: center; gap: 10px; }
  .txc-hx .c-pick { grid-template-columns: 48px minmax(0, 1fr); justify-items: start; align-items: center; gap: 14px; padding: 10px 14px; font-size: 15px; text-align: left; }
  .txc-hx .c-pick img { width: 48px; height: 48px; }
  .txc-hx .c-pick em { display: block; font-size: 13px; color: var(--on-dark-mute); font-weight: 600; }
  .txc-hx .c-measure { grid-row: 2; grid-column: 1 / -1; }
  .txc-hx .c-ruler { height: 40px; font-size: 13px; }
  .txc-hx .c-ruler > span:nth-of-type(even) { display: inline; }
  .txc-hx .c-ticks { height: 18px; background-size: calc(100% * var(--cut) / 10) 18px, calc(100% * var(--cut) / 20) 9px; }
  .txc-hx .c-strip { height: 150px; margin-top: 8px; }
  .txc-hx .c-piece-name { left: 14px; bottom: 14px; padding: 6px 12px; font-size: 13px; }
  .txc-hx .c-rest span { display: block; position: absolute; z-index: 2; right: 24px; top: 50%; transform: translateY(-50%); font-size: 15px; font-weight: 700; color: var(--on-dark); }
  .txc-hx .c-cut { top: -58px; bottom: -12px; }
  .txc-hx .c-cut b { top: -6px; left: -30px; width: 60px; font-size: 15px; }
}

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  .txc-hx .a-blade, .txc-hx .a-tag, .txc-hx .b-photo > img, .txc-hx .b-chip, .txc-hx .c-rest, .txc-hx .c-cut { animation: none; }
  .txc-hx .c-rest { transform: translateX(10px); }
  .txc-hx .a-blade, .txc-hx .hx-btn, .txc-hx .hx-btn-ico, .txc-hx .b-chip { transition: none; }
}

/* animacje startują przy każdym wejściu slajdu (none → nazwa = restart) */
.txc-hx-slide:not(.is-on) .a-blade, .txc-hx-slide:not(.is-on) .a-tag, .txc-hx-slide:not(.is-on) .b-photo > img,
.txc-hx-slide:not(.is-on) .b-chip, .txc-hx-slide:not(.is-on) .c-rest, .txc-hx-slide:not(.is-on) .c-cut { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .txc-hx-slide, .txc-hx-slide.is-on { transition: none; }
  /* pasek postępu zostaje: to cienka linia i on odmierza 5 s; zmiana slajdów bez przenikania */
}
