/* =========================================================
   Cobra Store — Tebex webstore template
   Upload as an Asset named: style.css
   Colours are driven by CSS variables that layout.html sets
   from the template Schema, so the whole theme is re-brandable
   without touching this file.
   ========================================================= */

:root {
  /* Fallbacks — layout.html overrides these from the schema */
  --primary: #1ecf6d;
  --primary-2: #5ff08f;
  --danger: #ff4444;
  --success: #46d369;

  --bg: #0b0e0f;
  --surface: #141819;
  --surface-2: #1b2022;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.14);

  --text: #f2f2f5;
  --text-dim: #a2a2ae;
  --text-faint: #6d6d7a;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  /* accent-derived tints track the schema colour instead of a hard-coded hex */
  --glow: 0 0 0 1px color-mix(in srgb, var(--primary) 35%, transparent),
          0 12px 34px color-mix(in srgb, var(--primary) 18%, transparent);

  --header-height: 460px;
  --logo-height: 190px;
  --sidebar-width: 285px;
  --container: 1320px;

  --header-overlay: rgba(8, 8, 10, 0.72);
  --header-tint: color-mix(in srgb, var(--primary) 16%, transparent);

  /* Tebex legal footer */
  --tebex-legal-footer-background-color: #0a0a0c;
  --tebex-legal-footer-text-color: #5c5c68;
  --tebex-legal-footer-border-color: transparent;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  /* literal fallbacks so the page never renders unthemed if a token is empty */
  background: var(--bg, #0b0e0f);
  color: var(--text, #f2f2f5);
  /* Montserrat for body copy, Poppins for headings — same pairing Talon uses */
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4,
.page-title,
.login-heading,
.drawer-title,
.package-name,
.hero-logo .wordmark {
  font-family: "Poppins", "Montserrat", system-ui, sans-serif;
}

body.no-scroll { overflow: hidden; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 0.8rem; }
p:last-child { margin-bottom: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}

.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;
}

/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--text);
  background: var(--surface-2);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, opacity 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled],
.btn.is-disabled {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #1a0d04;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--primary) 25%, transparent);
}
.btn-primary:hover { box-shadow: 0 12px 30px color-mix(in srgb, var(--primary) 38%, transparent); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}
.btn-ghost:hover { color: var(--text); border-color: var(--primary); }

.btn-block { width: 100%; }
.btn-sm { padding: 0.45rem 0.75rem; font-size: 0.78rem; }

/* ---------------------------------------------------------
   Utility bar
   --------------------------------------------------------- */
.utilbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(10, 10, 13, 0.92);
  /* solid instead of a blur — cheaper to composite while scrolling */
  border-bottom: 1px solid var(--line);
}
.utilbar .container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 56px;
}
.utilbar-left { flex: 1; min-width: 0; }
.utilbar-right {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.utilbar-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 0.84rem;
  font-weight: 600;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.utilbar-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.utilbar-link i { color: var(--primary); }

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.5rem 0.45rem 0.9rem;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
.cart-pill:hover { border-color: var(--primary); }
.cart-pill .count {
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  color: #1a0d04;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Currency dropdown */
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  min-width: 120px;
  max-height: 300px;
  overflow-y: auto;
  padding: 6px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
}
.dropdown.open .dropdown-panel { display: block; }
.dropdown-panel a {
  display: block;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  font-size: 0.82rem;
  color: var(--text-dim);
}
.dropdown-panel a:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }

/* ---------------------------------------------------------
   Hero header
   --------------------------------------------------------- */
.hero {
  position: relative;
  isolation: isolate;
}
.hero-bg {
  height: var(--header-height);
  /* never let a bad/unset config value collapse the header onto the page */
  min-height: 260px;
  background-image: var(--header-background);
  background-size: cover;
  background-position: var(--background-position, center);
  position: relative;
}
.hero-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, var(--header-overlay), rgba(13, 13, 16, 0.55) 45%, var(--bg) 100%),
    radial-gradient(120% 95% at 50% 0%, var(--header-tint), transparent 65%);
}

.hero-inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px 40px;
}

.hero-logo { justify-self: center; text-align: center; background: none; }
.hero-logo a { background: none; display: inline-block; }
.hero-logo img {
  max-height: var(--logo-height);
  width: auto;
  margin: 0 auto;
  /* nothing behind the logo - transparent PNGs sit flat on the header */
  background: none;
  border: 0;
  box-shadow: none;
  filter: none;
}
.hero-logo .wordmark {
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 14px 40px color-mix(in srgb, var(--primary) 25%, transparent);
}

