/* =============================================================
   BAGZ4DAYZ — wygląd sklepu
   Wszystkie kolory, odstępy i tempo animacji są zebrane niżej
   w :root — zmiana tutaj zmienia cały sklep.
   ============================================================= */

:root {
  /* kolory */
  --bg: #06050B;
  --surface: rgba(21, 18, 36, 0.72);
  --surface-2: rgba(30, 26, 50, 0.7);
  --border: rgba(196, 181, 253, 0.12);
  --border-strong: rgba(196, 181, 253, 0.24);
  --text: #F5F5F7;
  --text-2: #C9C9D1;
  --muted: #9A9AA3;
  --faint: #4A4A55;
  --purple: #7C3AED;          /* przyciski (biały tekst — dobry kontrast) */
  --purple-bright: #8B5CF6;   /* paski, akcenty */
  --purple-text: #A78BFA;     /* fioletowy tekst na ciemnym tle */
  --purple-soft: rgba(139, 92, 246, 0.12);
  --green: #22C55E;
  --green-text: #4ADE80;
  --green-soft: rgba(34, 197, 94, 0.12);
  --danger: #F87171;

  /* kształty */
  --radius-s: 10px;
  --radius: 14px;
  --radius-l: 20px;
  --pad: 20px;
  --tabbar-h: 64px;

  /* ruch — wolny i płynny */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 0.35s;
  --t: 0.6s;
  --t-slow: 0.9s;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
img, video { display: block; max-width: 100%; }
a { color: var(--purple-text); text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.noscript { padding: 40px; text-align: center; color: var(--muted); }

:focus-visible { outline: 2px solid var(--purple-text); outline-offset: 2px; }

/* ---------------- układ ---------------- */

.app { position: fixed; inset: 0; display: flex; flex-direction: column; }
.screens { position: relative; flex: 1; overflow: hidden; }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 16px var(--pad) calc(var(--tabbar-h) + var(--safe-bottom) + 28px);
  background: var(--bg);
  will-change: transform, opacity;
}
.screen--bare { padding-bottom: calc(var(--safe-bottom) + 28px); }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack--tight { gap: 12px; }

/* przejścia między ekranami */
.screen.enter-push { animation: pushIn var(--t) var(--ease) both; }
.screen.leave-push { animation: pushOut var(--t) var(--ease) both; }
.screen.enter-pop  { animation: popIn  var(--t) var(--ease) both; }
.screen.leave-pop  { animation: popOut var(--t) var(--ease) both; }
.screen.enter-fade { animation: fadeUp var(--t) var(--ease) both; }
.screen.leave-fade { animation: fadeOut var(--t-fast) ease both; }

@keyframes pushIn  { from { transform: translateX(28%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes pushOut { to   { transform: translateX(-12%); opacity: 0; } }
@keyframes popIn   { from { transform: translateX(-12%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes popOut  { to   { transform: translateX(28%); opacity: 0; } }
@keyframes fadeUp  { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeOut { to   { opacity: 0; } }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes shimmer { from { background-position: -200px 0; } to { background-position: 200px 0; } }
@keyframes loadBar { 0% { width: 0; } 70% { width: 85%; } 100% { width: 100%; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheetDown { to { transform: translateY(100%); } }

/* elementy wjeżdżające po kolei — opóźnienie ustawia JavaScript (--i) */
.rise { animation: fadeUp var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 0.09s); }

/* ---------------- dolne menu ---------------- */

.tabbar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: rgba(11, 11, 13, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  animation: fadeIn var(--t) ease both;
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: none; border: 0; color: var(--muted); font-size: 11px; font-weight: 500;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.tab svg { width: 22px; height: 22px; }
.tab[aria-current="page"] { color: var(--purple-text); }
.tab:active { transform: scale(0.92); }

/* ---------------- typografia ---------------- */

.wordmark { font-weight: 800; letter-spacing: 0.14em; font-size: 26px; }
.eyebrow { font-size: 11px; letter-spacing: 0.24em; font-weight: 700; color: var(--purple-text); text-transform: uppercase; }
.title { font-size: 22px; font-weight: 750; letter-spacing: 0.01em; margin: 0; }
.subtitle { color: var(--muted); font-size: 14px; margin: 0; }
.section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* ---------------- logo i powitanie ---------------- */

.hero { display: flex; flex-direction: column; align-items: center; gap: 12px; padding-top: 6px; text-align: center; }
.logo {
  width: 92px; height: 92px; border-radius: 26px; overflow: hidden; background: #121216;
  animation: breathe 4.5s ease-in-out infinite;
}
.logo img, .logo video { width: 100%; height: 100%; object-fit: cover; }
.logo--large { width: 124px; height: 124px; border-radius: 34px; }

/* przełącznik języka */
.lang-switch {
  position: absolute; top: 14px; right: 16px; z-index: 5;
  display: flex; padding: 3px; gap: 2px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
}
.lang-switch button {
  width: 42px; height: 30px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 12px; font-weight: 700;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.lang-switch button[aria-pressed="true"] { background: var(--purple); color: #fff; }

/* ---------------- pola i przyciski ---------------- */

.field {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  transition: border-color var(--t-fast) var(--ease);
}
.field:focus-within { border-color: var(--purple-bright); }
.field svg { width: 18px; height: 18px; flex: none; }
.field input { flex: 1; min-width: 0; border: 0; outline: none; background: transparent; color: var(--text); font-size: 15px; }
.field input::placeholder { color: var(--muted); }
.field input::-webkit-search-cancel-button { -webkit-appearance: none; }
.field__clear { width: 32px; height: 32px; margin-right: -8px; border: 0; border-radius: 8px; background: none; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.field__clear svg { width: 16px; height: 16px; }
.search-results { min-height: 200px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 20px; border-radius: 16px; border: 1px solid transparent;
  font-size: 15px; font-weight: 700; letter-spacing: 0.06em;
  transition: transform var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease), opacity var(--t-fast);
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; }
.btn svg { width: 20px; height: 20px; }
.btn--primary { background: var(--purple); color: #fff; }
.btn--outline { background: transparent; border-color: var(--border-strong); color: var(--text); }
.btn--ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn--block { width: 100%; }
.btn--small { min-height: 40px; padding: 0 14px; font-size: 13px; border-radius: 12px; }

.icon-btn {
  width: 44px; height: 44px; flex: none; border-radius: 12px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: transform var(--t-fast) var(--ease);
}
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 20px; height: 20px; }

.link-btn { background: none; border: 0; padding: 6px 0; color: var(--purple-text); font-size: 13px; font-weight: 600; }

/* ---------------- sekcje i karty ---------------- */

.section { display: flex; flex-direction: column; gap: 12px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; }

.row-scroll {
  display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad);
  margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad) 4px; scrollbar-width: none;
}
.row-scroll::-webkit-scrollbar { display: none; }
.row-scroll > * { scroll-snap-align: start; flex: none; width: 140px; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-2--tight { gap: 10px; }

.card {
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border);
}
.card--pad { padding: 16px; }

.cat-card {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 58px; padding: 0 14px; border-radius: var(--radius); text-align: left;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  font-size: 14px; font-weight: 600;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.cat-card:active { transform: scale(0.97); border-color: var(--border-strong); }
.cat-card svg { width: 16px; height: 16px; color: var(--purple-text); flex: none; }
.cat-card span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* kafelek produktu */
.tile {
  display: flex; flex-direction: column; gap: 8px; padding: 0; border: 0; background: none; text-align: left;
  transition: transform var(--t-fast) var(--ease), opacity var(--t) ease;
}
.tile:active { transform: scale(0.97); }
.tile__img {
  position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden;
  background: var(--surface-2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--faint);
}
.tile__img img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity var(--t-slow) ease; }
.tile__img .badge--top, .tile__img .badge--soldout { z-index: 2; }
.tile__img img.loaded { opacity: 1; }
.tile__img > svg { width: 30px; height: 30px; position: absolute; }
.tile__name { font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile__price { font-size: 15px; font-weight: 700; color: var(--text); }
.tile--out { opacity: 0.45; }

/* plakietki */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 8px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
}
.badge--top { position: absolute; top: 8px; left: 8px; background: var(--green); color: #052E14; font-size: 9px; letter-spacing: 0.1em; padding: 3px 7px; border-radius: 6px; }
.badge--soldout { position: absolute; top: 8px; left: 8px; background: var(--border); color: var(--text); font-size: 9px; letter-spacing: 0.1em; padding: 3px 7px; border-radius: 6px; }
.badge--green { background: var(--green-soft); color: var(--green-text); }
.badge--purple { background: var(--purple-soft); color: #C4B5FD; }
.badge--grey { background: var(--surface-2); color: var(--muted); }
.badge svg { width: 14px; height: 14px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* szkielety ładowania */
.skeleton {
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--surface) 0, var(--surface-2) 50%, var(--surface) 100%);
  background-size: 400px 100%;
  animation: shimmer 1.6s linear infinite;
}
.skeleton--tile { aspect-ratio: 1 / 1; }
.skeleton--line { height: 12px; border-radius: 6px; }
.skeleton--cat { height: 58px; }

/* pusty stan */
.empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 48px 12px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--faint); }

/* ---------------- ekrany pełne: ładowanie, blokada, 18+, błąd ---------------- */

.fullscreen {
  position: fixed; inset: 0; z-index: 50; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: 0 36px calc(var(--safe-bottom) + 20px); text-align: center;
}
.fullscreen.leaving { animation: fadeOut var(--t) ease both; pointer-events: none; }
.fullscreen .wordmark { font-size: 30px; }
.fullscreen p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; max-width: 300px; }
.fullscreen .btn { width: 100%; max-width: 320px; }
.lock-icon {
  width: 72px; height: 72px; border-radius: 22px; background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; color: var(--purple-text);
}
.lock-icon svg { width: 32px; height: 32px; }
.load-bar { position: absolute; left: 60px; right: 60px; bottom: calc(var(--safe-bottom) + 110px); height: 3px; border-radius: 3px; background: #1E1E24; overflow: hidden; }
.load-bar > div { height: 100%; border-radius: 3px; background: var(--purple-bright); animation: loadBar 2.8s cubic-bezier(.65,0,.35,1) infinite; }

/* ---------------- warstwa: wysuwane okno i komunikaty ---------------- */

.layer { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.65); pointer-events: auto; animation: fadeIn var(--t) ease both; }
.backdrop.leaving { animation: fadeOut var(--t-fast) ease both; }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; pointer-events: auto;
  max-height: 88vh; overflow-y: auto;
  background: var(--surface); border-top: 1px solid var(--border); border-radius: 24px 24px 0 0;
  padding: 12px var(--pad) calc(var(--safe-bottom) + 24px);
  display: flex; flex-direction: column; gap: 16px;
  animation: sheetUp 0.8s var(--ease) both;
}
.sheet.leaving { animation: sheetDown 0.45s var(--ease) both; }
.sheet__grip { align-self: center; width: 40px; height: 4px; border-radius: 2px; background: var(--border-strong); }

.sheet__title { margin: 0; font-size: 20px; font-weight: 750; }
.order-item { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border); }
.order-item__img { width: 52px; height: 52px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.order-item__img img { width: 100%; height: 100%; object-fit: cover; }
.order-item__img svg { width: 22px; height: 22px; }
.order-item__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.order-item__name { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-item__price { font-weight: 700; color: var(--text-2); font-size: 14px; }
.order-message {
  margin: 0; padding: 14px; border-radius: var(--radius); background: var(--bg); border: 1px solid var(--border);
  font-size: 14px; line-height: 1.55; color: #E4E4EA; white-space: pre-line; overflow-wrap: anywhere;
  user-select: text; -webkit-user-select: text;
}
.order-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--green-text); }
.order-status svg { width: 16px; height: 16px; flex: none; }

.toast {
  position: absolute; left: 50%; bottom: calc(var(--safe-bottom) + 104px);
  translate: -50% 0; width: max-content; max-width: calc(100% - 40px);
  padding: 12px 16px; border-radius: 14px; background: #24242B; border: 1px solid var(--border-strong);
  color: var(--text); font-size: 14px; display: flex; align-items: center; gap: 10px;
  animation: fadeUp var(--t) var(--ease) both; pointer-events: auto;
}
.toast svg { width: 18px; height: 18px; flex: none; color: var(--green-text); }
.toast--error svg { color: var(--danger); }
.toast.leaving { animation: fadeOut var(--t-fast) ease both; }

/* ---------------- nagłówek podstrony ---------------- */

.page-head { display: flex; align-items: center; gap: 12px; }
.page-head__text { gap: 2px; min-width: 0; }
.page-head__text .title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cat-card__count { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; }

.tabbar { transition: transform var(--t) var(--ease), opacity var(--t) ease; }
.tabbar--away { transform: translateY(100%); opacity: 0; pointer-events: none; }

/* ---------------- produkt ---------------- */

.screen--product { padding: 0; }
.icon-btn--float {
  position: sticky; top: 14px; z-index: 4; margin: 14px 0 -58px 16px;
  background: rgba(11, 11, 13, 0.72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.gallery { position: relative; border-bottom: 1px solid var(--border); }
.gallery__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery__track::-webkit-scrollbar { display: none; }
.gallery__slide {
  position: relative; flex: none; width: 100%; aspect-ratio: 1 / 1; scroll-snap-align: start;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--faint);
}
.gallery__slide > svg { width: 56px; height: 56px; position: absolute; }
.gallery__slide img {
  position: relative; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.03); transition: opacity var(--t-slow) ease, transform 1.1s var(--ease);
}
.gallery__slide img.loaded { opacity: 1; transform: none; }
.gallery__slide.skeleton { border-radius: 0; }
.gallery__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 6px; }
.gallery__dots span { width: 6px; height: 6px; border-radius: 3px; background: rgba(245, 245, 247, 0.35); transition: width var(--t) var(--ease), background-color var(--t) ease; }
.gallery__dots span.active { width: 18px; background: var(--text); }

.product__body { padding: 22px var(--pad) 24px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.product__name { margin: 0; font-size: 24px; line-height: 1.25; font-weight: 750; }
.product__price { font-size: 24px; font-weight: 750; }
.product__desc { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.divider { height: 1px; background: var(--border); margin: 4px 0; }

.buy-bar {
  position: sticky; bottom: 0; z-index: 4;
  padding: 14px var(--pad) calc(var(--safe-bottom) + 18px);
  background: rgba(11, 11, 13, 0.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(100%); opacity: 0;
  transition: transform var(--t-slow) var(--ease), opacity var(--t) ease;
}
.buy-bar.visible { transform: none; opacity: 1; }
.buy-bar:empty { display: none; }
.screen--product .product { min-height: calc(100% - 90px); }

/* ---------------- panel administratora ---------------- */

.small { font-size: 13px; }
.pad { padding: 16px; margin: 0; }
.screen--form { padding-bottom: 0; }
.screen--form > .stack { padding-bottom: 28px; }
.screen--form .buy-bar { margin: 0 calc(var(--pad) * -1); }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.stat-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat-card { padding: 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.stat-card__label { font-size: 11px; color: var(--muted); }
.stat-card__value { font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat-card--accent { border-color: rgba(139, 92, 246, 0.45); }
.stat-card--accent .stat-card__value { color: #C4B5FD; }

.chart { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.chart__title { font-size: 12px; color: var(--muted); }
.chart__bars { height: 128px; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 4px; align-items: end; }
.bar { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.bar__value { font-size: 9px; color: var(--muted); font-variant-numeric: tabular-nums; min-height: 11px; }
.bar__fill { width: 100%; max-width: 22px; height: var(--h); min-height: 3px; border-radius: 4px 4px 2px 2px; background: var(--purple-bright);
  transform-origin: bottom; animation: growBar var(--t-slow) var(--ease) both; animation-delay: calc(var(--i, 0) * 0.03s); }
.bar__fill--zero { background: var(--border); }
.bar__label { font-size: 9px; color: var(--muted); min-height: 11px; white-space: nowrap; }
@keyframes growBar { from { transform: scaleY(0); } to { transform: none; } }

.list { display: flex; flex-direction: column; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); overflow: hidden; }
.list-row {
  display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 12px 10px 14px; width: 100%;
  background: none; border: 0; border-top: 1px solid var(--border); text-align: left; color: var(--text);
  transition: background-color var(--t-fast) ease;
}
.list > .list-row:first-child { border-top: 0; }
button.list-row:active { background: var(--surface-2); }
.list-row__thumb { width: 44px; height: 44px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--faint); }
.list-row__thumb img { width: 100%; height: 100%; object-fit: cover; }
.list-row__thumb svg { width: 20px; height: 20px; }
.list-row__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-row__title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-row__chev { width: 16px; height: 16px; color: var(--muted); flex: none; }
.row-tools { display: flex; gap: 4px; flex: none; }
.mini-btn { width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text-2); display: flex; align-items: center; justify-content: center; transition: transform var(--t-fast) var(--ease); }
.mini-btn:active { transform: scale(0.92); }
.mini-btn svg { width: 16px; height: 16px; }
.mini-btn--danger { color: var(--danger); }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--pad) * -1); padding: 0 var(--pad); }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 34px; padding: 0 14px; border-radius: 17px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; transition: background-color var(--t) var(--ease), color var(--t) ease; }
.chip[aria-pressed="true"] { background: var(--purple); border-color: var(--purple); color: #fff; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-hint { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.45; }
.form-error { margin: 0; font-size: 13px; color: var(--danger); }
.input {
  width: 100%; min-height: 46px; padding: 11px 13px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 15px; outline: none;
  transition: border-color var(--t-fast) var(--ease);
}
.input:focus { border-color: var(--purple-bright); }
.textarea { resize: vertical; line-height: 1.5; min-height: 90px; }
.select { appearance: none; -webkit-appearance: none; background-image: none; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 3px; padding: 3px; border-radius: 12px; background: var(--bg); border: 1px solid var(--border); }
.segmented button { min-height: 38px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; transition: background-color var(--t) var(--ease), color var(--t) ease; }
.segmented button[aria-checked="true"] { background: var(--purple); color: #fff; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 48px; cursor: pointer; }
.switch-row__text { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; }
.switch-row__text small { font-size: 12px; font-weight: 400; color: var(--muted); }
.switch { position: relative; flex: none; width: 50px; height: 30px; }
.switch__input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.switch__track { position: absolute; inset: 0; border-radius: 15px; background: var(--border-strong); transition: background-color var(--t) var(--ease); pointer-events: none; }
.switch__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform var(--t) var(--ease); }
.switch__input:checked + .switch__track { background: var(--green); }
.switch__input:checked + .switch__track::after { transform: translateX(20px); }
.switch__input:focus-visible + .switch__track { outline: 2px solid var(--purple-text); outline-offset: 2px; }

.img-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.img-cell { position: relative; aspect-ratio: 1 / 1; border-radius: 12px; overflow: hidden; background: var(--surface-2); border: 1px solid var(--border); }
.img-cell > img { width: 100%; height: 100%; object-fit: cover; }
.img-cell__main { position: absolute; top: 6px; left: 6px; padding: 2px 6px; border-radius: 5px; background: var(--green); color: #052E14; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; }
.img-cell__tools { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; justify-content: flex-end; gap: 4px; }
.img-cell__tools .mini-btn { width: 28px; height: 28px; background: rgba(11, 11, 13, 0.82); }
.img-add { aspect-ratio: 1 / 1; border-radius: 12px; border: 1.5px dashed var(--border-strong); background: transparent; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 11px; font-weight: 600; }
.img-add svg { width: 22px; height: 22px; }

.btn--danger { background: transparent; border-color: rgba(248, 113, 113, 0.4); color: var(--danger); }
.logo-row { display: flex; align-items: center; gap: 16px; }
.logo-preview { flex: none; transition: opacity var(--t) ease; }
.logo-preview.loading { opacity: 0.4; }
.logo-preview .logo { animation: none; }

/* ---------------- dostępność: mniej ruchu ---------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}


/* =============================================================
   KOSMOS — tło sklepu: głęboka przestrzeń, mgławice fiolet/zieleń,
   dwie warstwy gwiazd dryfujących w różnym tempie, spadająca gwiazda.
   ============================================================= */

body { background: #06050B; }
.app { z-index: 1; }
.screen { background: transparent; }

.cosmos { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
  background: linear-gradient(180deg, #0D0A1C 0%, #07060F 45%, #05040A 100%); }

.nebula {
  position: absolute; inset: -20%;
  background:
    radial-gradient(38% 30% at 82% 12%, rgba(124, 58, 237, 0.42), transparent 70%),
    radial-gradient(30% 24% at 64% 22%, rgba(192, 132, 252, 0.18), transparent 70%),
    radial-gradient(36% 28% at 14% 88%, rgba(34, 197, 94, 0.20), transparent 70%),
    radial-gradient(28% 22% at 30% 70%, rgba(45, 212, 191, 0.10), transparent 70%),
    radial-gradient(45% 35% at 50% 50%, rgba(91, 33, 182, 0.12), transparent 75%);
  filter: blur(18px);
  animation: nebulaDrift 60s ease-in-out infinite alternate;
}
@keyframes nebulaDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

.stars { position: absolute; left: 0; right: 0; top: 0; height: 200%; background-repeat: repeat; will-change: transform; }
.stars--far {
  background-size: 230px 230px;
  background-image:
    radial-gradient(1px 1px at 18px 24px, rgba(255,255,255,.85) 50%, transparent 52%),
    radial-gradient(1px 1px at 96px 70px, rgba(255,255,255,.6) 50%, transparent 52%),
    radial-gradient(1px 1px at 160px 18px, rgba(196,181,253,.8) 50%, transparent 52%),
    radial-gradient(1px 1px at 210px 120px, rgba(255,255,255,.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 52px 150px, rgba(255,255,255,.5) 50%, transparent 52%),
    radial-gradient(1px 1px at 130px 190px, rgba(134,239,172,.7) 50%, transparent 52%),
    radial-gradient(1px 1px at 190px 210px, rgba(255,255,255,.55) 50%, transparent 52%),
    radial-gradient(1px 1px at 8px 205px, rgba(255,255,255,.6) 50%, transparent 52%);
  animation: starsDrift 240s linear infinite;
}
.stars--near {
  background-size: 360px 360px;
  background-image:
    radial-gradient(1.6px 1.6px at 40px 60px, #fff 50%, transparent 55%),
    radial-gradient(1.4px 1.4px at 250px 40px, rgba(221,214,254,.95) 50%, transparent 55%),
    radial-gradient(1.8px 1.8px at 310px 220px, #fff 50%, transparent 55%),
    radial-gradient(1.3px 1.3px at 150px 300px, rgba(187,247,208,.9) 50%, transparent 55%),
    radial-gradient(1.5px 1.5px at 90px 250px, rgba(255,255,255,.85) 50%, transparent 55%);
  animation: starsDrift 140s linear infinite, twinkle 6s ease-in-out infinite;
}
@keyframes starsDrift { from { transform: translate3d(0, 0, 0); } to { transform: translate3d(0, -50%, 0); } }
@keyframes twinkle { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.shooting-star {
  position: absolute; top: 12%; left: 70%; width: 140px; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.9) 70%, #fff);
  transform: rotate(-28deg); opacity: 0;
  animation: shoot 13s ease-in infinite; animation-delay: 4s;
}
@keyframes shoot {
  0%   { opacity: 0; transform: translate3d(0, 0, 0) rotate(-28deg); }
  1%   { opacity: 1; }
  6%   { opacity: 0; transform: translate3d(-260px, 140px, 0) rotate(-28deg); }
  100% { opacity: 0; transform: translate3d(-260px, 140px, 0) rotate(-28deg); }
}

/* szklane powierzchnie */
.card, .list, .stat-card, .cat-card, .field, .lang-switch {
  -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%);
}
.card, .list, .stat-card { box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.04); }
.tabbar { background: rgba(8, 6, 16, 0.72); }
.buy-bar { background: rgba(8, 6, 16, 0.82); }
.sheet { background: rgba(18, 15, 30, 0.94); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.input, .order-message, .order-item, .segmented, .mini-btn { background: rgba(6, 5, 11, 0.55); }
.toast { background: rgba(30, 25, 50, 0.95); }

/* przyciski — fioletowa poświata */
.btn--primary {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 55%, #6D28D9 100%);
  box-shadow: 0 8px 26px rgba(124, 58, 237, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:active { box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3); }
.chip[aria-pressed="true"], .segmented button[aria-checked="true"], .lang-switch button[aria-pressed="true"] {
  background: linear-gradient(135deg, #8B5CF6, #6D28D9); box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

/* logo z mgławicową poświatą */
.logo { position: relative; overflow: visible; background: transparent; }
.logo::before {
  content: ""; position: absolute; inset: -18px; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, rgba(139, 92, 246, 0.55), rgba(34, 197, 94, 0.12) 60%, transparent 75%);
  filter: blur(8px); animation: glow 5s ease-in-out infinite;
}
.logo img, .logo video { border-radius: inherit; }
@keyframes glow { 0%, 100% { opacity: 0.75; transform: scale(1); } 50% { opacity: 1; transform: scale(1.08); } }

/* napis BAGZ4DAYZ — gradient jak mgławica */
.wordmark {
  background: linear-gradient(90deg, #FFFFFF 0%, #DDD6FE 45%, #A78BFA 70%, #86EFAC 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: none; filter: drop-shadow(0 2px 14px rgba(139, 92, 246, 0.35));
}
.eyebrow { color: #C4B5FD; text-shadow: 0 0 12px rgba(139, 92, 246, 0.6); }

/* kafelki */
.tile__img { border-color: rgba(196, 181, 253, 0.14); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35); }
.tile:active .tile__img { border-color: rgba(167, 139, 250, 0.55); }
.badge--top { box-shadow: 0 0 12px rgba(34, 197, 94, 0.55); }
.cat-card:active { border-color: rgba(167, 139, 250, 0.5); }

/* ekrany pełne (ładowanie, 18+, blokada) — też w kosmosie */
.fullscreen { background: transparent; }
.fullscreen::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(45% 35% at 80% 10%, rgba(124, 58, 237, 0.4), transparent 70%),
    radial-gradient(40% 30% at 15% 90%, rgba(34, 197, 94, 0.18), transparent 70%),
    linear-gradient(180deg, #0D0A1C 0%, #06050B 100%);
}
.load-bar { background: rgba(255, 255, 255, 0.08); }
.load-bar > div { background: linear-gradient(90deg, #8B5CF6, #22C55E); box-shadow: 0 0 12px rgba(139, 92, 246, 0.8); }

@media (prefers-reduced-motion: reduce) {
  .shooting-star { display: none; }
}
