/* =========================================================================
   Store theme
   One stylesheet, no framework. Tokens first, then base, layout,
   components, and page-specific pieces.
   ========================================================================= */

/* ---------- Tokens ---------- */
:root {
  --bg: #09090b;
  --surface: #111114;
  --surface-2: #17171b;
  --surface-3: #1e1e23;
  --border: #232328;
  --border-strong: #303037;

  --text: #ececef;
  --text-muted: #a0a0ab;
  --text-subtle: #6e6e78;

  --accent: #7c5cff;
  --accent-hover: #6b4af2;
  --accent-soft: rgba(124, 92, 255, 0.12);
  --accent-text: #ffffff;

  --success: #34c77b;
  --danger: #ef5350;
  --danger-soft: rgba(239, 83, 80, 0.1);
  --discord: #5865f2;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;

  --container: 1200px;
  --gutter: 24px;
  --header-h: 64px;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --shadow-pop: 0 12px 32px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--border);
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video, iframe { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
::selection { background: var(--accent-soft); color: var(--text); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon-lg { width: 20px; height: 20px; flex-shrink: 0; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container-narrow { max-width: 760px; }
.container-xs { max-width: 480px; }

.site-main { flex: 1; }

.section { padding-block: 72px; }
.section + .section { border-top: 1px solid var(--border); }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}
.section-title { font-size: 24px; }
.section-sub { color: var(--text-muted); margin-top: 6px; max-width: 560px; }

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.page { padding-block: 40px 96px; }
.page-head { margin-bottom: 32px; }
.page-title { font-size: clamp(28px, 4vw, 36px); }
.page-desc { color: var(--text-muted); margin-top: 8px; max-width: 640px; }

.stack { display: flex; flex-direction: column; gap: 16px; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 9, 11, 0.85);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}
.brand img { height: 28px; width: auto; }
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 14px;
  font-weight: 700;
}

.nav { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-link[aria-current="page"] { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.cart-count {
  min-width: 18px; height: 18px;
  padding-inline: 5px;
  display: inline-grid; place-items: center;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.btn.menu-toggle { display: none; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  padding-block: 12px 20px;
}
.mobile-nav.is-open { display: block; }
.mobile-nav .nav-link { display: flex; height: 44px; font-size: 15px; }

@media (max-width: 900px) {
  .nav { display: none; }
  .btn.menu-toggle { display: inline-flex; }
}
@media (max-width: 480px) {
  .header-inner { gap: 12px; }
  .header-actions { gap: 2px; }
  .header-actions .btn-sm { padding-inline: 8px; }
}
@media (max-width: 380px) {
  .brand img + span, .brand-mark + span { display: none; }
}

/* ---------- Dropdown (details-based) ---------- */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 180px;
  padding: 6px;
  border-radius: var(--radius);
  background: var(--surface-2);
  box-shadow: var(--shadow-pop);
  z-index: 60;
  max-height: 320px;
  overflow-y: auto;
}
.dropdown-label {
  padding: 8px 10px 6px;
  font-size: 12px;
  color: var(--text-subtle);
}
.dropdown-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-muted);
}
.dropdown-item:hover { background: var(--surface-3); color: var(--text); }
.dropdown-item[aria-current="true"] { color: var(--text); }
.dropdown-item-danger:hover { color: var(--danger); background: var(--danger-soft); }
.dropdown-sep { height: 1px; background: var(--border); margin: 6px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding-inline: 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; pointer-events: none; }

.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); }

.btn-secondary { background: var(--surface-2); border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--surface-3); border-color: var(--border-strong); }

.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

.btn-danger { background: transparent; border-color: var(--border); color: var(--text-muted); }
.btn-danger:hover { border-color: rgba(239, 83, 80, 0.4); color: var(--danger); background: var(--danger-soft); }