/* IP / Discord side boxes — text beside a round icon, no card chrome */
.side-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  background: none;
  border: 0;
  transition: transform 0.18s ease;
}
.side-box:hover { transform: translateY(-2px); }
/* pulled in toward the logo rather than pinned to the page edges */
.side-box.ip { justify-self: end; }
.side-box.discord { justify-self: start; }

.side-icon {
  position: relative;
  flex: 0 0 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  color: #2a1405;
  background: linear-gradient(150deg, var(--primary-2), var(--primary));
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.18s ease;
}
.side-box:hover .side-icon { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 22%, transparent), 0 10px 26px rgba(0, 0, 0, 0.45); }
.side-box.ip .side-icon i { margin-left: 3px; }

.side-badge {
  position: absolute;
  top: -4px;
  right: -12px;
  padding: 0.15rem 0.6rem;
  border-radius: 500rem;
  background: #c53232;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}
.side-badge[hidden] { display: none; }

.side-text { min-width: 0; }
.side-box.ip .side-text { text-align: right; }
.side-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.08rem;
  color: #fff;
  line-height: 1.25;
  text-shadow: 0 3px 12px rgba(0, 0, 0, 0.55);
}

/* Two-line reel: the IP / member count slides up on hover to reveal
   the call to action underneath. */
.side-sub {
  height: 22px;
  overflow: hidden;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
}
.side-sub .reel-1 {
  margin-top: 0;
  /* rolls the line up out of the 22px window, revealing the one below */
  transition: margin-top 0.38s cubic-bezier(0.33, 1, 0.68, 1);
}
.side-box:hover .side-sub .reel-1 { margin-top: -22px; }
.side-sub .reel-2 { color: var(--primary); }

/* ---------------------------------------------------------
   Page shell
   --------------------------------------------------------- */
.shell {
  position: relative;
  z-index: 2;
  margin-top: -70px;
  padding-bottom: 80px;
}
.shell-grid {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.panel { padding: 22px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
}
.page-title {
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.page-desc { color: var(--text-dim); font-size: 0.9rem; }

/* ---------------------------------------------------------
   Sidebar
   --------------------------------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 20px; }

/* Shopping cart card (sidebar, logged in) */
.cart-card-wrap { display: flex; flex-direction: column; gap: 0.4rem; }
.cart-card-label {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}
.cart-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary-2), var(--primary));
  box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 22%, transparent);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cart-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px color-mix(in srgb, var(--primary) 34%, transparent);
}
.cart-card-avatar {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  image-rendering: pixelated;
}
.cart-card-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cart-card-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #2a1405;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-card-meta {
  font-size: 0.76rem;
  font-weight: 600;
  color: rgba(42, 20, 5, 0.72);
}
.cart-card-icon { font-size: 1.6rem; color: rgba(255, 255, 255, 0.92); }

.login-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 18px;
  cursor: pointer;
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 14%, transparent), color-mix(in srgb, var(--primary-2) 5%, transparent)), var(--surface);
}
.login-card::after {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 30%, transparent), transparent 70%);
}
.login-skin {
  flex: 0 0 46px;
  height: 74px;
  display: grid;
  place-items: end center;
}
.login-skin img { max-height: 74px; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5)); }
.login-body { position: relative; z-index: 1; min-width: 0; flex: 1; }
.login-label {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}
.login-name {
  font-weight: 700;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.login-sub { font-size: 0.78rem; color: var(--text-dim); }
.login-arrow { color: var(--text-faint); }

.sidebar-heading {
  padding: 16px 18px 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
}

.categories { padding: 10px; }
.category-link {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem 0.8rem;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 700;
  font-size: 1.12rem;
  border-left: 3px solid transparent;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.category-link:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.category-link.active {
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 16%, transparent), transparent);
  border-left-color: var(--primary);
  color: #fff;
}
.category-icon {
  flex: 0 0 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}
.category-icon img { max-height: 36px; image-rendering: -webkit-optimize-contrast; }
.category-link .chev { margin-left: auto; opacity: 0; font-size: 0.7rem; transition: opacity 0.15s ease; }
.category-link:hover .chev,
.category-link.active .chev { opacity: 1; color: var(--primary); }

