/*
 * ═══════════════════════════════════════════════════════════════════════
 *  SPACE SHOP – kosmiczny wygląd (fiolet, gwiazdy, asteroidy)
 *  Animowane tło rysuje custom.js (canvas #space-bg).
 *  Ten plik nie jest nadpisywany przez aktualizacje motywu.
 * ═══════════════════════════════════════════════════════════════════════
 */

:root {
  --sp-purple: 137 68 222;      /* #8944DE */
  --sp-violet: 168 85 247;      /* #A855F7 */
  --sp-pink: 217 70 239;        /* #D946EF */
  --sp-lav: 216 190 255;        /* #D8BEFF */
  --sp-deep: 11 4 24;           /* #0B0418 */
  --sp-glow: 0 0 24px rgb(var(--sp-violet) / .35), 0 0 60px rgb(var(--sp-purple) / .18);
}

/* tło strony – głęboki fiolet pod animowanym canvasem */
html, body.bg-background {
  background-color: rgb(var(--sp-deep)) !important;
}
body {
  background-image:
    radial-gradient(1200px 700px at 15% -10%, rgb(var(--sp-purple) / .28), transparent 60%),
    radial-gradient(900px 600px at 100% 30%, rgb(var(--sp-pink) / .12), transparent 60%),
    radial-gradient(1000px 800px at 50% 120%, rgb(var(--sp-purple) / .22), transparent 60%);
  background-attachment: fixed;
}
#space-bg {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}

