*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #09090b;
  --surface: #111113;
  --surface-2: #18181b;
  --border: #27272a;
  --text: #fafafa;
  --text-muted: #a1a1aa;
  --text-dim: #52525b;
  --accent: #22d3ee;
  --accent-dim: rgba(34, 211, 238, 0.08);
  --accent-hover: #06b6d4;
  --danger: #ef4444;
  --success: #22c55e;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

a { color: inherit; }

/* ── Header ── */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.logo-dot {
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  display: inline-block;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  overflow-x: auto;
  scrollbar-width: none;
}

nav::-webkit-scrollbar { display: none; }

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.855rem;
  font-weight: 500;
  padding: 0.375rem 0.7rem;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 5rem 2rem 3.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 211, 238, 0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
  margin-bottom: 1.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin-bottom: 1.25rem;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ── Page Hero (shared across inner pages) ── */
.page-hero {
  text-align: center;
  padding: 4rem 2rem 2.5rem;
  max-width: 680px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.6rem;
}

.page-hero p {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── Section ── */
.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.5rem 2rem 5rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1.25rem;
}

/* ── Product Grid ── */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.product-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-dim) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  border-radius: 12px;
}

.product-card:hover {
  border-color: rgba(34, 211, 238, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.product-card:hover::after { opacity: 1; }

.product-card.disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.card-badge {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  margin-bottom: 0.9rem;
  background: rgba(34, 211, 238, 0.1);
  color: var(--accent);
  border: 1px solid rgba(34, 211, 238, 0.15);
  width: fit-content;
}

.card-badge.muted {
  background: rgba(82, 82, 91, 0.15);
  color: var(--text-dim);
  border-color: var(--border);
}

.product-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.4rem;
}

.product-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.55;
  flex: 1;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}

.price {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.price sup {
  font-size: 0.8rem;
  font-weight: 700;
  vertical-align: super;
}

.card-arrow {
  color: var(--text-dim);
  font-size: 1.1rem;
  transition: color 0.2s, transform 0.2s;
}

.product-card:hover .card-arrow {
  color: var(--accent);
  transform: translateX(4px);
}

/* ── Product Page ── */
.product-page {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 2rem 5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  margin-bottom: 2.5rem;
  transition: color 0.15s;
}

.back-link:hover { color: var(--text); }

.product-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 3rem;
  align-items: start;
}

.product-info .card-badge { margin-bottom: 1rem; }

.product-info h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.product-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.product-desc {
  font-size: 0.925rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.features-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 0.9rem;
}

.features-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.features-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.features-list li::before {
  content: '✓';
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

/* ── Purchase Card ── */
.purchase-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.75rem;
  position: sticky;
  top: 84px;
}

.purchase-price {
  font-size: 2.75rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.purchase-price sup {
  font-size: 1.2rem;
  font-weight: 700;
  vertical-align: super;
  margin-right: 0.1rem;
}

.purchase-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.25rem 0;
}

#paypal-button-container { margin-top: 0.5rem; }

.secure-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.9rem;
}

.unavailable-note {
  font-size: 0.875rem;
  color: var(--text-dim);
  padding: 1rem 0;
}

/* ── Success Page ── */
.success-page {
  max-width: 500px;
  margin: 5rem auto;
  padding: 0 2rem;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.75rem;
  font-size: 1.75rem;
}

.error-icon {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.2);
}

.success-page h1 {
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.success-page p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  line-height: 1.65;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.875rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 1rem;
}

.download-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.expiry-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  display: block;
  margin-top: 0.5rem;
}

.browse-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.15s;
}

.browse-link:hover { color: var(--text); }

/* ── Or Divider ── */
.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  color: var(--text-dim);
  font-size: 0.78rem;
}

.or-divider::before,
.or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Card Element ── */
.card-element-wrap {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
  margin: 0.75rem 0 0.5rem;
  transition: border-color 0.15s;
}

.card-element-wrap:focus-within {
  border-color: rgba(34, 211, 238, 0.4);
}

.card-error {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.4rem;
  min-height: 1rem;
}

/* ── Buy Button ── */
.buy-btn {
  display: block;
  width: 100%;
  background: var(--accent);
  color: #000;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.25rem;
  text-align: center;
  text-decoration: none;
  font-family: inherit;
}