.subcategories { margin: 2px 0 6px 34px; display: flex; flex-direction: column; }
.subcategories .category-link { font-size: 0.83rem; padding: 0.4rem 0.6rem; }

/* Sidebar modules */
.module {
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.module-header {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.module-header i { color: var(--primary); }

.topdonator { display: flex; align-items: center; gap: 0.9rem; }
.topdonator img { width: 46px; border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.topdonator .ign { font-weight: 700; }
.topdonator .meta { font-size: 0.78rem; color: var(--text-dim); }

.payment-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.payment-row:last-child { border-bottom: 0; }
.payment-row img { width: 28px; height: 28px; border-radius: 6px; }
.payment-row .ign { font-weight: 600; }
.payment-row .pkg { color: var(--text-faint); font-size: 0.75rem; }
.payment-row .amount { margin-left: auto; color: var(--primary); font-weight: 700; }

.progress {
  height: 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--primary-2), var(--primary));
  transition: width 0.4s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.featured {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 22px 18px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 18%, transparent), transparent 65%), var(--surface);
}
.featured img { margin: 0 auto 0.6rem; max-height: 74px; }
.featured .name { font-weight: 700; }
.featured .price { color: var(--primary); font-weight: 700; margin-bottom: 0.7rem; }

.server-status { display: flex; align-items: center; gap: 0.7rem; }
.status-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(70, 211, 105, 0.15);
}
.status-dot.offline { background: var(--danger); box-shadow: 0 0 0 4px rgba(255, 68, 68, 0.15); }

.giftcard-form { display: flex; gap: 0.5rem; }
.input {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  font: inherit;
  font-size: 0.86rem;
}
.input:focus { outline: none; border-color: var(--primary); }

/* ---------------------------------------------------------
   Homepage prose — styles whatever HTML you write as the store
   description in the creator panel
   --------------------------------------------------------- */
.prose { color: var(--text-dim); max-width: 74ch; }
.prose h1,
.prose h2,
.prose h3 {
  color: var(--text);
  margin: 1.8rem 0 0.7rem;
  line-height: 1.25;
}
.prose h1 { font-size: 1.55rem; }
.prose h2 { font-size: 1.3rem; }
.prose h3 { font-size: 1.05rem; }
.prose > :first-child { margin-top: 0; }
.prose p { margin-bottom: 0.9rem; line-height: 1.7; }
.prose strong { color: var(--text); font-weight: 700; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--primary-2); }
.prose ul,
.prose ol { padding-left: 1.2rem; margin-bottom: 0.9rem; }
.prose li { margin-bottom: 0.35rem; }
.prose img { border-radius: var(--radius-sm); margin: 0.8rem 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 1.6rem 0; }
.prose code {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.1rem 0.35rem;
  font-size: 0.86em;
}

/* Support / refund callout boxes */
.callouts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 2rem;
}
.callout {
  position: relative;
  padding: 26px 20px 20px;
  border-radius: var(--radius);
  border: 1px solid;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.6;
}
.callout p { margin: 0; }
.callout a { text-decoration: underline; text-underline-offset: 2px; }
.callout-label {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.9rem;
  border-radius: 100px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}
.callout-support {
  border-color: #ff3737;
  background: rgba(255, 55, 55, 0.08);
  color: #ffbdbd;
}
.callout-support .callout-label { background: #ff3737; }
.callout-support a { color: #ff9c9c; }
.callout-refund {
  border-color: #2959d2;
  background: rgba(41, 89, 210, 0.1);
  color: #b9c9ff;
}
.callout-refund .callout-label { background: #2959d2; }
.callout-refund a { color: #9db4ff; }

/* ---------------------------------------------------------
   Package grid
   --------------------------------------------------------- */
.package-grid {
  display: grid;
  /* three per row, so six packages land as 3 + 3 */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.package {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 22px 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.package::before {
  content: "";
  position: absolute;
  inset: -40% 50% 60% -40%;
  background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--primary) 22%, transparent), transparent 70%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.package:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--primary) 45%, transparent);
  box-shadow: var(--glow);
}
.package:hover::before { opacity: 1; }

.package-media {
  position: relative;
  z-index: 1;
  height: 108px;
  display: grid;
  place-items: center;
  margin-bottom: 0.8rem;
}
.package-media img {
  max-height: 108px;
  transition: transform 0.25s ease;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.45));
}
.package:hover .package-media img { transform: scale(1.07) translateY(-2px); }

