/* ============================================================
   Warstwowo — theme.css
   Layout + komponenty (chrome, hero, karty, przyciski, stopka).
   Opiera się wyłącznie o tokeny z assets/css/tokens/*.
   ============================================================ */

/* ---- Reset / podstawy ---- */
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb {
  background: var(--ink-200);
  border-radius: 8px;
  border: 3px solid var(--paper);
}

.ws-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--surface-page);
  color: var(--text-body);
}
#ws-content { flex: 1 0 auto; }

.ws-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-inline: var(--container-pad);
}
.ws-section { padding-block: var(--space-10); }

.ws-skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: var(--z-toast);
  background: var(--ink-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius-md) 0;
}
.ws-skip-link:focus { left: 0; }

:where(a, button, input, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--shadow-focus);
  border-radius: var(--radius-sm);
}

/* ---- Przyciski ---- */
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 48px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  font-family: var(--font-sans);
  font-weight: var(--fw-semibold);
  font-size: var(--text-md);
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: filter var(--dur-base) var(--ease-out),
    transform var(--dur-fast) var(--ease-out),
    background var(--dur-base), color var(--dur-base);
}
.ws-btn:hover { text-decoration: none; }
.ws-btn:active { transform: translateY(1px); }
.ws-btn--primary {
  background: var(--molten-500);
  border-color: var(--molten-500);
  color: #fff;
  box-shadow: var(--shadow-brand);
}
.ws-btn--primary:hover { filter: brightness(0.95); }
.ws-btn--ghost {
  background: var(--white);
  border-color: var(--border-strong);
  color: var(--ink-900);
}
.ws-btn--ghost:hover { background: var(--ink-50); }
.ws-btn--dark {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: #fff;
}
.ws-btn--dark:hover { filter: brightness(1.15); }
.ws-btn--block { width: 100%; }
.ws-btn--lg { height: 54px; padding: 0 var(--space-6); }

/* ---- Nagłówek ---- */
.ws-header { position: sticky; top: 0; z-index: var(--z-header); }

.ws-topbar {
  background: var(--ink-900);
  color: var(--ink-100);
  font-size: var(--text-xs);
  padding: 8px 0;
}
.ws-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
}
.ws-topbar__item { display: inline-flex; align-items: center; gap: 7px; }
.ws-topbar__sep { opacity: 0.35; }

.ws-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border-subtle);
}
.ws-bar__inner {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  padding-block: 14px;
}

.ws-burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-800);
  padding: 4px;
}

.ws-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}
.ws-logo__word {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: 25px;
  letter-spacing: -0.03em;
  color: var(--ink-900);
}
.ws-logo__o { color: var(--molten-500); }

.ws-search { flex: 1; max-width: 560px; }
.ws-searchform {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 16px;
  background: var(--white);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
}
.ws-searchform__icon { color: var(--text-muted); display: flex; }
.ws-searchform__input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  color: var(--ink-900);
}
.ws-searchform__submit {
  background: var(--molten-500);
  color: #fff;
  border: none;
  border-radius: 8px;
  height: 32px;
  padding: 0 16px;
  font-weight: var(--fw-semibold);
  font-size: var(--text-xs);
  cursor: pointer;
  transition: filter var(--dur-base);
}
.ws-searchform__submit:hover { filter: brightness(0.95); }

