/* ==========================================================================
   header.css – nagłówek (Figma: Group 1, 1728×149), przełącznik motywu, menu mobilne
   ========================================================================== */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
}
.site-header__inner {
  display: flex; align-items: center; gap: 12px; height: 76px; padding: 0 16px;
  max-width: 1728px; margin-inline: auto; position: relative;
}
.brand { position: relative; z-index: 2; display: block; flex: none; width: 118px; }
.brand img { width: 100%; height: auto; }

/* przełącznik motywu: pigułka 66×30, gałka 25 px; Purple = gałka po lewej, Emerald = po prawej */
.theme-toggle {
  position: relative; z-index: 2; flex: none; width: 52px; height: 24px; padding: 0; border: 0; border-radius: 999px;
  background: var(--accent); transition: background-color .25s ease;
}
.theme-toggle__knob {
  position: absolute; top: 50%; left: 2px; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: #fff; transition: transform .25s ease;
}
html[data-theme="emerald"] .theme-toggle__knob { transform: translateX(28px); }

.search-btn {
  position: relative; z-index: 2; flex: none; margin-left: auto; width: 40px; height: 40px; padding: 0;
  display: grid; place-items: center; background: none; border: 0; border-radius: 50%; cursor: default;
}
.search-btn img { width: 24px; height: 24px; }

/* przycisk menu (tylko telefon) */
.menu-btn { position: relative; z-index: 2; flex: none; width: 40px; height: 40px; padding: 0; background: none; border: 0; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after {
  position: absolute; left: 9px; width: 22px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.menu-btn__bars { top: 19px; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; left: 0; }
.menu-btn__bars::before { top: -7px; }
.menu-btn__bars::after { top: 7px; }
.menu-open .menu-btn__bars { background: transparent; }
.menu-open .menu-btn__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-open .menu-btn__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* nawigacja – telefon: pełnoekranowy panel */
.site-nav {
  position: fixed; inset: 0; z-index: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  background: rgba(0, 0, 0, .97); visibility: hidden; opacity: 0; transition: opacity .25s ease, visibility .25s;
}
.menu-open .site-nav { visibility: visible; opacity: 1; }
.site-nav a { padding: 14px 28px; font-weight: 700; font-size: 28px; line-height: 1; letter-spacing: var(--ls); }
.site-nav a:hover { opacity: .75; }
.menu-open { overflow: hidden; }

/* telefon: kontener nagłówka nie może „łapać" position:fixed panelu */
@media (max-width: 699.98px) {
  .site-header { container-type: normal; }
}

/* ---------- tablet ---------- */
@media (min-width: 700px) {
  .site-header__inner { height: 104px; padding: 0 clamp(24px, 4vw, 56px); gap: 20px; }
  .brand { width: clamp(150px, 19vw, 200px); }
  .theme-toggle { width: 66px; height: 30px; }
  .theme-toggle__knob { left: 3px; width: 25px; height: 25px; margin-top: -12.5px; }
  html[data-theme="emerald"] .theme-toggle__knob { transform: translateX(34px); }
  .menu-btn { display: none; }
  .site-nav {
    position: static; inset: auto; z-index: auto; flex-direction: row; gap: 0; margin-left: auto;
    background: none; visibility: visible; opacity: 1;
  }
  .site-nav a { padding: 14px clamp(14px, 2.4vw, 30px); font-size: 18px; }
  .search-btn { margin-left: 4px; }
}

/* ---------- desktop: współrzędne z Figmy ---------- */
@media (min-width: 1280px) {
  .site-header::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: calc(149 * var(--u)); pointer-events: none;
    background: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, 0) 100%);
  }
  .site-header__inner { display: block; height: calc(149 * var(--u)); padding: 0; }
  .brand { position: absolute; left: calc(70 * var(--u)); top: calc(37 * var(--u)); width: calc(245 * var(--u)); }
  .theme-toggle { position: absolute; left: calc(332 * var(--u)); top: calc(59 * var(--u)); width: calc(66 * var(--u)); height: calc(30 * var(--u)); }
  .theme-toggle__knob {
    left: calc(3 * var(--u)); width: calc(25 * var(--u)); height: calc(25 * var(--u)); margin-top: calc(-12.5 * var(--u));
  }
  html[data-theme="emerald"] .theme-toggle__knob { transform: translateX(calc(34 * var(--u))); }
  .site-nav { position: absolute; inset: 0; margin: 0; pointer-events: none; }
  .site-nav a {
    position: absolute; top: 0; width: calc(172 * var(--u)); height: calc(149 * var(--u)); padding: 0; pointer-events: auto;
    display: flex; align-items: center; justify-content: center; font-size: calc(20 * var(--u)); letter-spacing: var(--ls);
  }
  .site-nav a:nth-child(1) { left: calc(1144 * var(--u)); }
  .site-nav a:nth-child(2) { left: calc(1316 * var(--u)); }
  .search-btn { position: absolute; left: calc(1517 * var(--u)); top: calc(50 * var(--u)); width: calc(45 * var(--u)); height: calc(49 * var(--u)); margin: 0; }
}

/* ---------- linki do ofert w menu mobilnym (tylko telefon; desktop/tablet bez zmian) ---------- */
.site-nav__offers { display: flex; flex-direction: column; align-items: center; gap: 0; margin-top: 18px; padding-top: 22px; border-top: 1px solid var(--rule); width: min(280px, 70%); }
.site-nav__offers a { padding: 10px 12px; font-weight: 400; font-size: 17px; color: var(--font-3); text-align: center; }
.site-nav__offers a[aria-current="page"] { color: #fff; text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 6px; }
@media (min-width: 700px) { .site-nav__offers { display: none; } }