.package-name {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.25rem;
}
.package-price {
  position: relative;
  z-index: 1;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.9rem;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.45rem;
}
.package-price del { color: var(--text-faint); font-size: 0.8rem; font-weight: 600; }
.package-price .currency { color: var(--text-faint); font-size: 0.75rem; font-weight: 600; }
.package .btn { position: relative; z-index: 1; width: 100%; margin-top: auto; }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 0.25rem 0.55rem;
  border-radius: 100px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-sale { background: var(--danger); color: #fff; }
.badge-basket { background: var(--success); color: #06200e; left: auto; right: 12px; }

/* List display type */
.package-list { display: flex; flex-direction: column; gap: 14px; }
.package-list .package {
  flex-direction: row;
  align-items: center;
  text-align: left;
  gap: 1.1rem;
  padding: 16px 18px;
}
.package-list .package-media { height: 72px; width: 72px; margin: 0; flex: 0 0 72px; }
.package-list .package-media img { max-height: 72px; }
.package-list .package-body { flex: 1; min-width: 0; }
.package-list .package-price { justify-content: flex-start; margin-bottom: 0; }
.package-list .package .btn { width: auto; margin: 0; }
.package-list .package-desc {
  color: var(--text-dim);
  font-size: 0.84rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-dim);
}
.empty-state i { font-size: 2rem; color: var(--text-faint); margin-bottom: 0.8rem; }

/* ---------------------------------------------------------
   Package detail
   --------------------------------------------------------- */
.package-detail { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; }
.package-detail .media {
  padding: 26px;
  border-radius: var(--radius);
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 70%), var(--surface-2);
  display: grid;
  place-items: center;
}
.package-detail .description { color: var(--text-dim); }
.package-detail .description h1,
.package-detail .description h2,
.package-detail .description h3 { color: var(--text); margin: 1.2rem 0 0.5rem; }
.package-detail .description ul { padding-left: 1.1rem; }
.package-detail .description img { border-radius: var(--radius-sm); margin: 0.6rem 0; }
.buy-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.4rem;
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.buy-box .price { font-size: 1.5rem; font-weight: 800; color: var(--primary); }
.buy-box .price del { font-size: 0.95rem; color: var(--text-faint); margin-right: 0.5rem; }
.buy-box .actions { margin-left: auto; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ---------------------------------------------------------
   Cart drawer
   --------------------------------------------------------- */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.62);
  opacity: 0;
  visibility: hidden;
  will-change: opacity;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.scrim.open { opacity: 1; visibility: visible; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 100;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--line);
  transform: translate3d(105%, 0, 0);
  will-change: transform;
  /* slow, weighted glide in from the right */
  transition: transform 0.52s cubic-bezier(0.22, 1, 0.36, 1);
}
.drawer.open { transform: translate3d(0, 0, 0); }
.drawer-head {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.drawer-head .drawer-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary);
}
.cart-empty {
  padding: 40px 10px;
  font-size: 0.95rem;
  line-height: 1.6;
}
.drawer-currency { margin-left: auto; }
.drawer-currency .btn { gap: 0.4rem; }
.drawer-currency .btn i { font-size: 0.65rem; opacity: 0.7; }

.drawer-close {
  background: none;
  border: 0;
  color: var(--text-faint);
  font-size: 1rem;
  cursor: pointer;
  padding: 0.3rem;
}
.drawer-close:hover { color: var(--text); }
.drawer-body { flex: 1; overflow-y: auto; padding: 14px 20px; }
.drawer-foot { padding: 20px; border-top: 1px solid var(--line); }

/* --- cart line item: thumbnail tile, name, price, quantity stepper --- */
.basket-item {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}
.basket-item:last-child { border-bottom: 0; }