.ws-actions { display: flex; align-items: center; gap: var(--space-1); margin-left: auto; }
.ws-action {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--ink-700);
  padding: 4px 8px;
  font-size: 11px;
  text-decoration: none;
  transition: color var(--dur-base);
}
.ws-action:hover { color: var(--molten-600); text-decoration: none; }
.ws-action__count {
  position: absolute;
  top: -2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  background: var(--molten-500);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-family: var(--font-mono);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ws-action__count.is-empty { display: none; }

.ws-nav {
  background: var(--white);
  border-bottom: 1px solid var(--border-subtle);
}
.ws-nav__inner {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  height: 48px;
}
.ws-nav__all {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--ink-900);
  color: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-weight: var(--fw-semibold);
  font-size: var(--text-xs);
  margin-right: var(--space-2);
  text-decoration: none;
  white-space: nowrap;
}
.ws-nav__all:hover { text-decoration: none; filter: brightness(1.15); }
.ws-nav__menu {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.ws-nav__menu a, .ws-nav__link {
  display: inline-flex;
  align-items: center;
  color: var(--ink-700);
  font-weight: var(--fw-medium);
  font-size: 13.5px;
  padding: 0 12px;
  height: 34px;
  border-radius: 8px;
  text-decoration: none;
  transition: color var(--dur-base);
}
.ws-nav__menu a:hover, .ws-nav__link:hover { color: var(--molten-600); text-decoration: none; }

/* ---- Szuflada mobilna ---- */
.ws-drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 86vw);
  background: var(--white);
  z-index: var(--z-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform var(--dur-slow) var(--ease-out);
  box-shadow: var(--shadow-xl);
}
.ws-drawer.is-open { transform: translateX(0); }
.ws-drawer[hidden] { display: flex; }
.ws-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-subtle);
}
.ws-drawer__title { font-family: var(--font-display); font-weight: var(--fw-semibold); }
.ws-drawer__close { background: none; border: none; cursor: pointer; color: var(--ink-800); padding: 4px; }
.ws-drawer__body { overflow-y: auto; padding: var(--space-3) var(--space-2); }
.ws-drawer__menu, .ws-drawer__body ul { list-style: none; margin: 0; padding: 0; }
.ws-drawer__body a {
  display: block;
  padding: 12px var(--space-4);
  color: var(--ink-800);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-md);
  text-decoration: none;
}
.ws-drawer__body a:hover { background: var(--ink-50); color: var(--molten-600); text-decoration: none; }
.ws-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(26, 22, 20, 0.5);
  z-index: var(--z-overlay);
  opacity: 0;
  transition: opacity var(--dur-base);
}
.ws-drawer-backdrop.is-open { opacity: 1; }

/* ---- Nagłówki sekcji ---- */
.ws-sec { max-width: var(--container-max); margin: 0 auto; padding: var(--space-10) var(--container-pad) var(--space-2); }
.ws-sec__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
}
.ws-sec__title {
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-2xl);
  letter-spacing: -0.02em;
  color: var(--ink-900);
  margin: 0;
}
.ws-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--molten-600);
}
.ws-sec__more {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--molten-600);
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  text-decoration: none;
}
.ws-sec__more:hover { text-decoration: underline; }

/* ---- Hero: split ---- */
.ws-hero-split { background: var(--paper); }
.ws-hero-split__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 56px var(--container-pad);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-12);
  align-items: center;
}
.ws-hero-split__text { flex: 1 1 380px; }
.ws-hero-split__title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--ink-900);
  margin: 14px 0 0;
}
.ws-hero-split__lead { font-size: 1.1rem; line-height: 1.6; color: var(--text-body); margin: 18px 0 0; max-width: 460px; }
.ws-hero-split__cta { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }
.ws-hero-split__stats { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-8); }
.ws-stat__num { font-family: var(--font-mono); font-weight: var(--fw-semibold); font-size: 1.4rem; color: var(--ink-900); }
.ws-stat__label { font-size: 13px; color: var(--text-muted); }
.ws-hero-split__art {
  flex: 1 1 380px;
  position: relative;
  min-height: 420px;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  background: linear-gradient(165deg, var(--ink-800), var(--ink-900));
  box-shadow: var(--shadow-xl);
}
.ws-hero-split__art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 13px, rgba(242, 84, 27, 0.10) 13px 15px);
}
.ws-hero-split__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 70% 15%, rgba(242, 84, 27, 0.30), transparent 60%);
}