/* ── pasek przewijania ─────────────────────────────────────────────── */
html { scrollbar-color: rgb(var(--sp-purple)) rgb(var(--sp-deep)); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: rgb(var(--sp-deep)); }
::-webkit-scrollbar-thumb { background: linear-gradient(rgb(var(--sp-violet)), rgb(var(--sp-purple))); border-radius: 99px; }
::selection { background: rgb(var(--sp-violet) / .45); color: #fff; }

/* ── nawigacja – szkło ─────────────────────────────────────────────── */
.sa-navbar {
  background: rgb(var(--sp-deep) / .82) !important;
  border-bottom: 1px solid rgb(var(--sp-lav) / .12);
  position: relative;
}
.sa-navbar::after { /* mieniący się fioletowy pasek pod menu */
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, #461495, #C846FF, #6E32E6, #EBB9FF, #551EBE, #AA5AFF, #461495);
  background-size: 300% 100%;
  animation: sp-bar 8s linear infinite;
  opacity: .9;
}
.sa-navbar-logo img {
  height: 2.6rem !important;
  filter: drop-shadow(0 0 10px rgb(var(--sp-violet) / .55));
  transition: transform .4s cubic-bezier(.3,1.6,.5,1);
}
.sa-navbar-logo:hover img { transform: rotate(-6deg) scale(1.08); }
.sa-navbar-link { transition: color .2s, text-shadow .2s; }
.sa-navbar-link:hover { color: #fff !important; text-shadow: 0 0 12px rgb(var(--sp-violet) / .9); }

@keyframes sp-bar { to { background-position: 300% 0; } }

/* ── nagłówki ──────────────────────────────────────────────────────── */
h1, h2, h3 { letter-spacing: -.01em; }
.sa-hero-title, .sa-section-title {
  text-shadow: 0 0 30px rgb(var(--sp-violet) / .35);
}
.hl-accent .mk {
  color: transparent !important;
  background: linear-gradient(90deg, #C9A2FF, #E879F9, #A855F7, #C9A2FF);
  background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text;
  animation: sp-bar 6s linear infinite;
  filter: drop-shadow(0 0 18px rgb(var(--sp-pink) / .45));
}

/* ── hero ──────────────────────────────────────────────────────────── */
.sa-hero { position: relative; }
.sa-hero-title { font-size: clamp(2.6rem, 6vw, 4.6rem) !important; line-height: 1.05; }
.sa-hero-eyebrow {
  background: rgb(var(--sp-purple) / .18) !important;
  border-color: rgb(var(--sp-lav) / .3) !important;
  color: #E9DDFF !important;
  box-shadow: 0 0 20px rgb(var(--sp-violet) / .25);
}
.sp-hero-logo {
  display: block; width: min(320px, 70vw); height: auto; margin: 0 auto 1.25rem;
  filter: drop-shadow(0 0 28px rgb(var(--sp-violet) / .55)) drop-shadow(0 8px 20px rgb(0 0 0 / .5));
  animation: sp-float 5s ease-in-out infinite, sp-pulse 6s ease-in-out infinite;
  position: relative; z-index: 2;
}
.sp-hero-logo-wrap { position: relative; display: inline-block; }
@keyframes sp-float { 0%,100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes sp-pulse { 0%, 70%, 100% { filter: drop-shadow(0 0 28px rgb(var(--sp-violet) / .55)) drop-shadow(0 8px 20px rgb(0 0 0 / .5)) brightness(1); } 80% { filter: drop-shadow(0 0 40px rgb(var(--sp-pink) / .8)) drop-shadow(0 8px 20px rgb(0 0 0 / .5)) brightness(1.25); } }

/* ── przyciski ─────────────────────────────────────────────────────── */
.sa-btn { position: relative; overflow: hidden; font-weight: 700 !important; letter-spacing: .01em; transition: transform .2s, box-shadow .25s, filter .2s !important; }
.sa-btn--primary.sa-btn--solid, .sa-add-to-cart, button.bg-accent-500, a.bg-accent-500 {
  background: linear-gradient(135deg, #A855F7 0%, #8944DE 45%, #6D28D9 100%) !important;
  box-shadow: 0 6px 22px rgb(var(--sp-purple) / .45), inset 0 1px 0 rgb(255 255 255 / .25) !important;
  border: 1px solid rgb(var(--sp-lav) / .35) !important;
}
.sa-btn--primary.sa-btn--solid:hover, .sa-add-to-cart:hover, button.bg-accent-500:hover, a.bg-accent-500:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgb(var(--sp-violet) / .6), 0 0 0 3px rgb(var(--sp-violet) / .18) !important;
  filter: brightness(1.08);
}
.sa-btn--secondary, .sa-btn--outline {
  background: rgb(var(--sp-purple) / .1) !important;
  border-color: rgb(var(--sp-lav) / .3) !important;
  backdrop-filter: blur(6px);
}
.sa-btn--secondary:hover, .sa-btn--outline:hover {
  transform: translateY(-2px);
  background: rgb(var(--sp-purple) / .22) !important;
  box-shadow: var(--sp-glow);
}

/* ── karty (produkty, kategorie, opinie, FAQ, panele) ──────────────── */
.sa-product-card, .bg-surface, .bg-surface-raised, .sa-feedback-card {
  background: linear-gradient(160deg, rgb(30 16 56 / .86), rgb(17 8 34 / .86)) !important;
  border-color: rgb(var(--sp-lav) / .14) !important;
}
/* rozmycie tylko na kartach-linkach (bez modali w środku) */
.sa-product-card, .sa-feedback-card {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.sa-product-card {
  transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s, border-color .3s !important;
}
.sa-product-card:hover {
  transform: translateY(-6px) !important;
  border-color: rgb(var(--sp-violet) / .6) !important;
  box-shadow: 0 14px 40px rgb(var(--sp-purple) / .35), 0 0 0 1px rgb(var(--sp-violet) / .35), 0 0 35px rgb(var(--sp-pink) / .15) !important;
}
.sa-product-card img { transition: transform .5s ease; }
.sa-product-card:hover img { transform: scale(1.05); }
.sa-product-card-title { font-family: var(--ff-heading); font-weight: 600 !important; }
.sa-product-card-price {
  color: #E9D5FF !important; font-weight: 800 !important;
  text-shadow: 0 0 14px rgb(var(--sp-violet) / .6);
}

/* sekcje z ikonami (features / steps / stats) – świecące ikonki */
.sa-features-icon, .sa-steps-icon, .sa-stats-icon,
.sa-features i, .sa-steps i {
  color: #D8B4FE !important;
  filter: drop-shadow(0 0 8px rgb(var(--sp-violet) / .7));
}
.sa-stats-value, .sa-stats-item strong {
  background: linear-gradient(180deg, #fff, #C4A1FF);
  -webkit-background-clip: text; background-clip: text; color: transparent !important;
}

/* pola formularzy */
input, select, textarea {
  background-color: rgb(var(--sp-deep) / .6) !important;
  border-color: rgb(var(--sp-lav) / .18) !important;
}
input:focus, select:focus, textarea:focus {
  border-color: rgb(var(--sp-violet) / .8) !important;
  box-shadow: 0 0 0 3px rgb(var(--sp-violet) / .25) !important;
  outline: none;
}

/* odznaki produktów */
.sa-product-card-badges > * { box-shadow: 0 0 12px rgb(var(--sp-violet) / .45); }

/* ── stopka ────────────────────────────────────────────────────────── */
.sa-footer {
  position: relative;
  background: linear-gradient(180deg, transparent, rgb(var(--sp-deep) / .85) 40%) !important;
}
.sa-footer::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px;
  background: linear-gradient(90deg, #461495, #C846FF, #6E32E6, #EBB9FF, #551EBE, #AA5AFF, #461495);
  background-size: 300% 100%;
  animation: sp-bar 8s linear infinite;
}
.sa-footer-link:hover { color: #fff !important; text-shadow: 0 0 10px rgb(var(--sp-violet) / .8); }

/* modale / koszyk */
.sa-cart-panel { background: rgb(18 9 36 / .96) !important; border-color: rgb(var(--sp-lav) / .14) !important; }

/* mniej ruchu dla osób, które tego chcą */
@media (prefers-reduced-motion: reduce) {
  .sp-hero-logo, .sa-navbar::after, .sa-footer::before, .hl-accent .mk { animation: none !important; }
}

/* ── większe animacje ──────────────────────────────────────────────── */
.sa-product-card { transform-style: preserve-3d; will-change: transform; }
.sa-product-card.sp-tilt { transition: transform .08s linear, box-shadow .3s, border-color .3s !important; }
.sa-product-card::after { /* świetlny refleks podążający za myszką */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgb(216 180 254 / .18), transparent 45%);
}
.sa-product-card { position: relative; }
.sa-product-card:hover::after { opacity: 1; }

/* sekcje wjeżdżają z poświatą */
[data-dsr] { transition: filter .8s ease; }
.sa-section-title { position: relative; display: inline-block; }
.sa-section-title::after {
  content: ""; display: block; height: 3px; width: 60%; margin: .5rem auto 0; border-radius: 9px;
  background: linear-gradient(90deg, transparent, #c084fc, #e879f9, #c084fc, transparent);
  background-size: 200% 100%; animation: sp-bar 4s linear infinite;
}

/* przyciski – pulsująca aura na głównym */
.sa-hero .sa-btn--primary.sa-btn--solid { animation: sp-aura 2.8s ease-in-out infinite; }
@keyframes sp-aura { 0%,100% { box-shadow: 0 6px 22px rgb(var(--sp-purple) / .45), 0 0 0 0 rgb(var(--sp-violet) / .45); } 50% { box-shadow: 0 6px 30px rgb(var(--sp-purple) / .6), 0 0 0 10px rgb(var(--sp-violet) / 0); } }

/* hero – większy tytuł i wjazd liter */
.sa-hero-title { animation: sp-rise 1s cubic-bezier(.2,.9,.3,1.1) both; }
.sa-hero-subtitle { animation: sp-rise 1s .15s cubic-bezier(.2,.9,.3,1.1) both; }
.sa-hero-actions { animation: sp-rise 1s .3s cubic-bezier(.2,.9,.3,1.1) both; }
@keyframes sp-rise { from { opacity: 0; transform: translateY(28px) scale(.97); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

/* kategorie – świecąca ramka przy najechaniu */
.sa-categories a, .sa-categories-item { transition: transform .3s cubic-bezier(.2,.9,.3,1.2), box-shadow .3s !important; }
.sa-categories a:hover, .sa-categories-item:hover { transform: translateY(-5px) scale(1.02); box-shadow: 0 12px 34px rgb(var(--sp-purple) / .4), 0 0 0 1px rgb(var(--sp-violet) / .5); }

/* pasek ogłoszeń – mieniący się */
.sa-announcement { background: linear-gradient(90deg, #461495, #8944DE, #C846FF, #8944DE, #461495) !important; background-size: 300% 100% !important; animation: sp-bar 10s linear infinite; }

@media (prefers-reduced-motion: reduce) {
  .sa-hero-title, .sa-hero-subtitle, .sa-hero-actions, .sa-hero .sa-btn, .sa-section-title::after, .sa-announcement { animation: none !important; }
}
