/* WILGA — layout i komponenty. Mobile-first, breakpointy 560 / 900 / 1180. */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.03;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img, svg, canvas { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
button { font: inherit; color: inherit; }
fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
abbr[title] { border: 0; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.stage :focus-visible,
.drawer :focus-visible { outline-color: var(--focus-on-dark); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 0; top: 0; z-index: 100;
  transform: translateY(-120%);
  background: var(--graphite); color: var(--on-dark);
  padding: 0.85rem 1.25rem; border-radius: 0 0 var(--r-md) 0;
  font-weight: 600; text-decoration: none;
  transition: transform 0.15s var(--ease);
}
.skip:focus { transform: translateY(0); }

.shell {
  width: 100%;
  max-width: 1320px;
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

/* ---------- typografia pomocnicza ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink); flex: none;
}
.sec-head {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: clamp(1.75rem, 1rem + 2vw, 3rem);
}
.sec-head > div:first-child { max-width: 44ch; }
.sec-head-tight { margin-bottom: clamp(1.5rem, 0.9rem + 1.6vw, 2.25rem); }
h2 { font-size: var(--step-3); font-weight: 700; }
.sec-sub {
  margin-top: 0.75rem;
  color: var(--ink-2);
  font-size: var(--step-1);
  max-width: 52ch;
  line-height: 1.5;
}

/* ---------- przyciski ---------- */
.btn {
  --btn-bg: var(--card);
  --btn-fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px;
  padding: 0.7rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.16s var(--ease), border-color 0.16s var(--ease),
              color 0.16s var(--ease), transform 0.12s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

.btn-primary {
  --btn-bg: var(--lime);
  --btn-fg: var(--on-lime);
  border-color: var(--lime);
  font-weight: 700;
}
.btn-primary:hover { background: var(--lime-deep); border-color: var(--lime-deep); }

.btn-ghost { --btn-bg: transparent; --btn-fg: var(--ink); border-color: var(--line); }
.btn-ghost:hover { --btn-bg: var(--ink); --btn-fg: var(--paper); border-color: var(--ink); }

.btn-wide { width: 100%; }

.link-arrow {
  display: inline-flex; align-items: center; min-height: 48px;
  font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--line);
  text-decoration-thickness: 2px; text-underline-offset: 4px;
  transition: text-decoration-color 0.16s var(--ease);
}
.link-arrow:hover { text-decoration-color: var(--ink); }

/* ---------- nagłówek ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(242, 241, 237, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); background: rgba(242, 241, 237, 0.96); }
.head-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem 1rem;
  min-height: 64px;
  padding-block: 0.35rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.5rem;
  color: var(--ink); text-decoration: none;
  margin-right: auto;
  min-height: 44px;
}
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand-word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: 0.18em;
}
/* Krótka nawigacja zostaje widoczna także na telefonie — bez hamburgera. */
.nav { order: 3; flex: 1 0 100%; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.15rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.nav a:hover, .nav a:focus-visible { color: var(--ink); border-bottom-color: var(--lime); }

.cart-btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  min-height: 44px; padding: 0.45rem 0.7rem 0.45rem 0.75rem;
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--card); color: var(--ink);
  font-size: 0.9375rem; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.cart-btn:hover { border-color: var(--ink); box-shadow: var(--shadow-1); }
.cart-icon { width: 20px; height: 20px; flex: none; }
.cart-label { display: none; }
.cart-count {
  display: inline-grid; place-items: center;
  min-width: 24px; height: 24px; padding: 0 0.35rem;
  border-radius: 5px;
  background: var(--lime); color: var(--on-lime);
  font-family: var(--font-display);
  font-size: 0.8125rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: transform 0.18s var(--ease);
}
.cart-count.is-bump { transform: scale(1.18); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(1.75rem, 1rem + 2.4vw, 3.5rem); padding-bottom: var(--section-y); }
.hero-grid {
  display: grid; gap: clamp(2rem, 1rem + 4vw, 3.5rem);
  grid-template-columns: 1fr;
  align-items: center;
}
.hero-copy h1 {
  font-size: var(--step-5);
  font-weight: 700;
  letter-spacing: -0.038em;
  margin-top: 1rem;
  line-height: 0.96;
}
.hero-copy h1 .hl {
  display: inline-block;
  position: relative;
  z-index: 0;
}
.hero-copy h1 .hl::after {
  content: "";
  position: absolute; left: -0.02em; right: -0.02em; bottom: 0.07em;
  height: 0.30em; z-index: -1;
  background: var(--lime);
}
.lede {
  margin-top: clamp(1.1rem, 0.8rem + 0.8vw, 1.6rem);
  max-width: 44ch;
  font-size: var(--step-1);
  line-height: 1.55;
  color: var(--ink-2);
}
.hero-cta {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.5rem;
  margin-top: clamp(1.5rem, 1rem + 1.4vw, 2.25rem);
}
.hero-cta .btn { padding-inline: 1.5rem; min-height: 52px; font-size: 1rem; }
.hero-facts {
  display: flex; flex-wrap: wrap; gap: 1.25rem 2rem;
  margin: clamp(2rem, 1.2rem + 2vw, 3rem) 0 0;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}
.hero-facts div { flex: 1 1 12rem; }
.hero-facts dt {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}
.hero-facts dd { margin: 0.3rem 0 0; font-size: 0.9375rem; font-weight: 500; }

/* ---------- scena ---------- */
.hero-stage { display: flex; flex-direction: column; gap: 0.75rem; }
.stage {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--graphite);
  box-shadow: var(--shadow-2);
  isolation: isolate;
}
.stage::after {
  /* wąski błysk na krawędzi — scena ma być studyjna, nie płaska */
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}
.stage-canvas {
  width: 100%;
  aspect-ratio: 5 / 4;
  height: auto;
  display: block;
  cursor: grab;
  touch-action: pan-y;
}
.stage-tall .stage-canvas,
.stage-tall .stage-poster { aspect-ratio: 1 / 1; }
.stage-canvas:active { cursor: grabbing; }
/* <picture> nie może tworzyć własnego pudełka — poster ma wypełniać scenę */
.stage picture { display: contents; }
.stage-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage-badge {
  position: absolute; top: 0.9rem; left: 0.9rem;
  padding: 0.3rem 0.6rem;
  border-radius: 5px;
  background: rgba(242, 242, 239, 0.10);
  border: 1px solid rgba(242, 242, 239, 0.14);
  color: var(--on-dark);
  font-family: var(--font-display);
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  backdrop-filter: blur(6px);
}

.stage-hint {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.hint-text {
  display: inline-flex; align-items: center; gap: 0.45rem;
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2);
}
.hint-text svg { width: 16px; height: 16px; flex: none; opacity: 0.75; }
.hint-btns { display: flex; gap: 0.5rem; margin-left: auto; }
.turn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--card); color: var(--ink);
  cursor: pointer;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.turn svg { width: 20px; height: 20px; }
.turn:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.turn:active { transform: translateY(1px); }

/* fallback bez WebGL: canvas znika, poster przejmuje rolę */
.stage.no-gl .stage-canvas { display: none; }
.stage.no-gl .stage-poster { display: block !important; }
.stage.is-gl .stage-poster { display: none !important; }

/* ---------- modele ---------- */
.models { padding-block: var(--section-y); background: var(--paper); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  min-height: 44px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--ink-2);
  font-size: 0.875rem; font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), color 0.15s var(--ease),
              border-color 0.15s var(--ease);
}
.chip:hover { color: var(--ink); border-color: var(--ink-3); }
.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.model-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
.model-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
  transition: box-shadow 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.model-card:hover { box-shadow: var(--shadow-2); border-color: #D6D5CE; transform: translateY(-2px); }
.model-card[hidden] { display: none; }
.card-media {
  background: var(--graphite);
  aspect-ratio: 16 / 11;
  overflow: hidden;
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body {
  display: flex; flex-direction: column; gap: 0.45rem;
  padding: 1rem 1.05rem 1.1rem;
  flex: 1;
}
.card-top { display: flex; align-items: center; gap: 0.6rem; justify-content: space-between; }
.card-top h3 { font-size: var(--step-2); font-weight: 700; letter-spacing: -0.028em; }
.card-tag {
  font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  border-radius: 4px;
}
.card-body > p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.45; }
.card-foot {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem;
  margin-top: auto; padding-top: 0.85rem;
}
.price { display: flex; flex-direction: column; gap: 0.1rem; }
.price-from { font-size: 0.75rem; color: var(--ink-3); font-weight: 600; }
.price strong {
  font-family: var(--font-display);
  font-size: 1.1875rem; font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.demo {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--ink-3);
  letter-spacing: 0.03em;
}
.demo-block { margin-top: 0.15rem; }
.card-foot .btn { flex: none; padding-inline: 1rem; min-height: 44px; }

/* ---------- konfigurator ---------- */
.config { padding-block: var(--section-y); background: #EDECE7; border-block: 1px solid var(--line); }
.config-grid {
  display: grid; gap: clamp(1.25rem, 0.8rem + 1.6vw, 1.75rem);
  grid-template-columns: 1fr;
  align-items: start;
}
.config-stage { display: flex; flex-direction: column; gap: 0.7rem; }

.config-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
  padding: clamp(1rem, 0.7rem + 1vw, 1.5rem);
  display: flex; flex-direction: column; gap: clamp(1.1rem, 0.8rem + 0.8vw, 1.5rem);
}
.opt-set { display: flex; flex-direction: column; gap: 0.6rem; }
.opt-legend {
  font-family: var(--font-display);
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink);
  padding: 0;
  margin-bottom: 0.15rem;
}