/* ---- Karuzela hero ---- */
.ws-carousel { background: var(--paper); }
.ws-carousel__wrap { max-width: var(--container-max); margin: 0 auto; padding: 40px var(--container-pad); }
.ws-carousel__viewport {
  position: relative;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--ink-900);
}
.ws-carousel__track {
  display: flex;
  transition: transform var(--dur-slow) var(--ease-out);
}
.ws-slide {
  flex: 0 0 100%;
  min-width: 100%;
  position: relative;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 0;
  color: #fff;
  min-height: 400px;
  display: block;
  text-decoration: none;
  background: linear-gradient(120deg, var(--molten-600), var(--molten-500));
  background-size: cover;
  background-position: center;
}
.ws-slide--alt1 { background: linear-gradient(150deg, var(--ink-800), var(--ink-900)); }
.ws-slide--alt2 { background: linear-gradient(150deg, var(--teal-700), var(--teal-500)); }
.ws-slide--alt3 { background: linear-gradient(150deg, var(--molten-700), var(--molten-500)); }
.ws-slide--alt4 { background: linear-gradient(150deg, var(--ink-700), var(--molten-700)); }
.ws-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 14px, rgba(255, 255, 255, 0.07) 14px 16px);
}
.ws-slide__body { position: relative; max-width: 620px; padding: 56px 56px 64px; }
.ws-slide__eyebrow {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.22);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
}
.ws-slide__title {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  font-size: clamp(2rem, 4.4vw, 3.2rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 16px 0 0;
  color: #fff;
}
.ws-slide__sub { font-size: 1.05rem; line-height: 1.55; margin: 14px 0 0; max-width: 440px; color: rgba(255, 255, 255, 0.92); }
.ws-slide__cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  height: 50px;
  padding: 0 24px;
  background: var(--ink-900);
  color: #fff;
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  font-size: 15px;
}
.ws-slide__offer {
  position: absolute;
  top: 28px;
  right: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-xl);
  padding: 16px 22px;
  backdrop-filter: blur(4px);
}
.ws-slide__offer-small { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; }
.ws-slide__offer-big { font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 2.6rem; line-height: 0.9; letter-spacing: -0.03em; }

.ws-carousel__arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  background: rgba(251, 250, 247, 0.9);
  color: var(--ink-900);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
}
.ws-carousel__arrow--prev { left: 16px; }
.ws-carousel__arrow--next { right: 16px; }
.ws-carousel__dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ws-carousel__dot {
  height: 8px;
  width: 8px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  transition: width var(--dur-base) var(--ease-out), background var(--dur-base);
}
.ws-carousel__dot.is-active { width: 26px; background: #fff; }

/* ---- Kafelki kategorii ---- */
.ws-cat-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.ws-cat-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
}
.ws-cat-tile:hover { text-decoration: none; box-shadow: var(--shadow-md); }
.ws-cat-tile__name { font-weight: var(--fw-semibold); font-size: 14px; color: var(--ink-900); }
.ws-cat-tile__count { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }

.ws-cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
.ws-cat-card {
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transition: box-shadow var(--dur-base), transform var(--dur-base);
}
.ws-cat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); text-decoration: none; }
.ws-cat-card__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--molten-50);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--molten-600);
}
.ws-cat-card__name { font-family: var(--font-display); font-weight: var(--fw-semibold); font-size: 1rem; color: var(--ink-900); }
.ws-cat-card__blurb { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.ws-cat-card__count { font-family: var(--font-mono); font-size: 12px; color: var(--text-faint); margin-top: auto; }

/* ---- Pasek promo / baner marki ---- */
.ws-promo-strip {
  border-radius: var(--radius-xl);
  background: linear-gradient(120deg, var(--molten-600), var(--molten-500));
  color: #fff;
  padding: 28px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.ws-promo-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(180deg, transparent 0 13px, rgba(255, 255, 255, 0.07) 13px 15px);
}
.ws-promo-strip__kicker { position: relative; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.ws-promo-strip__title { position: relative; font-family: var(--font-display); font-weight: var(--fw-bold); font-size: 1.6rem; letter-spacing: -0.02em; margin-top: 4px; }

/* ---- Pasek zaufania ---- */
.ws-trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.ws-trust__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.ws-trust__icon { color: var(--molten-600); flex-shrink: 0; }
.ws-trust__title { font-weight: var(--fw-semibold); color: var(--ink-900); }
.ws-trust__note { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ---- Breadcrumbs ---- */
.ws-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.ws-crumbs__link { color: var(--text-muted); }
.ws-crumbs__sep { color: var(--text-faint); }
.ws-crumbs__current { color: var(--ink-900); font-weight: var(--fw-semibold); }
.ws-crumbs__tpl { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); }

/* ---- Stopka ---- */
.ws-foot {
  flex-shrink: 0;
  background: var(--ink-900);
  color: var(--ink-200);
  margin-top: var(--space-16);
  padding-block: var(--space-12) var(--space-8);
}
.ws-foot__trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding-bottom: var(--space-10);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.ws-foot__trust-item { display: flex; gap: 14px; align-items: flex-start; }
.ws-foot__trust-icon { color: var(--molten-400); flex-shrink: 0; }
.ws-foot__trust-title { font-weight: var(--fw-semibold); color: #fff; }
.ws-foot__trust-note { font-size: 13px; color: var(--ink-300); margin-top: 2px; }
.ws-foot__cols {
  display: grid;
  grid-template-columns: 1.6fr repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-8);
  padding-block: var(--space-10);
}
.ws-foot .ws-logo__word { color: #fff; }
.ws-foot__tagline { margin-top: var(--space-4); max-width: 340px; color: var(--ink-300); font-size: var(--text-sm); }
.ws-foot__title { color: #fff; font-size: var(--text-md); margin-bottom: var(--space-3); }
.ws-foot__list, .ws-foot__widgets ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ws-foot__widgets a, .ws-foot__list a { color: var(--ink-200); font-size: var(--text-sm); }
.ws-foot__widgets a:hover, .ws-foot__list a:hover { color: var(--molten-400); }
.ws-foot__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-6);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: var(--text-xs);
  color: var(--ink-300);
}
.ws-foot__legal { list-style: none; display: flex; gap: var(--space-5); margin: 0; padding: 0; }
.ws-foot__legal a { color: var(--ink-300); }
.ws-foot__legal a:hover { color: var(--molten-400); }

/* ---- 404 ---- */
.ws-404 { text-align: center; max-width: 520px; }
.ws-404__mark { display: inline-block; opacity: 0.6; }
.ws-404__title { font-size: var(--text-3xl); margin-top: var(--space-5); }
.ws-404__text { color: var(--text-muted); margin-top: var(--space-3); }
.ws-404__actions { display: flex; gap: var(--space-3); justify-content: center; margin-top: var(--space-6); flex-wrap: wrap; }

/* ---- Treść stron ---- */
.ws-page__title { font-size: var(--text-3xl); margin-bottom: var(--space-6); }
.ws-page__content > * + * { margin-top: var(--space-4); }

/* ---- Responsywność ---- */
@media (max-width: 880px) {
  .ws-topbar { font-size: 12px; }
  .ws-topbar__inner { gap: var(--space-3); }
  .ws-burger { display: inline-flex; }
  .ws-nav { display: none; }
  .ws-actions .ws-action:not(.ws-action--cart) { display: none; }
  .ws-action__label { display: none; }
  .ws-bar__inner { gap: var(--space-3); }
  .ws-search { order: 3; flex-basis: 100%; max-width: none; }
  .ws-logo__word { font-size: 21px; }
}
@media (min-width: 881px) {
  .ws-drawer, .ws-drawer-backdrop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .ws-carousel__track,
  .ws-drawer,
  .ws-drawer-backdrop,
  .ws-cat-card,
  .ws-btn { transition: none; }
}
