/* Don Scripts — Tebex theme
   Edit the variables below to retheme the whole store. */
:root {
  --ink: #111318;
  --ink-2: #181B22;
  --ink-3: #21252E;
  --line: #2C313C;
  --text: #F3F4F6;
  --muted: #A3A9B6;
  --accent: #FF5A1F;
  --accent-hover: #FF7445;
  --accent-ink: #111318;
  --success: #12B76A;
  --danger: #F04438;
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1200px;
  --sans: 'Space Grotesk', system-ui, -apple-system, Segoe UI, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
main { flex: 1; padding: 40px 0 72px; }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--text); }
.logo:hover { color: var(--text); }
.logo svg { width: 40px; height: 40px; flex: none; }
.logo-word { display: flex; align-items: baseline; gap: 6px; font-size: 22px; line-height: 1; white-space: nowrap; }
.logo-word b { font-weight: 700; letter-spacing: -0.03em; }
.logo-word span { font-family: var(--mono); font-weight: 500; letter-spacing: -0.06em; }
@keyframes blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.cursor { animation: blink 1.1s steps(1) infinite; }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(17, 19, 24, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; }
.nav a:hover, .nav a.active { color: var(--text); background: var(--ink-3); }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.user-chip { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-family: var(--mono); }
.user-chip img { width: 28px; height: 28px; border-radius: 6px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: var(--radius-sm);
  font: 600 15px/1 var(--sans); border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); filter: brightness(1.1); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .45; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.basket-count { background: var(--accent-ink); color: var(--accent); font-family: var(--mono); font-size: 12px; border-radius: 6px; padding: 3px 6px; }

/* ---------- Toast ---------- */
.toast { margin: 24px auto 0; max-width: var(--max); padding: 0 24px; }
.toast > div { border: 1px solid var(--line); border-left: 0; background: var(--ink-2); border-radius: var(--radius-sm); padding: 14px 18px; display: flex; gap: 12px; align-items: center; }
.toast .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.toast.success .dot { background: var(--success); }
.toast.error .dot, .toast.danger .dot { background: var(--danger); }

/* ---------- Hero ---------- */
.hero { padding: 56px 0 40px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; color: var(--accent); text-transform: uppercase; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); margin: 14px 0 18px; }
.hero h1 .mono { font-weight: 500; letter-spacing: -0.05em; }
.hero-lede { color: var(--muted); font-size: 18px; max-width: 520px; }
.hero-lede p { margin: 0 0 12px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.terminal { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-family: var(--mono); font-size: 14px; }
.terminal-bar { display: flex; gap: 6px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-3); }
.terminal pre { margin: 0; padding: 20px; color: var(--muted); white-space: pre-wrap; line-height: 1.8; }
.terminal .k { color: var(--accent); }
.terminal .s { color: var(--success); }

/* ---------- Sections ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; margin: 48px 0 20px; }
.section-head h2 { font-size: 28px; }
.section-head p { margin: 6px 0 0; color: var(--muted); }
.page-title { margin-bottom: 28px; }
.page-title h1 { font-size: clamp(32px, 4vw, 44px); margin-top: 8px; }
.page-title .desc { color: var(--muted); max-width: 720px; margin-top: 10px; }

/* ---------- Category cards ---------- */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cat-card { display: flex; flex-direction: column; gap: 10px; padding: 22px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); transition: border-color .15s, transform .15s; }
.cat-card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.cat-card .prompt { font-family: var(--mono); color: var(--accent); font-size: 14px; }
.cat-card h3 { font-size: 20px; }
.cat-card .go { margin-top: auto; color: var(--muted); font-size: 14px; font-family: var(--mono); }