.opt-grid { display: grid; gap: 0.5rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt-grid-model { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.opt-grid-color { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.45rem; }

/* każda opcja to prawdziwy radio, ukryty wizualnie, ale dostępny z klawiatury */
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.opt:hover { border-color: var(--ink-3); }
.opt input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.opt input:focus-visible + .opt-inner { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.opt-inner { display: flex; align-items: center; gap: 0.6rem; width: 100%; }
.opt:has(input:checked) {
  border-color: var(--ink);
  background: #F7F8F4;
  box-shadow: inset 0 0 0 1px var(--ink);
}
/* znacznik zaznaczenia — nie tylko kolor */
.opt-mark {
  flex: none;
  width: 18px; height: 18px;
  border: 1.5px solid #B9BCB4;
  border-radius: 50%;
  display: grid; place-items: center;
  transition: border-color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.opt-mark::after {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: transparent;
  transition: background-color 0.14s var(--ease), transform 0.14s var(--ease);
  transform: scale(0.4);
}
.opt:has(input:checked) .opt-mark { border-color: var(--ink); background: var(--lime); }
.opt:has(input:checked) .opt-mark::after { background: var(--on-lime); transform: scale(1); }

.opt-text { display: flex; flex-direction: column; gap: 0.05rem; min-width: 0; }
.opt-name { font-size: 0.9375rem; font-weight: 600; line-height: 1.25; }
.opt-price {
  font-size: 0.75rem; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.opt:has(input:checked) .opt-price { color: var(--ink-2); }

/* model: nazwa + krótki opis */
.opt-model { min-height: 60px; align-items: flex-start; padding-top: 0.65rem; padding-bottom: 0.65rem; }
.opt-model .opt-inner { align-items: flex-start; }
.opt-model .opt-mark { margin-top: 0.15rem; }

/* kolor: duży swatch nad etykietą */
.opt-color {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.4rem;
}
.opt-color .opt-inner { flex-direction: column; align-items: stretch; gap: 0.4rem; }
.opt-color .opt-mark {
  position: absolute; top: 0.62rem; right: 0.55rem;
  width: 16px; height: 16px;
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(14, 16, 19, 0.28);
}
.opt-color .opt-text { gap: 0.02rem; padding-inline: 0.1rem; }
.swatch {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  border: 1px solid rgba(14, 16, 19, 0.16);
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.25);
}
.opt-color .opt-price { font-size: 0.6875rem; }

/* podsumowanie */
.summary {
  margin-top: 0.25rem;
  padding-top: clamp(1rem, 0.7rem + 0.8vw, 1.35rem);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 0.85rem;
}
.summary-line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: 0.8125rem; color: var(--ink-2);
}
.summary-cfg { text-align: right; font-weight: 600; color: var(--ink); }
.summary-total {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.25rem 1rem;
}
.total-label {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--ink-3);
}
.total-value {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  margin-top: 0.1rem;
}
.summary-note {
  min-height: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink-2);
}
.summary-note.is-error { color: var(--danger); }

/* ---------- jak to działa ---------- */
.how { padding-block: var(--section-y); }
.steps {
  display: grid; gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.step {
  background: var(--card);
  padding: clamp(1.25rem, 0.9rem + 1.4vw, 2rem);
  display: flex; flex-direction: column; gap: 0.55rem;
}
.step-num {
  font-family: var(--font-display);
  font-size: 0.8125rem; font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--ink-3);
}
.step h3 { font-size: var(--step-2); font-weight: 700; }
.step p { color: var(--ink-2); font-size: 0.9375rem; line-height: 1.55; }

/* ---------- stopka ---------- */
.site-footer {
  background: var(--graphite);
  color: var(--on-dark);
  padding-top: clamp(2.5rem, 1.5rem + 4vw, 4.5rem);
}
.footer-grid {
  display: grid; gap: 2rem 1.5rem;
  grid-template-columns: 1fr;
  padding-bottom: clamp(2rem, 1.2rem + 2.6vw, 3.25rem);
}
.brand-dark { color: var(--on-dark); margin-right: 0; }
.brand-dark .brand-word { letter-spacing: 0.2em; }
.footer-claim {
  margin-top: 0.9rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: -0.028em;
  line-height: 1.15;
  max-width: 22ch;
}
.footer-mail {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 0.75rem;
  color: var(--lime);
  font-weight: 600;
  text-decoration-color: rgba(204, 255, 60, 0.4);
}
.footer-mail:hover { text-decoration-color: var(--lime); }
.footer-h {
  font-family: var(--font-display);
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--on-dark-2);
  margin-bottom: 0.75rem;
}
.footer-nav ul, .footer-col ul { display: flex; flex-direction: column; gap: 0.05rem; }
.footer-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.9375rem;
  color: var(--on-dark);
  text-decoration: none;
}
.footer-nav a { text-decoration-color: transparent; }
.footer-nav a:hover, .footer-nav a:focus-visible { text-decoration: underline; text-decoration-color: var(--lime); }
.footer-col li {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-dark-2);
}
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 0.4rem 2rem;
  justify-content: space-between; align-items: baseline;
  padding-block: 1.35rem 1.75rem;
  border-top: 1px solid rgba(242, 242, 239, 0.12);
  font-size: 0.8125rem;
  color: var(--on-dark-2);
}
.footer-legal a {
  display: inline-flex; align-items: center; min-height: 44px;
  color: var(--on-dark); font-weight: 600;
  text-decoration-color: rgba(242,242,239,0.35);
}
.footer-legal a:hover { text-decoration-color: var(--lime); }