.basket-thumb {
  flex: 0 0 76px;
  height: 76px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.basket-thumb img {
  max-width: 56px;
  max-height: 56px;
  width: auto;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
}
.basket-thumb i { color: var(--text-faint); font-size: 1.4rem; }

.basket-info { min-width: 0; flex: 1; }
.basket-item .name { font-weight: 700; font-size: 0.95rem; }
.basket-item .price {
  margin-top: 0.1rem;
  color: var(--text-dim);
  font-weight: 600;
  font-size: 0.82rem;
}
.basket-item .qty { margin-top: 0.4rem; font-size: 0.78rem; color: var(--text-faint); }

.qty-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.55rem;
  flex-wrap: wrap;
}
.qty-update {
  padding: 0.36rem 0.85rem;
  border: 0;
  border-radius: var(--radius-sm);
  background: #2f9e52;
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}
.qty-update:hover { background: #35b25d; }
.qty-update:disabled { opacity: 0.7; cursor: default; }

.qty-stepper {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}
.qty-btn {
  width: 32px;
  border: 0;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.qty-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--text); }
.qty-btn:disabled { opacity: 0.35; cursor: default; }
.qty-btn:disabled:hover { background: none; color: var(--text-dim); }

.qty-input {
  width: 38px;
  padding: 0.32rem 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}
.qty-input:focus { outline: none; background: rgba(255, 255, 255, 0.04); }
.qty-input::-webkit-outer-spin-button,
.qty-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.basket-item .remove {
  display: inline-block;
  margin-top: 0.5rem;
  color: var(--text-faint);
  font-size: 0.78rem;
  text-decoration: underline;
}
.basket-item .remove:hover { color: var(--danger); }

.basket-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.9rem;
}
.basket-total .label { color: var(--text-dim); font-size: 0.86rem; }
.basket-total .value { font-size: 1.35rem; font-weight: 800; }

.coupon-row { display: flex; gap: 0.5rem; margin-bottom: 0.9rem; }

/* ---------------------------------------------------------
   Modal
   --------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal.open { display: flex; }
.modal-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 86vh;
  overflow-y: auto;
  padding: 28px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: pop 0.2s ease;
}
@keyframes pop {
  from { transform: translateY(14px) scale(0.98); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 0;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1rem;
}
.modal-close:hover { color: var(--text); }
.modal-title { font-size: 1.2rem; margin-bottom: 0.6rem; }
.modal-text { color: var(--text-dim); font-size: 0.9rem; }
.modal-section {
  margin-top: 1.1rem;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.modal-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.9rem; }

/* ---------------------------------------------------------
   Toast
   --------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1.2rem;
  border-radius: 100px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  font-weight: 600;
  animation: rise 0.25s ease;
}
.toast.success { border-color: rgba(70, 211, 105, 0.5); }
.toast.success i { color: var(--success); }
.toast.error { border-color: rgba(255, 68, 68, 0.5); }
.toast.error i { color: var(--danger); }
@keyframes rise {
  from { transform: translate(-50%, 16px); opacity: 0; }
  to { transform: translate(-50%, 0); opacity: 1; }
}

/* ---------------------------------------------------------
   Store footer
   --------------------------------------------------------- */
.store-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  color: var(--text-faint);
  font-size: 0.72rem;
}
.store-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.store-footer a { color: var(--text-dim); }
.store-footer a:hover { color: var(--primary); }
.footer-links { display: flex; gap: 0.9rem; flex-wrap: wrap; }
.footer-legal { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.4; }
.footer-disclaimer { color: var(--text-faint); opacity: 0.7; font-size: 0.66rem; }
.store-footer .utilbar-link { font-size: 0.72rem; }

/* ---------------------------------------------------------
   Login / form pages
   --------------------------------------------------------- */
