/* ============================================================
   gisty® base — font, reset, typografia, atomy wspólne.
   ============================================================ */

/* --- Outfit: self-hosted variable font (RODO: zero Google Fonts CDN) --- */
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/outfit-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Dekoracyjne bloby wystają poza kadr (right:-120px itp.) — bez przycięcia
   robią poziomy scroll na mobile i rozjeżdżają elementy fixed (mini-koszyk).
   `clip` nie tworzy scroll-containera (sticky działa); `hidden` = fallback. */
html, body { overflow-x: hidden; overflow-x: clip; }
body {
  font-family: var(--g-font);
  color: var(--g-ink);
  background: var(--g-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--g-accent); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--g-accent-hover); }
input, button, select, textarea { font-family: var(--g-font); }
::selection { background: var(--g-selection); }

/* --- Typografia --- */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: var(--g-tracking-tight); margin: 0 0 0.5em; }
h1 { font-size: var(--g-h1); font-weight: 700; }
h2 { font-size: var(--g-h2); font-weight: 700; }
h1 em, h2 em { font-style: normal; color: var(--g-accent); }

/* --- Layout helpers --- */
.g-wrap { max-width: var(--g-content); margin: 0 auto; padding-inline: clamp(20px, 5vw, 40px); }
.g-wrap--narrow { max-width: var(--g-content-narrow); }
.g-section { padding-block: var(--g-section-pad); }

/* --- Atomy --- */
.g-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border: none; cursor: pointer; white-space: nowrap;
  font-weight: 600; font-size: 15px; line-height: 1;
  padding: 15px 28px; border-radius: var(--g-r-pill);
  background: var(--g-ink); color: var(--g-bg);
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.g-btn:hover { background: var(--g-accent); color: #fff; }
.g-btn--accent { background: var(--g-accent); color: #fff; }
.g-btn--accent:hover { background: var(--g-accent-hover); }
.g-btn--outline { background: transparent; color: var(--g-ink); box-shadow: inset 0 0 0 1.5px var(--g-border); }
.g-btn--outline:hover { background: var(--g-ink); color: var(--g-bg); box-shadow: none; }

.g-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--g-r-pill);
  font-size: 13px; font-weight: 600;
  background: var(--g-surface-soft); color: var(--g-ink);
}
.g-pill--dark { background: var(--g-ink); color: var(--g-bg); }
.g-pill--success { background: var(--g-success-bg); color: var(--g-success); }
/* konwencja: zielone TYLKO informacje o stanie; promocje/rabaty na różowo */
.g-pill--promo { background: var(--g-surface-soft); color: var(--g-accent-hover); }
/* niski stan — bursztyn, żeby nie mylił się z promocją (różowa) ani z „Na stanie" (zielona) */
.g-pill--low { background: var(--g-warn-bg); color: var(--g-warn); }
/* Brak dostępności to informacja, która ma być widoczna od razu — neutralna pigułka
   ginęła obok ceny (jej uwaga 29.08). Kontrast jak w komunikatach o błędach. */
.g-pill--out { background: #FBEDEA; color: #A03D2B; border: 1px solid #E7C3BA; }

.g-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  text-transform: uppercase; letter-spacing: var(--g-tracking-eyebrow);
  font-size: 12.5px; font-weight: 600; color: var(--g-eyebrow);
}
.g-eyebrow::before, .g-eyebrow::after {
  content: ''; width: 22px; height: 2px; border-radius: 2px; background: var(--g-accent);
}
.g-eyebrow--start::before { display: none; }

.g-card {
  background: #fff; border-radius: var(--g-r-card);
  box-shadow: var(--g-shadow-card);
}

.g-input {
  border: 1.5px solid var(--g-border); background: var(--g-bg);
  border-radius: var(--g-r-pill); padding: 14px 20px;
  font-size: 15px; color: var(--g-ink); outline: none; width: 100%;
  transition: border-color 0.15s ease;
}
.g-input:focus { border-color: var(--g-accent); }

.g-blob-img { border-radius: var(--g-blob); overflow: hidden; box-shadow: var(--g-shadow-media); }

/* Fala-separator: użycie <div class="g-wave" data-flip> z inline SVG */
.g-wave { display: block; width: 100%; height: var(--g-wave-h); line-height: 0; }
.g-wave svg { width: 100%; height: 100%; display: block; }
.g-wave[data-flip] { transform: scaleY(-1); }

/* --- Dostępność --- */
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Atrybut [hidden] ma ZAWSZE wygrywać z display ustawionym na klasie
   (toast „Dodano do koszyka" wisiał na stałe przez display:flex) */
[hidden] { display: none !important; }