.btn-discord { background: var(--discord); color: #fff; }
.btn-discord:hover { background: #4752c4; }

.btn-sm { height: 32px; padding-inline: 12px; font-size: 13px; }
.btn-lg { height: 46px; padding-inline: 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding-inline: 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  white-space: nowrap;
}
.badge-accent { border-color: transparent; background: var(--accent-soft); color: #b9a8ff; }
.badge-sale { border-color: transparent; background: var(--danger); color: #fff; }
.badge-success { border-color: transparent; background: rgba(52, 199, 123, 0.12); color: var(--success); }
.badge-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-size: 13px; font-weight: 500; color: var(--text-muted); }
.hint { font-size: 13px; color: var(--text-subtle); }

.input, .select {
  width: 100%;
  height: 42px;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input::placeholder { color: var(--text-subtle); }
.input:focus, .select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a0a0ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.input-icon { position: relative; }
.input-icon .icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-subtle);
  pointer-events: none;
}
.input-icon .input { padding-left: 36px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.card-body { padding: 24px; }
.card-head {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { font-size: 15px; font-weight: 600; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--text-subtle);
  margin-bottom: 16px;
}
.breadcrumb a:hover { color: var(--text); }
.breadcrumb [aria-current] { color: var(--text-muted); }
.breadcrumb .sep { opacity: 0.5; }

/* ---------- Hero ---------- */
.hero { padding-block: 96px 80px; border-bottom: 1px solid var(--border); }
.hero-inner { max-width: 720px; }
.hero-title {
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.hero-sub {
  margin-top: 20px;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  margin-top: 64px;
}
.fact { padding: 20px 24px; }
.fact + .fact { border-left: 1px solid var(--border); }
.fact-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.fact-title .icon { color: var(--text-subtle); }
.fact-text { margin-top: 6px; font-size: 13px; color: var(--text-muted); }

@media (max-width: 900px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fact:nth-child(3) { border-left: 0; }
  .fact:nth-child(n+3) { border-top: 1px solid var(--border); }
}
@media (max-width: 520px) {
  .hero { padding-block: 56px 48px; }
  .facts { grid-template-columns: 1fr; margin-top: 40px; }
  .fact + .fact { border-left: 0; border-top: 1px solid var(--border); }
}

/* ---------- Category chips ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding-inline: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* ---------- Product grid & card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.product:hover { border-color: var(--border-strong); }

.product-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--surface-2);
  overflow: hidden;
}
.product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease);
}
.product:hover .product-media img { transform: scale(1.02); }
.product-media .badge { position: absolute; top: 12px; left: 12px; }

.product-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
}
.product-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Stretch the title link over the whole card so the card is one target */
.product-name a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.product-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-foot .btn { position: relative; z-index: 2; }

.price { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.price-value { font-size: 16px; font-weight: 600; }
.price-currency { font-size: 12px; color: var(--text-subtle); font-weight: 500; }
.price-old { font-size: 13px; color: var(--text-subtle); text-decoration: line-through; }

.empty {
  grid-column: 1 / -1;
  padding: 56px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}
.empty-title { color: var(--text); font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.empty .btn { margin-top: 20px; }

/* ---------- Recent payments ---------- */
.activity {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-width: 0;
}
.avatar {
  width: 36px; height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  display: grid; place-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.activity-meta { min-width: 0; }
.activity-name, .activity-pkg {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.activity-name { font-size: 14px; font-weight: 500; }
.activity-pkg { font-size: 13px; color: var(--text-muted); }
.activity-time { font-size: 12px; color: var(--text-subtle); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .icon { color: var(--text-subtle); transition: transform 0.2s var(--ease); }
.faq-item[open] summary .icon { transform: rotate(45deg); }
.faq-item p { padding-bottom: 20px; color: var(--text-muted); max-width: 640px; }

.faq-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 48px;
}
@media (max-width: 820px) { .faq-layout { grid-template-columns: 1fr; gap: 24px; } }

/* ---------- CTA band ---------- */
.cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.cta-title { font-size: 20px; }
.cta-text { color: var(--text-muted); margin-top: 6px; }

/* ---------- Product page ---------- */
.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 40px;
  align-items: start;
}
@media (max-width: 980px) { .product-layout { grid-template-columns: 1fr; } }

.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}
.gallery-stage img, .gallery-stage iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}
.gallery-stage img { object-fit: contain; cursor: zoom-in; }
.gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  background: rgba(9, 9, 11, 0.7);
  border-color: var(--border);
  color: var(--text);
  opacity: 0;
  transition: opacity 0.15s var(--ease), background-color 0.15s var(--ease);
}
.gallery-stage:hover .gallery-nav, .gallery-nav:focus-visible { opacity: 1; }
.gallery-nav:hover { background: var(--surface-3); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
@media (hover: none) { .gallery-nav { opacity: 1; } }

.thumbs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumb {
  position: relative;
  width: 96px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.15s var(--ease), border-color 0.15s var(--ease);
}
.thumb:hover { opacity: 1; }
.thumb[aria-current="true"] { opacity: 1; border-color: var(--text); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-play {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
}

.buy-box { position: sticky; top: calc(var(--header-h) + 24px); }
@media (max-width: 980px) { .buy-box { position: static; } }
.buy-title { font-size: 26px; letter-spacing: -0.025em; margin-top: 12px; }
.buy-price { margin-top: 20px; }
.buy-price .price-value { font-size: 30px; letter-spacing: -0.02em; }
.buy-price .price-currency { font-size: 14px; }
.buy-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }
.checklist { list-style: none; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-muted); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { color: var(--success); margin-top: 3px; }
.divider { height: 1px; background: var(--border); margin-block: 24px; border: 0; }

.link-list { display: flex; flex-direction: column; }
.link-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text-muted);
}
.link-row:hover { color: var(--text); }
.link-row .icon:last-child { margin-left: auto; color: var(--text-subtle); }

/* ---------- Rich text (Tebex descriptions / CMS) ---------- */
.prose { color: var(--text-muted); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--text); margin-top: 1.8em; }
.prose h1 { font-size: 24px; }
.prose h2 { font-size: 20px; }
.prose h3 { font-size: 17px; }
.prose h4 { font-size: 15px; }
.prose > :first-child { margin-top: 0; }
.prose a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-strong); }
.prose a:hover { text-decoration-color: var(--text); }
.prose strong, .prose b { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.prose img { border-radius: var(--radius); height: auto; }
.prose code {
  font-family: var(--font-mono);
  font-size: 0.88em;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--text);
}
.prose pre { padding: 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); overflow-x: auto; }
.prose pre code { padding: 0; background: none; }
.prose hr { border: 0; height: 1px; background: var(--border); }
.prose blockquote { margin-left: 0; padding-left: 16px; border-left: 2px solid var(--border-strong); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { padding: 8px 12px; border-bottom: 1px solid var(--border); text-align: left; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius); }