.form-page { max-width: 460px; margin: 0 auto; text-align: center; }
.form-page .field { margin-bottom: 0.9rem; text-align: left; }
.form-page label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* Login page — Java / Bedrock picker */
.login-page { max-width: 520px; }
.login-heading {
  font-size: 1.5rem;
  color: var(--primary);
  text-wrap: balance;
  margin-bottom: 1.4rem;
}
.edition-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.2rem;
}
.edition {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.edition i { font-size: 1.4rem; opacity: 0.7; }
.edition strong { color: var(--text); font-weight: 700; }
.edition:hover { border-color: var(--line-strong); }
.edition.is-selected {
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  color: var(--text);
}
.edition.is-selected i { color: var(--primary); opacity: 1; }

.login-hint {
  text-align: left;
  color: var(--text-faint);
  font-size: 0.82rem;
  font-style: italic;
  margin-bottom: 0.4rem;
}
.login-row { display: flex; gap: 10px; margin-bottom: 1.2rem; }
.login-row .input { flex: 1; padding: 0.75rem 0.9rem; }
.login-row .btn { padding: 0.75rem 1.2rem; }
.login-note {
  color: var(--text-dim);
  font-size: 0.84rem;
  line-height: 1.6;
  margin-bottom: 0.9rem;
}
.login-note[hidden] { display: none; }

@media (max-width: 520px) {
  .edition-picker { grid-template-columns: 1fr; }
}

.option-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

/* ---------------------------------------------------------
   Mobile nav toggle
   --------------------------------------------------------- */
.sidebar-toggle { display: none; }

/* ---------------------------------------------------------
   Responsive
   --------------------------------------------------------- */
@media (max-width: 1180px) {
  :root { --header-height: 400px; --logo-height: 150px; }
  .hero-inner { grid-template-columns: 1fr; justify-items: center; gap: 1rem; padding-bottom: 30px; }
  .side-box { display: none; }
}

@media (max-width: 960px) {
  .shell-grid { grid-template-columns: 1fr; }
  .package-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sidebar-toggle {
    display: inline-flex;
    width: 100%;
    margin-bottom: 14px;
  }
  .sidebar { display: none; }
  .sidebar.open { display: flex; }
  .package-detail { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  :root { --header-height: 300px; --logo-height: 108px; }
  .shell { margin-top: -40px; }
  .panel { padding: 18px 16px; }
  .package-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .package-list .package { flex-wrap: wrap; }
  .utilbar-link span { display: none; }
}

/* ---------------------------------------------------------
   Ambient embers
   Fixed full-viewport canvas. z-index 1 puts it above the hero
   (so embers drift over the header art) but below .shell /
   .store-footer / .utilbar, so it never covers page content.
   --------------------------------------------------------- */
.embers {
  position: fixed;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.store-footer { position: relative; z-index: 2; }

/* ---------------------------------------------------------
   Package modal
   Two columns: package summary on the left, description on the
   right. Opened by clicking a package card or its button.
   --------------------------------------------------------- */
.package-modal-card {
  max-width: 860px;
  padding: 0;
  overflow: hidden;
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.package .package-media,
.package[role="button"] { cursor: pointer; }

.pm-side {
  padding: 30px 26px;
  background: var(--surface-2);
  border-right: 1px solid var(--line);
  text-align: center;
}
.pm-media {
  height: 150px;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}
.pm-media img {
  max-height: 150px;
  width: auto;
  margin: 0 auto;
  image-rendering: -webkit-optimize-contrast;
}
.pm-media i { font-size: 3.4rem; color: var(--text-faint); }

.pm-name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}
.pm-price {
  color: var(--text-dim);
  font-size: 0.95rem;
  margin-bottom: 1.1rem;
}
.pm-price del { color: var(--text-faint); margin-right: 0.4rem; }
.pm-price .currency { font-size: 0.82rem; color: var(--text-faint); }

.pm-gift-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.9rem;
  padding: 0;
  background: none;
  border: 0;
  color: var(--text-dim);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}
.pm-gift-toggle:hover { color: var(--text); }
.pm-gift-toggle i { transition: transform 0.2s ease; font-size: 0.7rem; }
.pm-gift-toggle[aria-expanded="true"] i { transform: rotate(180deg); }

.pm-gift-fields { margin-top: 0.7rem; }
.pm-gift-fields form { display: flex; gap: 0.5rem; }
.pm-gift-fields .input { flex: 1; min-width: 0; }
.btn-gift {
  background: #2f9e52;
  color: #fff;
  border: 0;
  font-weight: 700;
}
.btn-gift:hover { background: #35b25d; }

.pm-desc {
  padding: 30px 34px 30px 28px;
  max-height: 70vh;
  overflow-y: auto;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.6;
}
.pm-desc img { border-radius: var(--radius-sm); margin: 0.6rem 0; }
.pm-desc a { color: var(--primary); text-decoration: underline; }
.package-modal .modal-close { z-index: 2; }

@media (max-width: 760px) {
  .package-modal-card { grid-template-columns: 1fr; }
  .pm-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .pm-desc { padding: 22px; max-height: 40vh; }
}

/* gift disclosure on the standalone package page */
.pm-gift-wrap { margin-top: 0.9rem; max-width: 340px; }

