/* ==========================================================================
   app-header — WSPÓLNY header storefrontu (sklep + landing).
   Wydzielony z shop.css/storefront.css/layout.php, by landing.php (standalone,
   bez shop.css) mógł renderować PIKSEL-IDENTYCZNY header bez ciągnięcia
   globalnych resetów body/a/html (które rozjechałyby autorską typografię hero).

   Tokeny (--bg-card itd.) rozwiązują się na sklepie z :root w shop.css (więc
   dark-mode działa). Na landingu tokenów brak => używane są fallbacki (light).
   ========================================================================== */

.app-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height, 64px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  background: var(--bg-card, #ffffff);
  border-bottom: 1px solid var(--border, #d4dce6);
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0, 0, 0, 0.05));
  z-index: 50;
}

.logo { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; flex-shrink: 0; }
/* Logo kolorowe (ciemna dominanta). Na jasnym tle bez filtra - kolory są czytelne.
   W trybie ciemnym (landing navy) rozjaśniamy do bieli, bo ciemne logo zlałoby się z tłem. */
.logo__img { height: 30px; width: auto; display: block; }
[data-theme="dark"] .logo__img { filter: brightness(0) invert(1); }
.logo__text {
  font-family: 'Montserrat', var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif);
  font-weight: 900;
  font-size: 16px;
  letter-spacing: 1px;
  color: var(--text-primary, #0b1426);
  text-transform: uppercase;
}

.app-header__right { display: flex; align-items: center; gap: 10px; min-width: 0; }

/* Link "Kategorie" (był w storefront.css). */
.app-header__nav-link {
  color: var(--text-primary, #0b1426);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  margin-right: 8px;
  white-space: nowrap;
}
.app-header__nav-link:hover { color: var(--accent, #c8a258); }

.app-header__icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border, #d4dce6);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-card, #ffffff);
  color: var(--text-secondary, #3d5a80);
  cursor: pointer;
  transition: all var(--transition, 150ms cubic-bezier(0.4, 0, 0.2, 1));
}
.app-header__icon-btn:hover { color: var(--accent, #c8a258); border-color: var(--accent, #c8a258); }

.app-header__cart,
.app-header__account {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px; height: 38px;
  border-radius: var(--radius-sm, 6px);
  color: var(--text-secondary, #3d5a80);
}
.app-header__cart:hover,
.app-header__account:hover { color: var(--accent, #c8a258); }
.app-header__cart-count {
  position: absolute;
  top: -2px; right: -2px;
  min-width: 18px; height: 18px;
  padding: 0 4px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--accent-text, #ffffff);
  background: var(--accent, #c8a258);
  border-radius: 9px;
}

/* Tożsamość konta w headerze (#12) — przeniesione z inline <style> layout.php. */
.app-header__whoami { font-size: 12px; color: var(--text-secondary, #3d5a80); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app-header__whoami b { font-weight: 700; }
.app-header__logout { display: inline; margin: 0; }
.app-header__link-btn { background: none; border: none; padding: 4px 6px; font: inherit; font-size: 12px; color: var(--text-secondary, #3d5a80); cursor: pointer; }
.app-header__link-btn:hover { color: var(--accent, #c8a258); text-decoration: underline; }

@media (max-width: 520px) {
  .app-header__whoami { display: none; }
  .app-header__link-btn { border: 1px solid var(--border, #d6dce5); border-radius: 999px; padding: 6px 12px; }
}
@media (max-width: 480px) {
  .app-header__nav-link { font-size: 13px; margin-right: 4px; }
}