/* ---------- Basket ---------- */
.basket-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .basket-layout { grid-template-columns: 1fr; } }

.line-items { list-style: none; }
.line-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
}
.line-item + .line-item { border-top: 1px solid var(--border); }
.line-thumb {
  width: 80px;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
}
.line-thumb img { width: 100%; height: 100%; object-fit: cover; }
.line-info { flex: 1; min-width: 0; }
.line-name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.line-meta { font-size: 13px; color: var(--text-subtle); margin-top: 2px; }
.line-meta strong { color: var(--text-muted); font-weight: 500; }
.line-price { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 520px) {
  .line-item { flex-wrap: wrap; padding: 16px; }
  .line-thumb { width: 64px; }
}

.summary-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text-muted); }
.summary-row + .summary-row { margin-top: 10px; }
.summary-total { color: var(--text); font-size: 16px; font-weight: 600; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--text-subtle); margin-top: 12px; }

/* ---------- Tiered category ---------- */
.tier-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.tier { display: flex; flex-direction: column; }
.tier .product-media { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.tier-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; flex: 1; }
.tier-name { font-size: 20px; }
.tier-actions { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; }
.tier-actions .price-value { font-size: 22px; }

/* ---------- Auth / centered panels ---------- */
.center-page { display: grid; place-items: center; padding-block: 64px 96px; }
.panel-head { text-align: center; margin-bottom: 24px; }
.panel-head .brand-mark, .panel-head img { margin: 0 auto 16px; }
.panel-head h1 { font-size: 22px; }
.panel-head p { color: var(--text-muted); margin-top: 6px; font-size: 14px; }
.actions-row { display: flex; gap: 8px; }
.actions-row > * { flex: 1; }