.buy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: #000;
}

/* ── Cart Button (header) ── */
.cart-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  margin-left: 0.5rem;
  flex-shrink: 0;
  position: relative;
}

.cart-btn:hover, .cart-btn.active {
  color: var(--text);
  border-color: var(--border);
  background: rgba(255,255,255,0.04);
}

.cart-count {
  background: var(--accent);
  color: #000;
  font-size: 0.65rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

/* ── Toast ── */
.act-toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(0.5rem);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.7rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
}

.act-toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.act-toast--error {
  border-color: rgba(239,68,68,0.4);
  color: #ef4444;
}

/* ── Dashboard Stats ── */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 800px;
  margin: 0 auto 3.5rem;
}

.stat-box {
  flex: 1;
  background: var(--surface);
  padding: 1.5rem 1rem;
  text-align: center;
}

.stat-box-val {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-box-label {
  font-size: 0.75rem;
  color: var(--text-dim);
  font-weight: 500;
}

/* ── Why Grid ── */
.why-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem 3.5rem;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

.why-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.why-item span {
  color: var(--accent);
  font-size: 0.5rem;
  flex-shrink: 0;
}

/* ── Hero Actions ── */
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  color: #000;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: border-color 0.15s, color 0.15s;
}

.btn-ghost:hover {
  border-color: rgba(34,211,238,0.3);
  color: var(--text);
}

/* ── Shop Product Cards ── */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.shop-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.shop-card:not(.disabled):hover {
  border-color: rgba(34,211,238,0.2);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}

.shop-card.disabled {
  opacity: 0.45;
}

.shop-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}

.shop-card-tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: 1.25rem;
}

.shop-card-price {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.shop-card-price sup {
  font-size: 0.9rem;
  font-weight: 700;
  vertical-align: super;
}

.shop-card-actions {
  display: flex;
  gap: 0.5rem;
}

.btn-add-cart {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.65rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  white-space: nowrap;
}

.btn-add-cart:hover {
  border-color: var(--accent);
  background: rgba(34,211,238,0.06);
}

.btn-buy-now {
  flex: 1;
  background: var(--accent);
  color: #000;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 0.65rem 0.75rem;
  border-radius: 7px;
  text-decoration: none;
  text-align: center;
  transition: background 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-buy-now:hover { background: var(--accent-hover); color: #000; }

/* ── Cart Page ── */
.cart-wrap {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.cart-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
}

.cart-item-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(34,211,238,0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.cart-item-info { flex: 1; }

.cart-item-name {
  font-size: 0.925rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.cart-item-price {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 7px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-qty-btn {
  background: var(--surface);
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  font-size: 1rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-qty-btn:hover { background: var(--surface-2); color: var(--text); }

.cart-qty-val {
  width: 34px;
  text-align: center;
  font-size: 0.875rem;
  font-weight: 600;
  background: var(--surface);
  border: none;
  color: var(--text);
  padding: 0;
  -moz-appearance: textfield;
}

.cart-qty-val::-webkit-outer-spin-button,
.cart-qty-val::-webkit-inner-spin-button { -webkit-appearance: none; }

.cart-item-total {
  font-size: 0.95rem;
  font-weight: 700;
  min-width: 56px;
  text-align: right;
  flex-shrink: 0;
}

.cart-remove {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1.1rem;
  padding: 0.3rem;
  transition: color 0.15s;
  flex-shrink: 0;
}

.cart-remove:hover { color: var(--danger); }

.cart-summary {
  padding: 1.25rem 0 0;
}

.cart-sum-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.cart-sum-row.total {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.cart-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.cart-empty {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.cart-empty h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.cart-empty p { font-size: 0.9rem; margin-bottom: 1.5rem; }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.75rem 2rem;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.825rem;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
}

footer a:hover { color: var(--text); }

/* ── Loading ── */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: var(--text-muted);
  font-size: 0.875rem;
  padding: 3rem;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Responsive ── */
@media (max-width: 768px) {
  .product-layout {
    grid-template-columns: 1fr;
  }
  .purchase-card {
    position: static;
  }
}

@media (max-width: 600px) {
  header { padding: 0 1.25rem; }
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .section { padding: 1.25rem 1.25rem 4rem; }
  .product-page { padding: 2rem 1.25rem 4rem; }
}
