:root {
  --bg: #05070d;
  --bg-card: #0f131e;
  --bg-card-border: #232c42;
  --text: #f2f4f8;
  --text-muted: #8d96ab;
  --accent: #2f6bff;
  --accent-hover: #5089ff;
  --accent-soft: rgba(47, 107, 255, 0.16);
  --success: #2ecc71;
  --radius: 14px;
  --max-width: 480px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 32px;
}

/* Header */
.site-header {
  text-align: center;
  padding: 28px 16px 16px;
  background: linear-gradient(180deg, #14141a 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--bg-card-border);
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.logo-mark {
  color: var(--accent);
  font-size: 24px;
}

.tagline {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

/* Hero */
.hero {
  text-align: center;
  padding: 28px 4px 8px;
}

.hero h1 {
  font-size: 24px;
  line-height: 1.3;
  margin: 0 0 10px;
}

.hero-sub {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
  margin: 0;
}

/* Products */
.products {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.section-heading {
  margin-top: 40px;
  margin-bottom: 0;
  font-size: 18px;
  color: var(--text-muted);
}

.section-sub {
  margin: 6px 0 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* Przewijany baner promocyjny na gorze strony */
.promo-banner {
  overflow: hidden;
  background: linear-gradient(90deg, #1c3fb0, var(--accent));
  padding: 9px 0;
  position: relative;
  z-index: 2;
}

.promo-track {
  display: flex;
  gap: 40px;
  width: max-content;
  white-space: nowrap;
  animation: marquee 24s linear infinite;
}

.promo-track span {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .promo-track {
    animation: none;
  }
}

.product-card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 20px;
}

.product-cover {
  width: 88px;
  flex-shrink: 0;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--bg-card-border);
}

.product-body {
  flex: 1;
  min-width: 0;
}

.product-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(47, 107, 255, 0.2);
}

.badge {
  position: absolute;
  top: -12px;
  left: 20px;
  background: var(--bg-card-border);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: 999px;
}

.badge-alt {
  background: var(--accent);
  color: #fff;
}

.product-card h2 {
  margin: 6px 0 8px;
  font-size: 20px;
}

.product-desc {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px;
}

.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-features li {
  font-size: 13.5px;
  color: var(--text);
  padding-left: 22px;
  position: relative;
}

.product-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.price {
  font-size: 22px;
  font-weight: 800;
}

.buy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.3px;
  padding: 14px 20px;
  min-height: 48px;
  flex: 1;
  max-width: 180px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.buy-btn:active {
  transform: scale(0.97);
}

.buy-btn:hover {
  background: var(--accent-hover);
}

.buy-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Trust section */
.trust {
  margin-top: 28px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.trust p { margin: 4px 0; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 20px 16px 28px;
  color: var(--text-muted);
  font-size: 12px;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-overlay[hidden] {
  display: none;
}

@media (min-width: 520px) {
  .modal-overlay {
    align-items: center;
  }
}

.modal {
  position: relative;
  background: var(--bg-card);
  width: 100%;
  max-width: var(--max-width);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--bg-card-border);
}

@media (min-width: 520px) {
  .modal {
    border-radius: var(--radius);
  }
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px;
  z-index: 1;
}

/* Karta szczegolow produktu */
.product-card {
  cursor: pointer;
}

.detail-modal .detail-cover {
  display: block;
  width: 96px;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--bg-card-border);
  margin-bottom: 14px;
}

.detail-modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.detail-hook {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.5;
  margin: 0 0 18px;
}

.detail-features-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
  margin: 0 0 10px;
}

.detail-modal .product-features {
  margin-bottom: 20px;
}

#checkout-container {
  min-height: 60px;
}

.checkout-loading {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 24px 0;
}

.checkout-loading.hidden {
  display: none;
}

/* Success modal */
.success-modal {
  text-align: center;
  padding: 32px 20px calc(28px + env(safe-area-inset-bottom));
}

.success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.success-modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.success-modal p {
  color: var(--text-muted);
  font-size: 14px;
  margin: 0 0 20px;
}

.success-modal .buy-btn {
  max-width: 100%;
}

/* Animowane tlo - dwie rozmyte, powoli dryfujace poswiaty */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.bg-glow::before,
.bg-glow::after {
  content: "";
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.35;
}

.bg-glow::before {
  top: -20vmax;
  left: -20vmax;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  animation: drift-one 22s ease-in-out infinite;
}

.bg-glow::after {
  bottom: -25vmax;
  right: -20vmax;
  background: radial-gradient(circle, #1c3fb0 0%, transparent 70%);
  animation: drift-two 26s ease-in-out infinite;
}

@keyframes drift-one {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8vmax, 6vmax) scale(1.12); }
}

@keyframes drift-two {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-6vmax, -8vmax) scale(1.1); }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow::before,
  .bg-glow::after {
    animation: none;
  }
}

/* Pulsujaca poswiata na odznakach, zeby przyciagac wzrok */
.badge-alt {
  animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { box-shadow: 0 0 0 rgba(47, 107, 255, 0); }
  50% { box-shadow: 0 0 12px rgba(47, 107, 255, 0.7); }
}

/* Przeblysk swiatla przebiegajacy po przyciskach zakupu co kilka sekund */
.buy-btn {
  position: relative;
  overflow: hidden;
}

.buy-btn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  animation: shimmer 4.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% { left: -60%; }
  22% { left: 140%; }
  100% { left: 140%; }
}

@media (prefers-reduced-motion: reduce) {
  .badge-alt,
  .buy-btn::after {
    animation: none;
  }
}