.connect-box {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-2);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.connect-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }

/* Tebex injects its own login markup; normalize it */
.tebex-login form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.tebex-login table { width: 100%; border: 0; border-collapse: collapse; }
.tebex-login td, .tebex-login tr { display: block; width: 100%; padding: 4px 0; border: 0; }
.tebex-login input[type="text"],
.tebex-login input[type="password"],
.tebex-login input[type="email"] {
  width: 100%;
  height: 42px;
  padding-inline: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
}
.tebex-login input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tebex-login a,
.tebex-login button,
.tebex-login input[type="submit"],
.tebex-login .btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding-inline: 16px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.15s var(--ease);
}
.tebex-login a:hover,
.tebex-login button:hover,
.tebex-login input[type="submit"]:hover,
.tebex-login .btn:hover { background: var(--accent-hover); }

/* ---------- Dialogs ---------- */
.dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.8);
}
.dialog::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(2px); }
.dialog[open] { animation: dialog-in 0.18s var(--ease); }
@keyframes dialog-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.dialog-body { padding: 24px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.dialog-title { font-size: 17px; }
.dialog-text { color: var(--text-muted); font-size: 14px; }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 24px; }

/* Full-screen image viewer */
.lightbox {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: rgba(5, 5, 7, 0.9);
  color: #fff;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.lightbox[open] { display: flex; animation: lightbox-in 0.2s var(--ease); }
@keyframes lightbox-in { from { opacity: 0; } to { opacity: 1; } }

.lightbox-stage {
  flex: 1;
  margin: 0;
  display: grid;
  place-items: center;
  padding: 64px 88px;
  min-width: 0;
}
.lightbox-stage img {
  max-width: 100%;
  max-height: calc(100dvh - 128px);
  object-fit: contain;
  border-radius: var(--radius);
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox-stage img.is-changing { animation: lightbox-img 0.18s var(--ease); }
@keyframes lightbox-img { from { opacity: 0.3; transform: scale(0.985); } to { opacity: 1; transform: none; } }

.lightbox-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
}
.lightbox-count { font-size: 13px; color: rgba(255, 255, 255, 0.6); font-variant-numeric: tabular-nums; padding-left: 4px; }

.lightbox-btn {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  transition: background-color 0.15s var(--ease);
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.14); }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

@media (max-width: 640px) {
  .lightbox-stage { padding: 56px 8px 88px; }
  .lightbox-stage img { max-height: calc(100dvh - 144px); }
  .lightbox-nav { top: auto; bottom: 20px; transform: none; }
  .lightbox-prev { left: calc(50% - 56px); }
  .lightbox-next { right: calc(50% - 56px); }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: auto; padding-block: 48px; font-size: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(2, minmax(0, 1fr));
  gap: 40px;
}
.footer-about { color: var(--text-subtle); font-size: 13px; max-width: 380px; margin-top: 12px; }
.footer-heading { font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 12px; }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-subtle);
}
.footer-bottom a:hover { color: var(--text); }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Utilities ---------- */
[hidden] { display: none !important; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.w-full { width: 100%; }

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