/* category-hero-slider.css — G19. Hero-suwak rozwidlenia (nadruk ↔ grawer) dla
 * strony kategorii. Port z artboardu „Hero - suwak rozwidlenia.html" (.hs*),
 * root przemianowany .hs → .sn-hsx (scope kolizjo-odporny; dzieci hs__* unikatowe).
 * Header NIE jest tu portowany — zostaje motywowy (block_template_part('header')).
 * Enqueue warunkowy (functions.php): tylko gdy kategoria ma obie mapy sn_hero_img.
 * Tokeny: colors_and_type.css (--ember-*, --brass-*, --font-poster=Anton). */

.sn-hsx {
  position: relative; width: 100%;
  height: clamp(620px, 82vh, 840px); overflow: hidden;
  background: radial-gradient(58% 62% at 50% 52%, #1c1714 0%, #0D0B0A 60%, #070605 100%);
  isolation: isolate; user-select: none;
  font-family: var(--font-body);
  /* krawędź kontenera strony (jak reszta serwisu) — boki nie uciekają na brzeg ekranu.
     Na szerokim ekranie = margines do max-1200; na wąskim = mały inset. */
  --hsx-edge: max(clamp(20px, 4vw, 40px), calc((100% - var(--content-max, 1200px)) / 2));
}

/* wrapper „ekran 1": desktop = display:contents (bez wpływu na layout); mobile = flex 100svh */
.hs__s1 { display: contents; }
/* wrapper sceny: desktop = pełna sekcja (warstwy/suwak jak dotąd); mobile = blok flow */
.hs__stage { position: absolute; inset: 0; }
/* elementy WYŁĄCZNIE mobilne — desktop ukryte (boki .hs__side niosą techniki na desktopie) */
.hs__lede, .hs__fork, .hs__close { display: none; }

/* warstwy: kieliszek (przezroczysty PNG) wyśrodkowany, contained */
.hs__layer { position: absolute; inset: 0; background-repeat: no-repeat; background-size: auto 89%; background-position: center 47%; z-index: 2; }
.hs__layer--engrave { clip-path: inset(0 0 0 var(--x, 50%)); }
/* cień-kontakt wokół czaszy — nad H1 (z1), pod szkłem (z2) — śledzi wyższy/większy kieliszek */
.hs__bowlshadow { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(38% 32% at 50% 34%, rgba(0,0,0,0.84) 0%, rgba(0,0,0,0.46) 48%, rgba(0,0,0,0.16) 70%, transparent 84%); }
/* ciepłe światło u podstawy nóżki — pod szkłem, mocno rozmyte */
.hs__footglow { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(16% 7% at 50% 82%, rgba(235,209,154,0.22) 0%, rgba(235,209,154,0.07) 46%, transparent 78%); }

/* scrim: tylko góra i dół, nad produktem ale pod tekstem */
.hs__veil { position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,7,6,0.7) 0%, transparent 18%, transparent 80%, rgba(8,7,6,0.72) 96%); }

/* górny blok: eyebrow + H1 */
.hs__top { position: absolute; left: 0; right: 0; z-index: 0; text-align: center; padding: 0 24px; pointer-events: none; }
.sn-hsx[data-h1="center"] .hs__top { top: 50%; transform: translateY(-50%); }
.sn-hsx[data-h1="top"] .hs__top { top: clamp(96px, 14vh, 168px); transform: none; }
.sn-hsx[data-h1="mid"] .hs__top { top: 28%; transform: translateY(-50%); }
.hs__eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.26em; text-transform: uppercase; color: rgba(230,203,146,0.6); margin: 0 0 14px; }
.hs__h1 { font-family: var(--font-poster); font-weight: 400; text-transform: uppercase; line-height: 0.9; letter-spacing: 0.006em; margin: 0;
  color: transparent; -webkit-text-stroke: 1.1px rgba(255,255,255,0.42); font-size: clamp(48px, 8.5vw, 150px); } /* obrys 0.42 = spójnie z money-page .mgx__h1 */