/* ---------- koszyk ---------- */
.drawer {
  position: fixed; inset: 0; z-index: 80;
  display: grid; justify-items: end;
  grid-template-columns: 1fr;
}
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(14, 16, 19, 0.55);
  backdrop-filter: blur(2px);
  animation: fade 0.18s var(--ease);
}
.drawer-panel {
  position: relative;
  display: flex; flex-direction: column;
  width: min(100%, 460px);
  height: 100%;
  background: var(--card);
  box-shadow: var(--shadow-3);
  animation: slideIn 0.24s var(--ease);
  overscroll-behavior: contain;
}
@keyframes fade { from { opacity: 0; } }
@keyframes slideIn { from { transform: translateX(24px); opacity: 0.6; } }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.15rem;
  background: var(--graphite);
  color: var(--on-dark);
  flex: none;
}
.drawer-head h2 {
  font-size: 1.25rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.icon-btn {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px;
  border: 1px solid rgba(242, 242, 239, 0.18);
  border-radius: var(--r-sm);
  background: transparent; color: var(--on-dark);
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { background: rgba(242, 242, 239, 0.10); border-color: rgba(242, 242, 239, 0.38); }

.drawer-body { flex: 1; overflow-y: auto; padding: 1.15rem; overscroll-behavior: contain; }
.cart-empty {
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: 2rem 0.5rem;
  text-align: center;
  color: var(--ink-2);
}
.cart-empty .empty-h {
  font-family: var(--font-display);
  font-size: 1.125rem; font-weight: 700; color: var(--ink);
}
.cart-empty p { font-size: 0.9375rem; }
.cart-empty .btn { margin-top: 0.6rem; align-self: center; }
.cart-empty[hidden] { display: none; }

.cart-list { display: flex; flex-direction: column; gap: 0.85rem; }
.cart-list:empty { display: none; }
.cart-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0.85rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; padding-bottom: 0; }
.ci-thumb {
  background: var(--graphite);
  border-radius: var(--r-sm);
  overflow: hidden;
  aspect-ratio: 1 / 1;
}
.ci-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ci-main { min-width: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.ci-top { display: flex; align-items: baseline; justify-content: space-between; gap: 0.6rem; }
.ci-name { font-family: var(--font-display); font-size: 1rem; font-weight: 700; letter-spacing: -0.015em; }
.ci-price {
  font-family: var(--font-display); font-size: 0.9375rem; font-weight: 700;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.ci-cfg { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.4; }
.ci-row { display: flex; align-items: center; justify-content: space-between; gap: 0.6rem; margin-top: 0.2rem; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.qty button {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border: 0; background: var(--card); color: var(--ink);
  cursor: pointer;
  font-size: 1.125rem; font-weight: 600; line-height: 1;
  transition: background-color 0.14s var(--ease);
}
.qty button:hover { background: #F0F1EB; }
.qty button:disabled { color: #B4B7AE; cursor: not-allowed; background: var(--card); }
.qty output, .qty span {
  min-width: 28px; text-align: center;
  font-size: 0.875rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ci-remove {
  min-height: 40px;
  padding: 0.3rem 0.5rem;
  border: 0; background: transparent;
  color: var(--ink-3);
  font-size: 0.8125rem; font-weight: 600;
  text-decoration: underline; text-underline-offset: 3px;
  cursor: pointer;
}
.ci-remove:hover { color: var(--danger); }

.drawer-foot {
  flex: none;
  border-top: 1px solid var(--line);
  background: #FAFAF7;
  padding: 1rem 1.15rem 1.15rem;
  display: flex; flex-direction: column; gap: 0.35rem;
}
.cart-sumline {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: 0.875rem; color: var(--ink-2);
}
.cart-sumval, .cart-total { font-variant-numeric: tabular-nums; color: var(--ink); font-weight: 600; }
.cart-sumtotal { margin-top: 0.15rem; }
.cart-sumtotal span:first-child { font-weight: 600; }
.cart-total {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700; letter-spacing: -0.03em;
}
.drawer-foot .demo-block { margin-top: 0; }
.cart-disclaimer {
  margin: 0.35rem 0 0.7rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--ink-2);
  padding: 0.6rem 0.65rem;
  background: #F2F1EC;
  border-left: 3px solid var(--ink);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.drawer-foot .btn:disabled {
  background: #E7E6E0; border-color: #E7E6E0; color: #85888E;
  cursor: not-allowed;
}

body.is-locked { overflow: hidden; }

/* ---------- responsywność ---------- */
@media (min-width: 560px) {
  .head-inner { min-height: 72px; flex-wrap: nowrap; }
  .nav { order: 0; flex: 0 1 auto; margin-right: 0.5rem; }
  .nav a { font-size: 0.9375rem; }
  .cart-label { display: inline; }
  .hero-facts { gap: 1.5rem 2.5rem; }
  .model-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .opt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opt-grid-model { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid-color { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .hero { padding-top: clamp(2.5rem, 1rem + 3vw, 4.5rem); }
  .hero-grid {
    grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 1rem + 3vw, 4rem);
    align-items: center;
  }
  .hero-stage { margin-right: calc(var(--pad-x) * -0.34); }
  .stage-canvas { aspect-ratio: 6 / 5; }
  .stage-tall .stage-canvas, .stage-tall .stage-poster { aspect-ratio: 4 / 5; }
  .config-grid { grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr); }
  .config-stage { position: sticky; top: 88px; }
  .opt-grid-color { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr; }
}

@media (min-width: 1180px) {
  .model-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opt-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .opt-grid-model { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .opt-grid-model .opt { flex-direction: column; align-items: flex-start; gap: 0.3rem; }
  .opt-grid-model .opt-inner { flex-direction: column; align-items: flex-start; gap: 0.2rem; }
  .opt-grid-model .opt-mark { position: absolute; top: 0.6rem; right: 0.55rem; }
  .stage-tall .stage-canvas, .stage-tall .stage-poster { aspect-ratio: 1 / 1; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .model-card:hover { transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ---------- wysokie kontrasty / wymuszony kolor ---------- */
@media (forced-colors: active) {
  .opt:has(input:checked) { outline: 3px solid Highlight; outline-offset: -1px; }
  .opt-mark { border-color: Highlight; }
  .btn-primary { border: 2px solid ButtonText; }
  .cart-count { forced-color-adjust: none; background: Highlight; color: HighlightText; }
}

/* ---------- druk ---------- */
@media print {
  .site-header, .drawer, .stage-hint, .filters { display: none !important; }
  body { background: #fff; }
}