/* ---------- Package cards ---------- */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.pkg { display: flex; flex-direction: column; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: border-color .15s; }
.pkg:hover { border-color: #3B4150; }
.pkg-media { aspect-ratio: 16 / 9; background: var(--ink-3); position: relative; display: flex; align-items: center; justify-content: center; }
.pkg-media img { width: 100%; height: 100%; object-fit: cover; }
.pkg-media .ph { width: 56px; height: 56px; opacity: .5; }
.badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: var(--accent-ink); font: 700 12px/1 var(--mono); padding: 6px 8px; border-radius: 6px; }
.pkg-body { padding: 18px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.pkg-body h3 { font-size: 18px; }
.pkg-body h3 a { color: var(--text); }
.pkg-body h3 a:hover { color: var(--accent); }
.price { display: flex; align-items: baseline; gap: 8px; font-family: var(--mono); }
.price strong { font-size: 22px; font-weight: 700; color: var(--text); }
.price s { color: var(--muted); font-size: 14px; }
.price small { color: var(--muted); font-size: 13px; }
.pkg-actions { display: flex; gap: 8px; margin-top: auto; }
.pkg-actions .btn { flex: 1; }
.in-basket { color: var(--success); font: 500 13px var(--mono); }
.note { color: var(--muted); font-size: 14px; }

/* list display */
.pkg-list { display: flex; flex-direction: column; gap: 12px; }
.pkg-list .pkg { flex-direction: row; flex-wrap: wrap; align-items: stretch; }
.pkg-list .pkg-media { flex: 0 0 200px; aspect-ratio: auto; min-height: 112px; }
.pkg-list .pkg-body { flex: 1 1 280px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 16px; }
.pkg-list .pkg-body h3 { flex: 1 1 200px; }
.pkg-list .pkg-actions { margin-top: 0; flex: 0 1 280px; }

/* ---------- Package detail ---------- */
.pkg-detail { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 40px; align-items: start; }
.pkg-detail .pkg-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.buy-box { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.buy-box h1 { font-size: 30px; }
.buy-box .price strong { font-size: 30px; }
.prose { color: #D3D7DF; }
.prose h1, .prose h2, .prose h3 { margin: 1.4em 0 .5em; }
.prose ul { padding-left: 1.2em; }
.prose code { font-family: var(--mono); background: var(--ink-3); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.prose img { border-radius: var(--radius-sm); }

/* ---------- Basket ---------- */
.basket { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; align-items: start; }
.basket-list { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); }
.basket-row { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.basket-row:last-child { border-bottom: 0; }
.basket-row .name { flex: 1 1 200px; font-weight: 600; }
.basket-row .qty { color: var(--muted); font: 14px var(--mono); }
.basket-row .remove { color: var(--muted); font-size: 14px; display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; }
.basket-row .remove:hover { color: var(--danger); }
.summary { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 96px; }
.summary-line { display: flex; justify-content: space-between; color: var(--muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--line); padding-top: 16px; font-family: var(--mono); }
.summary-total strong { font-size: 26px; }
.coupon-form { display: flex; gap: 8px; }
.empty { text-align: center; padding: 64px 24px; color: var(--muted); }
.empty .prompt { font-family: var(--mono); color: var(--accent); font-size: 20px; margin-bottom: 8px; }

/* ---------- Forms ---------- */
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.input, select {
  width: 100%; min-height: 44px; padding: 10px 14px; border-radius: var(--radius-sm);
  background: var(--ink); color: var(--text); border: 1px solid var(--line);
  font: 15px var(--mono);
}
.input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 90, 31, .25); }
.auth { max-width: 440px; margin: 24px auto; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 20px; }
.auth h1 { font-size: 28px; }
.auth p { color: var(--muted); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- Tebex sidebar modules ---------- */
.modules { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 48px; }
.modules > * { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* ---------- Package modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(8, 9, 12, .72); display: none; align-items: flex-start; justify-content: center; padding: 6vh 16px; overflow-y: auto; }
.modal.open { display: flex; }
.modal-panel { position: relative; width: 100%; max-width: 980px; background: var(--ink); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.modal-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 10px; border: 0; background: var(--ink-3); color: var(--text); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.modal-close svg { width: 18px; height: 18px; }
.modal .buy-box { position: static; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero, .pkg-detail, .basket { grid-template-columns: minmax(0, 1fr); }
  .hero { padding-top: 32px; gap: 32px; }
  .buy-box, .summary { position: static; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .header-inner { gap: 12px; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .logo-word { font-size: 19px; }
  .pkg-list .pkg-media { flex-basis: 100%; }
}

/* ---------- Headless site additions ---------- */
.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast-item { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 12px 32px rgba(0,0,0,.4); }
.toast-item .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; }
.toast-item.success .dot { background: var(--success); }
.toast-item.error .dot { background: var(--danger); }
.demo-bar { background: var(--accent); color: var(--accent-ink); font: 600 13px var(--mono); text-align: center; padding: 8px 16px; }
.skeleton { background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.2s infinite; border-radius: var(--radius); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-card { height: 330px; }
.login-links { display: flex; flex-direction: column; gap: 10px; }
.legal { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; }
.legal a { color: var(--muted); text-decoration: underline; }
.modal-panel.narrow { max-width: 460px; }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.btn.loading { opacity: .7; pointer-events: none; }
.footer-col { display: flex; flex-direction: column; gap: 6px; }
.site-footer .footer-inner { align-items: flex-start; }