/* boczne bloki techniki */
.hs__side { position: absolute; top: 52%; z-index: 4; transform: translateY(-50%); max-width: min(24vw, 280px); display: flex; flex-direction: column; gap: 12px; }
.hs__side--l { left: var(--hsx-edge); align-items: flex-start; text-align: left; padding-left: 22px; }
.hs__side--r { right: var(--hsx-edge); align-items: flex-end; text-align: right; padding-right: 30px; }
.sn-hsx[data-h1="mid"] .hs__side { top: 70%; }
/* czysta pionowa kreska boków (akcent techniki) */
.hs__side::before { content: ""; position: absolute; top: 0; bottom: 0; width: 1px; }
.hs__side--l::before { left: 0; background: linear-gradient(180deg, transparent, rgba(217,100,30,0.75), transparent); }
.hs__side--r::before { right: 0; background: linear-gradient(180deg, transparent, rgba(194,152,76,0.75), transparent); }
.hs__kick { font-size: 11px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; }
.hs__side--l .hs__kick { color: var(--ember-400); }
.hs__side--r .hs__kick { color: var(--brass-400); }
.hs__tech { font-family: var(--font-poster); font-weight: 400; text-transform: uppercase; color: #fff; font-size: clamp(34px, 4vw, 60px); line-height: 1.0; letter-spacing: 0.004em; margin: 0; text-shadow: 0 2px 14px rgba(0,0,0,0.65); }
.hs__desc { font-size: 13.5px; line-height: 1.55; color: var(--fg-on-dark-2); margin: 2px 0 4px; max-width: 28ch; text-wrap: balance; }
.hs__cta { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; padding: 9px 0; transition: gap 200ms var(--ease-out); }
.hs__side--l .hs__cta { color: var(--ember-400); }
.hs__side--r .hs__cta { color: var(--brass-400); flex-direction: row-reverse; }
.hs__cta svg { width: 15px; height: 15px; }
.hs__side--l .hs__cta:hover, .hs__side--r .hs__cta:hover { gap: 13px; }

/* pionowa mikro-etykieta przy krawędzi */
.hs__vlabel { position: absolute; z-index: 3; top: 50%; font-size: 9px; font-weight: 400; letter-spacing: 0.5em; text-transform: uppercase; color: rgba(255,255,255,0.30); writing-mode: vertical-rl; pointer-events: none; }
.hs__vlabel--l { left: max(2px, calc(var(--hsx-edge) - 22px)); transform: translateY(-50%) rotate(180deg); }
.hs__vlabel--r { right: max(2px, calc(var(--hsx-edge) - 16px)); transform: translateY(-50%); }
.sn-hsx[data-h1="mid"] .hs__vlabel { top: 70%; }

/* uchwyt suwaka */
.hs__handle { position: absolute; top: 84px; bottom: 92px; left: var(--x, 50%); width: 2px; z-index: 5;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.82) 16%, rgba(255,255,255,0.82) 84%, transparent);
  transform: translateX(-50%); cursor: ew-resize; }
.hs__grip { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%; background: rgba(13,10,8,0.55); border: 1.5px solid rgba(255,255,255,0.9);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,0.5); }
.hs__grip svg { width: 28px; height: 28px; stroke: #fff; }

/* pasek segmentów „dla kogo" u dołu */
.hs__aud { position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  display: flex; align-items: center; justify-content: center; gap: clamp(18px, 2.6vw, 40px);
  flex-wrap: wrap; padding: 19px clamp(24px, 4vw, 56px) clamp(24px, 3vw, 32px);
  background: linear-gradient(0deg, rgba(8,7,6,0.55), transparent);
  border-top: 1px solid rgba(255,255,255,0.10); }
.hs__aud-h { font-size: 10px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: #fff;
  padding-right: clamp(18px, 2.6vw, 38px); border-right: 1px solid rgba(255,255,255,0.16); }
.hs__seg { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); flex-wrap: wrap; }
.hs__seg a, .hs__seg span { font-size: 12px; font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.74); text-decoration: none; transition: color 180ms; position: relative; }
.hs__seg a:hover { color: #fff; }
.hs__seg a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -6px; height: 1px; background: var(--ember-500); transition: right 220ms var(--ease-out); }
.hs__seg a:hover::after { right: 0; }
.hs__aud-note { font-family: var(--font-body); font-size: 12.5px; font-style: italic; letter-spacing: 0.03em; color: var(--brass-400); white-space: nowrap; }

/* podpowiedź „przeciągnij" — pigułka czytelna na tle szkła */
.hs__hint { position: absolute; left: 50%; top: calc(50% + 60px); transform: translateX(-50%); z-index: 5;
  font-size: 10.5px; letter-spacing: 0.22em; text-transform: uppercase; color: #fff; pointer-events: none; white-space: nowrap;
  padding: 6px 15px; border-radius: var(--radius-pill); background: rgba(8,7,6,0.5);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); text-shadow: 0 1px 9px rgba(0,0,0,0.9); }

/* MOBILE (G20-rev, handover Jarka): koniec flankowania i dock-u. Hero = strona
 * przewijalna: ekran 1 (intro + szkło z suwakiem + dwa przyciski-rozwidlenie) na
 * ~100svh, niżej „Dla kogo" + zamykające CTA. Header jest position:absolute, więc
 * intro ma górny odstęp na pasek. Boki .hs__side schowane (zastąpione .hs__fork). */
@media (max-width: 720px) {
  .sn-hsx { height: auto; min-height: 0; overflow: visible; }
  .hs__veil, .hs__side, .hs__vlabel { display: none; }

  /* ── Ekran 1: flex-kolumna 100svh ── */
  .hs__s1 { display: flex; flex-direction: column; min-height: 100svh; min-height: 100dvh;
    padding: calc(env(safe-area-inset-top, 0px) + 92px) 0 24px; box-sizing: border-box; }

  /* intro */
  .hs__top { position: static; transform: none; top: auto; padding: 0 24px; }
  .sn-hsx[data-h1="mid"] .hs__top { top: auto; transform: none; }
  .hs__h1 { font-size: clamp(34px, 11vw, 46px); line-height: 1.08; color: #fff; -webkit-text-stroke: 0; }
  .hs__eyebrow { margin-bottom: 14px; }
  .hs__lede { display: block; font-size: 13.5px; line-height: 1.5; color: var(--fg-on-dark-2);
    margin: 16px auto 0; max-width: 38ch; text-wrap: balance; }

  /* scena: blok flow w środku ekranu 1 */
  .hs__stage { position: relative; inset: auto; flex: 1 1 auto; min-height: 220px; margin-top: 6px; }
  .hs__layer { background-size: auto 84%; background-position: center 50%; }
  .hs__handle { top: 8%; bottom: 12%; }
  .hs__hint { top: auto; bottom: 4%; }

  /* rozwidlenie technik — dwa równe przyciski */
  .hs__fork { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 20px; margin-top: 22px; }
  .hs__forkbtn { display: flex; align-items: center; justify-content: center; gap: 9px; text-decoration: none;
    padding: 15px 12px; border-radius: var(--radius-tight); border: 1.5px solid;
    font-family: var(--font-heading); font-size: 15px; font-weight: 700; letter-spacing: 0.02em;
    transition: background 180ms; }
  .hs__forkbtn svg { width: 16px; height: 16px; }
  .hs__forkbtn--print { color: var(--ember-400); border-color: rgba(217,100,30,0.55); }
  .hs__forkbtn--print:active { background: rgba(217,100,30,0.14); }
  .hs__forkbtn--engrave { color: var(--brass-300); border-color: rgba(194,152,76,0.55); }
  .hs__forkbtn--engrave:active { background: rgba(194,152,76,0.14); }

  /* ── Ekran 2: „Dla kogo" (w flow, pod ekranem 1) ── */
  .hs__aud { position: static; left: auto; right: auto; bottom: auto;
    flex-direction: column; align-items: stretch; flex-wrap: wrap; gap: 14px;
    padding: 40px 24px 0; margin-top: 4px; background: none; border-top: 1px solid rgba(255,255,255,0.07); }
  .hs__aud-h { display: flex; align-items: center; gap: 14px; padding-right: 0; border-right: 0; }
  .hs__aud-h::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.12); }
  .hs__seg { flex-wrap: wrap; gap: 8px 18px; }
  .hs__seg a, .hs__seg span { font-size: 14px; font-weight: 600; letter-spacing: 0.005em; color: #fff; text-transform: none; }
  .hs__aud-note { display: block; }

  /* zamknięcie: CTA do listy modeli + reasekuracja */
  .hs__close { display: block; padding: 22px 24px calc(env(safe-area-inset-bottom, 0px) + 8px); }
  .hs__cta-main { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
    box-sizing: border-box; text-decoration: none; background: var(--brass-500); color: #1A1206;
    padding: 17px; border-radius: var(--radius-tight); font-family: var(--font-heading);
    font-size: 16px; font-weight: 700; letter-spacing: 0.02em; transition: background 180ms; }
  .hs__cta-main svg { width: 18px; height: 18px; }
  .hs__cta-main:active { background: var(--brass-400); }
  .hs__reassure { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0;
    font-size: 11.5px; letter-spacing: 0.02em; color: var(--fg-on-dark-3); }
  .hs__reassure svg { width: 13px; height: 13px; color: var(--status-active); }
}

/* reduced-motion: bez auto-wahnięcia/transition; treść i suwak nadal działają, nic nie znika */
@media (prefers-reduced-motion: reduce) {
  .hs__cta, .hs__seg a::after { transition: none; }
}

/* ── Kufle do piwa: kufel jest niski i szeroki (nie smukły jak kieliszek/szklanka) —
 * przy bazowym auto 89% piana była ucinana u góry i kufel zasłaniał H1. Mniejszy + niżej.
 * Scope per kategoria (data-cat) → kieliszki/szklanki bez zmian. Wariant A (decyzja Jarka). */
/* +40px w prawo: ucho po prawej spycha korpus z nadrukiem na lewo od linii suwaka —
 * nudge w prawo wyrównuje logo do linii (decyzja Jarka). Tylko desktop (na mobile za dużo). */
.sn-hsx[data-cat="kufle-do-piwa"] .hs__layer { background-size: auto 74%; background-position: calc(50% + 58px) calc(55% - 20px); }
@media (max-width: 720px) {
  /* kufel niski/szeroki — w scenie flow trochę mniejszy niż smukłe szkła, wyśrodkowany */
  .sn-hsx[data-cat="kufle-do-piwa"] .hs__layer { background-size: auto 66%; background-position: center 50%; }
}

/* Szklanki do piwa: ~10% mniejsza (89%→80%) i 40px w górę. Tylko desktop. */
@media (min-width: 721px) {
  .sn-hsx[data-cat="szklanki-do-piwa"] .hs__layer { background-size: auto 80%; background-position: center calc(47% - 40px); }
}

/* Szklanki do whisky: -20% (89%→71%) i 35px w górę (decyzja Jarka, korekta -15px w dół). Tylko desktop. */
@media (min-width: 721px) {
  .sn-hsx[data-cat="szklanki-do-whisky"] .hs__layer { background-size: auto 71%; background-position: center calc(47% - 35px); }
}
/* Kubki szklane: kubek z uchem, smukły latte — -15% (89%→76%), 30px w górę i 71px w prawo
 * (ucho po prawej spycha korpus z herbem na lewo od osi suwaka; nudge wyrównuje — jak kufle). Decyzja Jarka. Tylko desktop. */
@media (min-width: 721px) {
  .sn-hsx[data-cat="kubki-szklane"] .hs__layer { background-size: auto 76%; background-position: calc(50% + 71px) calc(47% - 30px); }
}
/* Szklanki do drinków: wysoka prosta szklanka (highball) bez ucha — logo wyśrodkowane na osi,
 * przy bazie 89% za duża. -10% (89%→80%) i 30px w górę, jak rodzina wysokich szklanek. Tylko desktop. */
@media (min-width: 721px) {
  .sn-hsx[data-cat="szklanki-do-drinkow"] .hs__layer { background-size: auto 80%; background-position: center calc(47% - 30px); }
}
/* Kubki ceramiczne: kubek z uchem (bez znaku ↔ nadruk) — 72%, 5px w górę i 75px w prawo. Tylko desktop. */
@media (min-width: 721px) {
  .sn-hsx[data-cat="kubki-ceramiczne"] .hs__layer { background-size: auto 72%; background-position: calc(50% + 70px) calc(47% - 5px); }
}
/* Boki zamienione (Bez znaku = lewo, Nadruk = prawo) → flip akcentów: lewo brass/neutral, prawo ember (nadruk = kolor). */
.sn-hsx[data-cat="kubki-ceramiczne"] .hs__side--l .hs__kick { color: var(--brass-400); }
.sn-hsx[data-cat="kubki-ceramiczne"] .hs__side--l::before { background: linear-gradient(180deg, transparent, rgba(194,152,76,0.75), transparent); }
.sn-hsx[data-cat="kubki-ceramiczne"] .hs__side--r .hs__kick { color: var(--ember-400); }
.sn-hsx[data-cat="kubki-ceramiczne"] .hs__side--r::before { background: linear-gradient(180deg, transparent, rgba(217,100,30,0.75), transparent); }
.sn-hsx[data-cat="kubki-ceramiczne"] .hs__side--r .hs__cta { color: var(--ember-400); }
/* Kieliszki i szklanki do wina: H1 w 2 liniach (KIELISZKI / i szklanki do wina, br w PHP) — może być większe;
   kieliszek 30px w górę (decyzja Jarka). Tylko desktop. */
@media (min-width: 721px) {
  /* 2 linie: większe + prawidłowa interlinia (base 0.9 za ciasne dla 2 wierszy). */
  .sn-hsx[data-cat="kieliszki-i-szklanki-do-wina"] .hs__h1 { font-size: clamp(48px, 8.2vw, 132px); line-height: 0.98; }
  .sn-hsx[data-cat="kieliszki-i-szklanki-do-wina"] .hs__layer { background-position: center calc(47% - 30px); }
}
