/* ==========================================================================
   Jtech Market - design system
   One stylesheet, no build step. Palette: ink (slate) neutrals + indigo brand + cyan accent.
   Type: Plus Jakarta Sans (display) / Inter (text), with system fallbacks.
   ========================================================================== */

:root {
  /* Neutrals */
  --ink-950: #0b1020;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #64748b;
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-50:  #f8fafc;
  --white:   #ffffff;

  /* Brand */
  --brand-700: #4338ca;
  --brand-600: #4f46e5;
  --brand-500: #6366f1;
  --brand-300: #a5b4fc;
  --brand-100: #e0e7ff;
  --brand-50:  #eef2ff;
  --violet-600: #7c3aed;
  --accent-600: #0891b2;
  --accent-500: #06b6d4;
  --accent-100: #cffafe;

  /* Status */
  --green-700: #15803d; --green-600: #16a34a; --green-100: #dcfce7;
  --amber-700: #b45309; --amber-500: #f59e0b; --amber-100: #fef3c7;
  --red-700:   #b91c1c; --red-600:   #dc2626; --red-100:   #fee2e2;

  --gradient-brand: linear-gradient(135deg, #4f46e5 0%, #7c3aed 60%, #9333ea 100%);
  --gradient-hero: radial-gradient(1200px 500px at 85% -10%, rgba(6,182,212,.35), transparent 60%),
                   radial-gradient(900px 500px at 0% 0%, rgba(124,58,237,.45), transparent 55%),
                   linear-gradient(180deg, #0f172a 0%, #1e1b4b 100%);

  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Plus Jakarta Sans', 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;

  --radius-sm: 8px; --radius: 12px; --radius-lg: 16px; --radius-xl: 24px;
  --shadow-xs: 0 1px 2px rgba(15,23,42,.06);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.08), 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 4px 12px rgba(15,23,42,.08), 0 2px 4px rgba(15,23,42,.04);
  --shadow-lg: 0 18px 40px -12px rgba(15,23,42,.18);
  --ring: 0 0 0 3px rgba(99,102,241,.28);
  --header-h: 68px;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; font-family: var(--font-sans); font-size: 16px; line-height: 1.6; color: var(--ink-700);
  background: var(--ink-50); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink-900); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.25rem); letter-spacing: -0.03em; font-weight: 800; }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem); }
h3 { font-size: 1.125rem; letter-spacing: -0.01em; }
h4 { font-size: 1rem; }
p { margin: 0 0 1em; }
hr { border: 0; border-top: 1px solid var(--ink-200); margin: 1.5rem 0; }
::selection { background: var(--brand-100); color: var(--brand-700); }
:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; border-radius: 4px; }
.icon { width: 20px; height: 20px; flex: none; }
.icon-sm { width: 16px; height: 16px; flex: none; }
.icon-lg { width: 28px; height: 28px; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-narrow { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 20px; }
.section { padding: 72px 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--ink-200); border-bottom: 1px solid var(--ink-200); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head p { margin: 6px 0 0; color: var(--ink-500); }
.page { padding: 36px 0 72px; min-height: 60vh; }
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: clamp(1.6rem, 1.3rem + 1vw, 2.25rem); margin-bottom: 6px; }
.page-header p { color: var(--ink-500); margin: 0; }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .875rem; color: var(--ink-500); margin-bottom: 14px; }
.breadcrumb a { color: var(--ink-500); } .breadcrumb a:hover { color: var(--brand-600); }
.breadcrumb span.sep { color: var(--ink-300); }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.flex { display: flex; } .inline-flex { display: inline-flex; }
.col { flex-direction: column; }
.items-center { align-items: center; } .items-start { align-items: flex-start; } .items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; } .justify-center { justify-content: center; } .justify-end { justify-content: flex-end; }
.wrap { flex-wrap: wrap; } .grow { flex: 1 1 auto; } .min-0 { min-width: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; } .gap-8 { gap: 32px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; } .mt-12 { margin-top: 48px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-4 { padding: 16px; } .p-6 { padding: 24px; }
.w-full { width: 100%; } .hidden { display: none !important; }
.text-center { text-align: center; } .text-right { text-align: right; }
.text-muted { color: var(--ink-500); } .text-faint { color: var(--ink-400); } .text-ink { color: var(--ink-900); }
.text-brand { color: var(--brand-600); } .text-success { color: var(--green-600); } .text-danger { color: var(--red-600); }
.text-sm { font-size: .875rem; } .text-xs { font-size: .75rem; } .text-lg { font-size: 1.125rem; }
.fw-500 { font-weight: 500; } .fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.mono { font-family: var(--font-mono); font-size: .875em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.divider { height: 1px; background: var(--ink-200); margin: 18px 0; border: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px;
  font: 600 .9375rem/1.25 var(--font-sans); border-radius: 10px; border: 1px solid transparent; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s, color .15s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--ring); outline: none; }
.btn[disabled], .btn.is-loading { opacity: .55; cursor: not-allowed; pointer-events: none; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: 0 1px 2px rgba(79,70,229,.35); }
.btn-primary:hover { background: var(--brand-700); color: #fff; }
.btn-dark { background: var(--ink-900); color: #fff; } .btn-dark:hover { background: var(--ink-700); color: #fff; }
.btn-outline { background: var(--white); color: var(--ink-800); border-color: var(--ink-300); }
.btn-outline:hover { background: var(--ink-50); border-color: var(--ink-400); color: var(--ink-900); }
.btn-ghost { background: transparent; color: var(--ink-700); } .btn-ghost:hover { background: var(--ink-100); color: var(--ink-900); }
.btn-danger { background: var(--red-600); color: #fff; } .btn-danger:hover { background: var(--red-700); color: #fff; }
.btn-success { background: var(--green-600); color: #fff; } .btn-success:hover { background: var(--green-700); color: #fff; }
.btn-light { background: #fff; color: var(--brand-700); } .btn-light:hover { background: var(--brand-50); color: var(--brand-700); }
.btn-ghost-light { background: rgba(255,255,255,.08); color: #fff; border-color: rgba(255,255,255,.28); } .btn-ghost-light:hover { background: rgba(255,255,255,.16); color: #fff; }
.btn-sm { padding: 6px 12px; font-size: .8125rem; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 1rem; border-radius: 12px; }
.btn-block { width: 100%; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: transparent; border: 0; color: var(--ink-600); cursor: pointer; position: relative; transition: background .15s, color .15s; }
.icon-btn:hover { background: var(--ink-100); color: var(--ink-900); }
.btn.on { color: var(--red-600); border-color: #fecaca; background: #fff5f5; } .btn.on svg { fill: currentColor; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-600); cursor: pointer; } .link-btn:hover { text-decoration: underline; }
.link-danger { color: var(--red-600); } .link-danger:hover { color: var(--red-700); }

/* ---------- Forms ---------- */
.field { margin-bottom: 18px; }
.label { display: block; font-size: .875rem; font-weight: 600; color: var(--ink-800); margin-bottom: 6px; }
.label .opt { font-weight: 400; color: var(--ink-400); }
.input, .select, .textarea {
  display: block; width: 100%; padding: 10px 14px; font: 400 .9375rem/1.4 var(--font-sans); color: var(--ink-900);
  background: var(--white); border: 1px solid var(--ink-300); border-radius: 10px; transition: border-color .15s, box-shadow .15s;
  appearance: none; -webkit-appearance: none;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-400); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--ink-400); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand-500); box-shadow: var(--ring); }
.select { padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.textarea { min-height: 110px; resize: vertical; }
.input-sm { padding: 7px 10px; font-size: .8125rem; border-radius: 8px; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--red-600); }
.help { font-size: .8125rem; color: var(--ink-500); margin-top: 5px; }
.error-text { font-size: .8125rem; color: var(--red-600); margin-top: 5px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.form-grid .span-2 { grid-column: span 2; }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; color: var(--ink-700); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--brand-600); flex: none; }
.input-icon { position: relative; } .input-icon .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); width: 18px; height: 18px; pointer-events: none; }
.input-icon .input { padding-left: 40px; }
input[type=file].input { padding: 8px 10px; }
input[type=file]::file-selector-button { margin-right: 12px; padding: 6px 12px; border: 0; border-radius: 8px; background: var(--brand-50); color: var(--brand-700); font-weight: 600; cursor: pointer; }
.form-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
fieldset { border: 0; padding: 0; margin: 0; }

/* ---------- Cards, badges, alerts ---------- */
.card { background: var(--white); border: 1px solid var(--ink-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-body { padding: 24px; }
.card-header { padding: 18px 24px; border-bottom: 1px solid var(--ink-200); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-header h3 { margin: 0; font-size: 1rem; }
.card-footer { padding: 14px 24px; border-top: 1px solid var(--ink-200); background: var(--ink-50); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.card-hover { transition: box-shadow .2s, transform .2s, border-color .2s; }
.card-hover:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); border-color: var(--ink-300); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; font-size: .75rem; font-weight: 600; line-height: 1.4; border-radius: 999px; white-space: nowrap; }
.badge-success { background: var(--green-100); color: var(--green-700); }
.badge-warning { background: var(--amber-100); color: var(--amber-700); }
.badge-danger { background: var(--red-100); color: var(--red-700); }
.badge-neutral { background: var(--ink-100); color: var(--ink-600); }
.badge-brand { background: var(--brand-50); color: var(--brand-700); }
.badge-dark { background: var(--ink-900); color: #fff; }

.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius); border: 1px solid; font-size: .9375rem; margin-bottom: 20px; }
.alert .icon { margin-top: 2px; }
.alert-success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }
.alert-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert-info { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.flash-wrap { position: fixed; top: calc(var(--header-h) + 12px); right: 16px; z-index: 60; width: min(420px, calc(100vw - 32px)); }
.flash-wrap .alert { box-shadow: var(--shadow-lg); margin-bottom: 10px; animation: slide-in .25s ease-out; background: #fff; }
.flash-wrap .alert-success { border-left: 4px solid var(--green-600); } .flash-wrap .alert-error { border-left: 4px solid var(--red-600); }
@keyframes slide-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 56px 24px; color: var(--ink-500); }
.empty .empty-icon { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; background: var(--brand-50); color: var(--brand-600); display: flex; align-items: center; justify-content: center; }
.empty .empty-icon .icon { width: 26px; height: 26px; }
.empty h3 { color: var(--ink-900); margin-bottom: 6px; }
.empty p { max-width: 380px; margin: 0 auto 18px; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--ink-200); }
.nav { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font: 800 1.2rem/1 var(--font-display); color: var(--ink-900); letter-spacing: -0.03em; }
.brand:hover { color: var(--ink-900); }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gradient-brand); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1rem; box-shadow: 0 4px 10px rgba(79,70,229,.35); }
.brand small { font: 600 .65rem/1 var(--font-sans); letter-spacing: .14em; color: var(--ink-400); display: block; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link { padding: 8px 12px; border-radius: 8px; font-size: .9375rem; font-weight: 500; color: var(--ink-600); }
.nav-link:hover, .nav-link.active { color: var(--brand-700); background: var(--brand-50); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.header-search { flex: 1; max-width: 420px; }
.header-search .input { background: var(--ink-100); border-color: transparent; padding-top: 9px; padding-bottom: 9px; }
.header-search .input:focus { background: #fff; border-color: var(--brand-500); }
.count-dot { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand-600); color: #fff; font-size: .6875rem; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient-brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .875rem; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 1.4rem; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 248px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; z-index: 70; }
.dropdown.open .dropdown-menu { display: block; animation: slide-in .15s ease-out; }
.dropdown-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--ink-100); margin-bottom: 6px; }
.dropdown-head strong { display: block; color: var(--ink-900); font-size: .9rem; } .dropdown-head span { font-size: .8125rem; color: var(--ink-500); word-break: break-all; }
.dropdown-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px; border: 0; background: none; border-radius: 8px; font: 500 .9rem var(--font-sans); color: var(--ink-700); cursor: pointer; text-align: left; }
.dropdown-item:hover { background: var(--ink-100); color: var(--ink-900); }
.dropdown-item .icon { width: 17px; height: 17px; color: var(--ink-400); }
.dropdown-item.danger { color: var(--red-600); } .dropdown-item.danger .icon { color: var(--red-600); } .dropdown-item.danger:hover { background: var(--red-100); }
.mobile-toggle { display: none; }
.mobile-menu { display: none; border-top: 1px solid var(--ink-200); background: #fff; padding: 12px 20px 20px; }
.mobile-menu.open { display: block; }
.mobile-menu a { display: block; padding: 11px 4px; color: var(--ink-700); font-weight: 500; border-bottom: 1px solid var(--ink-100); }

/* ---------- Hero ---------- */
.hero { background: var(--gradient-hero); color: #cbd5e1; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1px); background-size: 26px 26px; mask-image: linear-gradient(180deg, #000 0%, transparent 85%); -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; padding: 96px 0 88px; display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: #e0e7ff; font-size: .8125rem; font-weight: 600; margin-bottom: 22px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-500); box-shadow: 0 0 0 4px rgba(6,182,212,.25); }
.hero h1 { color: #fff; margin-bottom: 20px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 1.125rem; line-height: 1.7; max-width: 540px; color: #cbd5e1; margin-bottom: 32px; }
.hero-search { display: flex; gap: 8px; background: #fff; padding: 6px; border-radius: 14px; max-width: 520px; box-shadow: var(--shadow-lg); }
.hero-search .input { border: 0; box-shadow: none; flex: 1; background: transparent; padding-left: 14px; }
.hero-search .input:focus { box-shadow: none; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; font-size: .875rem; align-items: center; }
.hero-tags a { color: #e0e7ff; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); } .hero-tags a:hover { background: rgba(255,255,255,.12); color: #fff; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-visual { position: relative; height: 420px; }
.float-card { position: absolute; background: rgba(255,255,255,.96); color: var(--ink-700); border-radius: var(--radius-lg); box-shadow: 0 24px 50px -12px rgba(0,0,0,.5); padding: 16px; width: 250px; }
.float-card .thumb { height: 110px; border-radius: 10px; margin-bottom: 12px; }
.float-card strong { display: block; color: var(--ink-900); font-size: .95rem; font-family: var(--font-display); }
.float-card strong, .float-card span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.float-card.one { top: 0; left: 0; transform: rotate(-4deg); } .float-card.two { top: 40px; right: 0; transform: rotate(3deg); } .float-card.three { bottom: -20px; left: 22%; transform: rotate(-1deg); }
.stat-strip { position: relative; z-index: 1; border-top: 1px solid rgba(255,255,255,.12); }
.stat-strip .container { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat-strip .item { padding: 22px 0; text-align: center; color: #94a3b8; font-size: .875rem; }
.stat-strip .item strong { display: block; color: #fff; font: 800 1.6rem/1.2 var(--font-display); }

/* ---------- Product card ---------- */
.product-card { display: flex; flex-direction: column; overflow: hidden; height: 100%; position: relative; }
.product-thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--ink-100); display: block; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.product-card:hover .product-thumb img { transform: scale(1.04); }
.thumb-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.92); font: 800 2.2rem/1 var(--font-display); letter-spacing: -0.03em; }
.thumb-0 { background: linear-gradient(135deg, #4f46e5, #7c3aed); }
.thumb-1 { background: linear-gradient(135deg, #0891b2, #4f46e5); }
.thumb-2 { background: linear-gradient(135deg, #7c3aed, #db2777); }
.thumb-3 { background: linear-gradient(135deg, #0f766e, #0891b2); }
.thumb-4 { background: linear-gradient(135deg, #1d4ed8, #6366f1); }
.thumb-5 { background: linear-gradient(135deg, #be185d, #f59e0b); }
.product-flags { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; }
.wish-btn { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.95); border: 0; color: var(--ink-500); display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); transition: color .15s, transform .15s; }
.wish-btn:hover { color: var(--red-600); transform: scale(1.08); }
.wish-btn.on { color: var(--red-600); } .wish-btn.on svg { fill: currentColor; }
.wish-btn .icon { width: 17px; height: 17px; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product-cat { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--brand-600); margin-bottom: 6px; }
.product-title { font: 700 1.0625rem/1.35 var(--font-display); letter-spacing: -0.01em; margin: 0 0 4px; }
.product-title a { color: var(--ink-900); } .product-title a:hover { color: var(--brand-600); }
.product-by { font-size: .8125rem; color: var(--ink-500); margin-bottom: 12px; }
.product-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--ink-100); display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font: 800 1.25rem/1 var(--font-display); color: var(--ink-900); letter-spacing: -0.02em; }
.price-free { color: var(--green-600); }
.price-old { font-size: .875rem; color: var(--ink-400); text-decoration: line-through; margin-right: 6px; font-weight: 500; font-family: var(--font-sans); }
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: .8125rem; color: var(--ink-600); font-weight: 600; }
.rating .icon { width: 14px; height: 14px; color: var(--amber-500); fill: var(--amber-500); }
.stars { display: inline-flex; gap: 2px; } .stars .icon { width: 16px; height: 16px; color: var(--ink-300); fill: var(--ink-300); stroke: none; } .stars .icon.on { color: var(--amber-500); fill: var(--amber-500); }
.cat-tile { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 22px 12px; gap: 10px; color: var(--ink-800); font-weight: 600; font-size: .9375rem; }
.cat-tile:hover { color: var(--brand-700); }
.cat-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-50); display: flex; align-items: center; justify-content: center; font-size: 1.6rem; transition: background .2s, transform .2s; }
.cat-tile:hover .cat-icon { background: var(--brand-100); transform: scale(1.06); }
.cat-tile small { display: block; font-weight: 400; color: var(--ink-500); font-size: .75rem; margin-top: 2px; }
.seller-card { text-align: center; padding: 26px 18px; }
.seller-card .avatar { margin: 0 auto 12px; width: 60px; height: 60px; font-size: 1.3rem; }
.cta-band { background: var(--gradient-brand); border-radius: var(--radius-xl); padding: 56px 40px; color: #e0e7ff; text-align: center; position: relative; overflow: hidden; }
.cta-band h2 { color: #fff; } .cta-band p { max-width: 560px; margin: 0 auto 26px; font-size: 1.0625rem; }
.feature { display: flex; gap: 16px; } .feature .ficon { width: 46px; height: 46px; flex: none; border-radius: 12px; background: var(--brand-50); color: var(--brand-600); display: flex; align-items: center; justify-content: center; }
.feature h3 { margin-bottom: 4px; } .feature p { margin: 0; color: var(--ink-500); font-size: .9375rem; }

/* ---------- Marketplace ---------- */
.shop-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: start; }
.filters { position: sticky; top: calc(var(--header-h) + 20px); }
.filter-group { padding: 18px 20px; border-bottom: 1px solid var(--ink-100); } .filter-group:last-child { border-bottom: 0; }
.filter-group h4 { font: 700 .75rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-500); margin-bottom: 12px; }
.filter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.filter-list a { display: flex; justify-content: space-between; padding: 6px 10px; margin: 0 -10px; border-radius: 8px; color: var(--ink-600); font-size: .9rem; }
.filter-list a:hover { background: var(--ink-50); color: var(--ink-900); } .filter-list a.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); font-size: .8125rem; font-weight: 600; }
.chip a { color: inherit; display: inline-flex; }

/* ---------- Product page ---------- */
.product-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 36px; align-items: start; }
.product-hero { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--ink-200); aspect-ratio: 16/9; background: var(--ink-100); }
.product-hero img { width: 100%; height: 100%; object-fit: cover; }
.product-hero .thumb-fallback { font-size: 4rem; }
.buy-box { position: sticky; top: calc(var(--header-h) + 20px); }
.buy-price { font: 800 2.25rem/1 var(--font-display); color: var(--ink-900); letter-spacing: -0.03em; }
.license-list { display: flex; flex-direction: column; gap: 8px; margin: 18px 0; }
.radio-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 12px; cursor: pointer; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--ink-300); }
.radio-card input { accent-color: var(--brand-600); width: 18px; height: 18px; flex: none; }
.radio-card:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 1px var(--brand-500); }
.radio-card strong { display: block; color: var(--ink-900); font-size: .9375rem; } .radio-card small { color: var(--ink-500); font-size: .8125rem; }
.meta-list { list-style: none; margin: 0; padding: 0; }
.meta-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); font-size: .9rem; }
.meta-list li:last-child { border-bottom: 0; } .meta-list li span:first-child { color: var(--ink-500); } .meta-list li span:last-child { color: var(--ink-900); font-weight: 600; text-align: right; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ink-200); margin: 36px 0 24px; overflow-x: auto; }
.tab { padding: 12px 16px; font-weight: 600; font-size: .9375rem; color: var(--ink-500); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; background: none; border-left: 0; border-right: 0; border-top: 0; cursor: pointer; }
.tab:hover { color: var(--ink-900); } .tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.tab-panel { display: none; } .tab-panel.active { display: block; }
.prose { color: var(--ink-700); line-height: 1.8; font-size: 1.0125rem; max-width: 72ch; }
.prose h2, .prose h3 { margin-top: 1.6em; } .prose ul, .prose ol { padding-left: 1.3em; } .prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--radius); } .prose a { text-decoration: underline; } .prose pre { background: var(--ink-900); color: #e2e8f0; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: .875rem; }
.prose blockquote { border-left: 3px solid var(--brand-300); margin: 1.2em 0; padding: .2em 1.2em; color: var(--ink-600); background: var(--brand-50); border-radius: 0 10px 10px 0; }
.review { padding: 20px 0; border-bottom: 1px solid var(--ink-100); } .review:last-child { border-bottom: 0; }
.review-reply { margin-top: 12px; padding: 12px 16px; background: var(--ink-50); border-left: 3px solid var(--brand-300); border-radius: 0 10px 10px 0; font-size: .9rem; }
.bar-row { display: flex; align-items: center; gap: 10px; font-size: .8125rem; color: var(--ink-500); }
.bar-track { flex: 1; height: 8px; background: var(--ink-100); border-radius: 99px; overflow: hidden; } .bar-fill { height: 100%; background: var(--amber-500); border-radius: 99px; }
.rate-input { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rate-input input { position: absolute; opacity: 0; }
.rate-input label { cursor: pointer; color: var(--ink-300); } .rate-input label .icon { width: 28px; height: 28px; fill: currentColor; stroke: none; }
.rate-input input:checked ~ label, .rate-input label:hover, .rate-input label:hover ~ label { color: var(--amber-500); }

/* ---------- Cart / checkout ---------- */
.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 32px; align-items: start; }
.cart-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 18px 24px; border-bottom: 1px solid var(--ink-100); } .cart-item:last-child { border-bottom: 0; }
.cart-thumb { width: 96px; aspect-ratio: 16/10; border-radius: 10px; overflow: hidden; background: var(--ink-100); } .cart-thumb img { width: 100%; height: 100%; object-fit: cover; } .cart-thumb .thumb-fallback { font-size: 1.4rem; }
.summary { position: sticky; top: calc(var(--header-h) + 20px); }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: .9375rem; } .summary-row span:first-child { color: var(--ink-500); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 16px; margin-top: 10px; border-top: 1px solid var(--ink-200); font: 800 1.5rem/1 var(--font-display); color: var(--ink-900); } .summary-total span:first-child { font: 600 1rem var(--font-sans); color: var(--ink-600); }
.method-list { display: flex; flex-direction: column; gap: 10px; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: .8125rem; color: var(--ink-500); margin-top: 14px; }
.success-icon { width: 76px; height: 76px; border-radius: 50%; background: var(--green-100); color: var(--green-600); display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; } .success-icon .icon { width: 36px; height: 36px; stroke-width: 2.4; }
.success-icon.warn { background: var(--amber-100); color: var(--amber-700); } .success-icon.bad { background: var(--red-100); color: var(--red-600); }
.license-key { display: inline-block; font-family: var(--font-mono); font-size: .8125rem; padding: 4px 10px; background: var(--ink-100); border: 1px dashed var(--ink-300); border-radius: 8px; color: var(--ink-800); letter-spacing: .04em; user-select: all; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.table th { text-align: left; padding: 12px 16px; font: 700 .72rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-500); background: var(--ink-50); border-bottom: 1px solid var(--ink-200); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--ink-100); vertical-align: middle; color: var(--ink-700); }
.table tr:last-child td { border-bottom: 0; } .table tbody tr:hover td { background: var(--ink-50); }
.table td.actions { text-align: right; white-space: nowrap; } .table td.actions form { display: inline-block; }
.table .cell-title { color: var(--ink-900); font-weight: 600; display: block; } .table .cell-sub { color: var(--ink-500); font-size: .8125rem; }
.table-user { display: flex; align-items: center; gap: 12px; } .table-user .avatar { width: 34px; height: 34px; font-size: .8rem; }
.table-thumb { width: 52px; height: 36px; border-radius: 6px; overflow: hidden; flex: none; background: var(--ink-100); } .table-thumb img { width: 100%; height: 100%; object-fit: cover; } .table-thumb .thumb-fallback { font-size: .9rem; }
.pagination { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; margin-top: 28px; align-items: center; }
.pagination a, .pagination span.page { min-width: 38px; height: 38px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; border: 1px solid var(--ink-200); background: #fff; color: var(--ink-700); font-size: .875rem; font-weight: 600; }
.pagination a:hover { border-color: var(--brand-500); color: var(--brand-700); }
.pagination span.page.current { background: var(--brand-600); border-color: var(--brand-600); color: #fff; } .pagination span.page.disabled { color: var(--ink-300); background: var(--ink-50); } .pagination span.gap { color: var(--ink-400); padding: 0 4px; }

/* ---------- Dashboards ---------- */
.dash > * { min-width: 0; }
.dash { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); align-items: start; }
.sidebar { position: sticky; top: var(--header-h); height: calc(100vh - var(--header-h)); overflow-y: auto; background: #fff; border-right: 1px solid var(--ink-200); padding: 22px 14px; }
.sidebar-title { font: 700 .7rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); padding: 0 12px; margin-bottom: 12px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink-600); font-weight: 500; font-size: .9375rem; }
.sidebar-link .icon { width: 19px; height: 19px; color: var(--ink-400); }
.sidebar-link:hover { background: var(--ink-100); color: var(--ink-900); }
.sidebar-link.active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; } .sidebar-link.active .icon { color: var(--brand-600); }
.sidebar-link .count { margin-left: auto; background: var(--brand-600); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.sidebar-switch { margin-top: 22px; padding: 14px; border-radius: 12px; background: var(--ink-50); border: 1px solid var(--ink-200); font-size: .8125rem; color: var(--ink-500); } .sidebar-switch a { font-weight: 600; }
.dash-main { padding: 32px 36px 64px; min-width: 0; }
.dash-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.dash-head h1 { font-size: 1.625rem; margin-bottom: 4px; } .dash-head p { margin: 0; color: var(--ink-500); }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { padding: 20px 22px; background: #fff; border: 1px solid var(--ink-200); border-radius: var(--radius-lg); position: relative; }
.stat-label { font-size: .8125rem; color: var(--ink-500); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.stat-label .icon { width: 16px; height: 16px; color: var(--brand-600); }
.stat-value { font: 800 1.75rem/1.2 var(--font-display); color: var(--ink-900); margin-top: 8px; letter-spacing: -0.03em; }
.stat-hint { font-size: .8125rem; color: var(--ink-500); margin-top: 4px; }
.stat.accent { background: var(--gradient-brand); border-color: transparent; } .stat.accent .stat-label, .stat.accent .stat-hint { color: #e0e7ff; } .stat.accent .stat-label .icon { color: #c7d2fe; } .stat.accent .stat-value { color: #fff; }
.queue { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.queue a { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 10px; color: var(--ink-700); font-size: .9rem; font-weight: 500; background: #fff; }
.queue a:hover { border-color: var(--brand-500); color: var(--brand-700); } .queue a b { background: var(--ink-100); border-radius: 99px; padding: 1px 10px; font-size: .8125rem; } .queue a.hot b { background: var(--amber-100); color: var(--amber-700); }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding-top: 10px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 8px; height: 100%; min-width: 0; }
.chart .bar { width: 100%; max-width: 34px; border-radius: 6px 6px 2px 2px; background: linear-gradient(180deg, var(--brand-500), var(--brand-600)); min-height: 3px; transition: opacity .15s; } .chart .bar:hover { opacity: .8; }
.chart .bar.zero { background: var(--ink-200); } .chart small { font-size: .65rem; color: var(--ink-400); white-space: nowrap; }
.split { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; } .filter-bar .input, .filter-bar .select { width: auto; min-width: 170px; }
.ticket-msg { padding: 16px 20px; border-radius: var(--radius); background: #fff; border: 1px solid var(--ink-200); margin-bottom: 14px; max-width: 760px; }
.ticket-msg.staff { background: var(--brand-50); border-color: var(--brand-100); margin-left: auto; }
.ticket-msg header { display: flex; justify-content: space-between; gap: 10px; font-size: .8125rem; color: var(--ink-500); margin-bottom: 8px; } .ticket-msg header strong { color: var(--ink-900); }
.notif { display: flex; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--ink-100); align-items: flex-start; } .notif:last-child { border-bottom: 0; } .notif.unread { background: var(--brand-50); }
.notif .nicon { width: 38px; height: 38px; border-radius: 10px; background: #fff; border: 1px solid var(--ink-200); color: var(--brand-600); display: flex; align-items: center; justify-content: center; flex: none; }
.details { margin: 0; } .details > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--ink-100); font-size: .9rem; } .details > div:last-child { border-bottom: 0; } .details dt { color: var(--ink-500); } .details dd { margin: 0; color: var(--ink-900); font-weight: 600; text-align: right; }
.copy-btn { cursor: pointer; }

/* ---------- Auth ---------- */
.auth-page { min-height: calc(100vh - var(--header-h)); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-aside { background: var(--gradient-hero); color: #cbd5e1; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-aside h2 { color: #fff; font-size: 2.1rem; } .auth-aside ul { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; } .auth-aside li { display: flex; gap: 12px; align-items: flex-start; } .auth-aside li .icon { color: var(--accent-500); margin-top: 3px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.auth-card { width: 100%; max-width: 420px; } .auth-card h1 { font-size: 1.85rem; margin-bottom: 6px; } .auth-card .sub { color: var(--ink-500); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink-950); color: var(--ink-400); padding: 64px 0 0; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 40px; padding-bottom: 48px; }
.site-footer h4 { color: #fff; font: 700 .8125rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 18px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; } .site-footer a { color: var(--ink-400); font-size: .9375rem; } .site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; margin-bottom: 14px; } .site-footer p { font-size: .9375rem; max-width: 320px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 22px 0; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .8125rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); }
  .hero-inner { grid-template-columns: 1fr; padding: 72px 0 64px; } .hero-visual { display: none; }
  .product-layout, .cart-layout { grid-template-columns: minmax(0, 1fr); } .buy-box, .summary { position: static; }
}
@media (max-width: 900px) {
  .nav-links, .header-search { display: none; } .mobile-toggle { display: inline-flex; }
  .shop-layout { grid-template-columns: 1fr; } .filters { position: static; }
  .dash { grid-template-columns: 1fr; } .sidebar { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--ink-200); padding: 12px; }
  .sidebar { overflow-x: hidden; } .sidebar-title, .sidebar-switch { display: none; } .sidebar-nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; } .sidebar-link { white-space: nowrap; padding: 8px 12px; }
  .dash-main { padding: 24px 16px 56px; }
  .auth-page { grid-template-columns: 1fr; } .auth-aside { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; } .queue { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .nav { gap: 8px; } .nav-actions { gap: 2px; } .nav-actions .btn-ghost { display: none; } .brand small { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-2-sm { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; }
  .section { padding: 52px 0; } .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .stat { padding: 16px; } .stat-value { font-size: 1.4rem; }
  .cart-item { grid-template-columns: 72px minmax(0, 1fr); } .cart-item > :last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; } .cart-thumb { width: 72px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; } .cta-band { padding: 40px 22px; } .hero-search { flex-direction: column; } .hero-search .btn { width: 100%; }
  .stat-strip .item strong { font-size: 1.2rem; } .queue { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .site-header, .site-footer, .sidebar, .btn { display: none !important; } body { background: #fff; } }


/* ==========================================================================
   Marketplace theme layer (ThemeForest-style): white canvas, green accent, flat dense cards,
   search-with-category header and a dark category strip. Overrides the tokens above.
   ========================================================================== */
:root {
  --radius-sm: 4px; --radius: 6px; --radius-lg: 8px; --radius-xl: 12px;
  --brand-700: #477a14; --brand-600: #5b9a1d; --brand-500: #82b541; --brand-300: #b9db8b; --brand-100: #e3f1cf; --brand-50: #f3f9ea;
  --violet-600: #477a14; --accent-600: #2f8f6b; --accent-500: #82b541; --accent-100: #e3f1cf;
  --gradient-brand: linear-gradient(135deg, #6aa626 0%, #477a14 100%);
  --gradient-hero: radial-gradient(900px 420px at 85% -20%, rgba(130,181,65,.32), transparent 60%),
                   radial-gradient(700px 400px at 0% 110%, rgba(47,143,107,.25), transparent 60%),
                   linear-gradient(180deg, #0e1a13 0%, #15251b 100%);
  --ring: 0 0 0 3px rgba(130,181,65,.35);
  --header-h: 108px;
}
body { background: #fff; color: #3d4742; }
.section-alt { background: #f6f8f5; border-color: #e5e9e4; }
.card { box-shadow: none; border-color: #dfe4de; }
.card-hover:hover { box-shadow: 0 10px 28px rgba(14,26,19,.12); transform: none; border-color: #c9d1c7; }
.btn { border-radius: 6px; }
.btn-primary { box-shadow: none; } .btn-primary:hover { background: var(--brand-700); }
.btn-dark { background: #1f2a24; } .btn-dark:hover { background: #2d3b33; }
.badge { border-radius: 4px; }
.price { font-family: var(--font-sans); font-weight: 700; letter-spacing: -0.01em; }
.dash-main { background: #f6f8f5; }
.thumb-0 { background: linear-gradient(135deg, #3f7f1f, #82b541); }
.thumb-1 { background: linear-gradient(135deg, #0f766e, #34b3a0); }
.thumb-2 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.thumb-3 { background: linear-gradient(135deg, #7c2d12, #f59e0b); }
.thumb-4 { background: linear-gradient(135deg, #3730a3, #818cf8); }
.thumb-5 { background: linear-gradient(135deg, #831843, #f472b6); }

/* ---- header: logo + big search with category select + actions, then dark category strip ---- */
.site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom: 0; box-shadow: 0 1px 0 #e5e9e4; }
.nav { height: 64px; gap: 22px; }
.brand-mark { border-radius: 8px; box-shadow: none; }
.header-search { flex: 1; max-width: none; }
.search-box { display: flex; align-items: stretch; border: 1px solid #cfd6cd; border-radius: 6px; background: #fff; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.search-box:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.search-box select { border: 0; border-right: 1px solid #e5e9e4; background: #f6f8f5; padding: 0 30px 0 14px; font: 600 .8125rem var(--font-sans); color: var(--ink-700); max-width: 190px; outline: 0; appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; background-size: 14px; }
.search-box input { flex: 1; min-width: 0; border: 0; padding: 11px 14px; font: 400 .9375rem var(--font-sans); color: var(--ink-900); background: transparent; outline: 0; }
.search-box button { border: 0; background: var(--brand-600); color: #fff; padding: 0 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .15s; }
.search-box button:hover { background: var(--brand-700); }
.search-box.lg { height: 58px; max-width: 780px; margin: 0 auto; border: 0; border-radius: 8px; box-shadow: 0 18px 40px -12px rgba(0,0,0,.5); }
.search-box.lg select { max-width: 210px; font-size: .875rem; padding-left: 18px; }
.search-box.lg input { font-size: 1.0625rem; padding-left: 18px; }
.search-box.lg button { padding: 0 30px; font: 700 .9375rem var(--font-sans); gap: 8px; }
.nav-actions .btn-ghost { font-weight: 600; }
.catbar { background: #1f2a24; }
.catbar .container { display: flex; align-items: center; gap: 2px; height: 44px; overflow-x: auto; scrollbar-width: none; }
.catbar .container::-webkit-scrollbar { display: none; }
.catbar a { display: flex; align-items: center; height: 44px; padding: 0 14px; color: #c4cfc7; font-size: .875rem; font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; transition: color .15s, background .15s; }
.catbar a:hover { color: #fff; background: rgba(255,255,255,.06); }
.catbar a.active { color: #fff; border-bottom-color: var(--brand-500); }
.catbar .sep { margin-left: auto; }
.catbar a.accent { color: #b9db8b; font-weight: 600; }

/* ---- hero: centred, dark green, one big search ---- */
.hero-inner { display: block; text-align: center; padding: 88px 0 76px; }
.hero h1 { max-width: 880px; margin-left: auto; margin-right: auto; font-size: clamp(2.1rem, 1.4rem + 2.8vw, 3.5rem); }
.hero h1 em { background: linear-gradient(90deg, #b9db8b, #82b541); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { margin: 0 auto 34px; max-width: 620px; }
.eyebrow { background: rgba(130,181,65,.14); border-color: rgba(130,181,65,.35); color: #d6ecb8; }
.eyebrow .dot { background: var(--brand-500); box-shadow: 0 0 0 4px rgba(130,181,65,.25); }
.hero-tags { justify-content: center; margin-top: 22px; }
.hero-tags a { border-radius: 4px; }
.stat-strip { background: rgba(0,0,0,.18); }

/* ---- product card: wide preview, title, author, category, then sales + price ---- */
.product-card { border-radius: 6px; }
.product-thumb { aspect-ratio: 590 / 300; border-bottom: 1px solid #e5e9e4; }
.thumb-fallback { font-size: 2rem; }
.product-body { padding: 14px 16px 14px; }
.product-title { font: 600 1rem/1.35 var(--font-sans); letter-spacing: 0; margin-bottom: 2px; }
.product-by { margin: 0; font-size: .8125rem; color: var(--ink-500); }
.product-cat { margin: 8px 0 12px; font-size: .8125rem; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--brand-700); }
.product-foot { border-top: 1px solid #edf0ec; padding-top: 12px; }
.product-sales { display: inline-flex; align-items: center; gap: 6px; font-size: .8125rem; color: var(--ink-500); font-weight: 600; }
.product-sales .icon { width: 15px; height: 15px; color: var(--ink-400); }
.product-meta { display: flex; align-items: center; gap: 10px; min-width: 0; }
.price-tag { font: 800 1.1875rem/1 var(--font-sans); color: var(--ink-900); letter-spacing: -0.01em; }
.price-tag.free { color: var(--brand-600); }
.wish-btn { opacity: 0; transition: opacity .15s, color .15s, transform .15s; border-radius: 6px; }
.product-card:hover .wish-btn, .wish-btn.on, .wish-btn:focus-visible { opacity: 1; }
@media (hover: none) { .wish-btn { opacity: 1; } }

/* ---- section heading ---- */
.section { padding: 56px 0; }
.section-head h2 { font-size: 1.5rem; }
.cat-tile { border-radius: 8px; padding: 20px 10px; } .cat-icon { border-radius: 10px; background: var(--brand-50); }
.cta-band { border-radius: 10px; background: linear-gradient(135deg, #1b3a12 0%, #3f7f1f 100%); }
.feature .ficon { border-radius: 10px; }

/* ---- product page extras ---- */
.preview-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 14px 0 0; }
.checklist { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 9px; font-size: .9rem; color: var(--ink-700); }
.checklist li { display: flex; gap: 10px; align-items: flex-start; } .checklist .icon { color: var(--brand-600); margin-top: 3px; width: 16px; height: 16px; stroke-width: 2.4; }
.buy-box .card { border-width: 1px; border-top: 3px solid var(--brand-500); }
.buy-price { font-family: var(--font-sans); }
.tabs { margin-top: 28px; } .tab.active { border-bottom-color: var(--brand-500); color: var(--ink-900); }

/* ---- footer ---- */
.site-footer { background: #121a15; }
.site-footer .brand { color: #fff; }

/* ---- responsive overrides ---- */
@media (max-width: 900px) {
  :root { --header-h: 64px; }
  .catbar { display: none; } .header-search { display: none; }
  .nav { gap: 8px; } .nav-actions { margin-left: auto; }
}
@media (max-width: 680px) {
  .hero-inner { padding: 56px 0 48px; }
  .search-box.lg { height: auto; flex-wrap: wrap; } .search-box.lg select { max-width: none; width: 100%; padding: 12px 18px; border-right: 0; border-bottom: 1px solid #e5e9e4; }
  .search-box.lg input { flex-basis: 70%; } .search-box.lg button { padding: 0 20px; min-height: 50px; }
}

/* ---- fixes ---- */
.pagination .page { padding: 0 12px; min-height: 0; }           /* ".page" is also the page-wrapper class */
.price-tag { text-align: right; line-height: 1.1; }
.price-tag .price-old { display: block; margin: 0 0 3px; font-size: .75rem; font-weight: 500; }


/* ---- v3: plainer home, neutral image fallback, WhatsApp, payment chips ---- */
.hero-inner { padding: 72px 0 64px; }
.hero h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); letter-spacing: -0.02em; max-width: 780px; }
.hero-sub { font-size: 1.0625rem; margin-bottom: 28px; }
.thumb-fallback { background: #edf0ed; color: #a3ada6; }
.trust-bar { background: #f6f8f5; border-bottom: 1px solid #e5e9e4; }
.trust-bar .container { display: flex; justify-content: space-between; gap: 12px 28px; flex-wrap: wrap; padding-top: 14px; padding-bottom: 14px; font-size: .875rem; color: var(--ink-600); font-weight: 500; }
.trust-bar span { display: inline-flex; align-items: center; gap: 8px; } .trust-bar .icon { width: 17px; height: 17px; color: var(--brand-600); }
.cat-icon { width: 48px; height: 48px; color: var(--brand-700); background: var(--brand-50); border-radius: 10px; }
.sell-band { background: #15251b; color: #c4cfc7; padding: 44px 0; }
.sell-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sell-band h2 { color: #fff; margin-bottom: 6px; font-size: 1.5rem; } .sell-band p { margin: 0; max-width: 620px; }
.section-head p { font-size: .9375rem; }
.section-head > a { white-space: nowrap; }

/* WhatsApp chat button: official green, solid logo, gentle pulse; expands to a label on hover / keyboard focus */
.wa-float { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 55; display: flex; align-items: center; height: 60px; padding: 0; border-radius: 999px;
  background: #25d366; color: #fff; text-decoration: none; box-shadow: 0 10px 26px -6px rgba(37,211,102,.65), 0 3px 8px rgba(0,0,0,.18); transition: transform .2s ease, box-shadow .2s ease, background .2s; }
.wa-float::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #25d366; z-index: -1; animation: wa-pulse 2.6s ease-out infinite; }
.wa-float:hover, .wa-float:focus-visible { color: #fff; background: #1ebe5b; transform: translateY(-2px); box-shadow: 0 14px 30px -6px rgba(37,211,102,.75), 0 4px 10px rgba(0,0,0,.2); }
.wa-float:focus-visible { outline: 3px solid #fff; outline-offset: -3px; box-shadow: 0 0 0 3px #128c7e, 0 10px 26px -6px rgba(37,211,102,.65); }
.wa-float .icon { width: 34px; height: 34px; margin: 13px; flex: none; }
.wa-float span { max-width: 0; overflow: hidden; white-space: nowrap; font: 700 .9375rem var(--font-sans); transition: max-width .28s ease, margin .28s ease; }
.wa-float:hover span, .wa-float:focus-visible span { max-width: 170px; margin-inline-end: 20px; }
.wa-float:hover::before, .wa-float:focus-visible::before { animation: none; opacity: 0; }
@keyframes wa-pulse { 0% { transform: scale(1); opacity: .55; } 70%, 100% { transform: scale(1.55); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .wa-float::before { animation: none; display: none; } .wa-float, .wa-float span { transition: none; } }
@media (max-width: 680px) { .wa-float { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); height: 54px; } .wa-float .icon { width: 30px; height: 30px; margin: 12px; } }
.wa-link .icon { color: #25d366; width: 18px; height: 18px; vertical-align: -4px; margin-inline-end: 6px; }

.pay-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; font: 800 .6875rem/1.5 var(--font-sans); letter-spacing: .02em; color: #fff; background: var(--ink-600); margin-left: 8px; vertical-align: 1px; }
.pay-paypal { background: #003087; } .pay-khalti { background: #5c2d91; } .pay-esewa { background: #60bb46; } .pay-stripe { background: #635bff; } .pay-razorpay { background: #0b2a6f; } .pay-demo { background: #b45309; }
.copy-field { display: flex; gap: 8px; } .copy-field .input { font-family: var(--font-mono); font-size: .8125rem; background: var(--ink-50); }
.gateway-card { margin-bottom: 18px; } .gateway-card .card-header h3 { display: flex; align-items: center; gap: 10px; }
.section-head > a { display: inline-flex; align-items: center; gap: 6px; }

/* ---- v4: dashboard shell (own top bar, no storefront chrome), currency switch, Google button ---- */
body.dash-body { --header-h: 60px; background: #f6f8f5; }
.dtop { position: sticky; top: 0; z-index: 50; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 20px; background: #fff; border-bottom: 1px solid #e5e9e4; }
.dtop .brand small { letter-spacing: .12em; font-size: .6rem; }
.dtop-right { display: flex; align-items: center; gap: 8px; }
.dtop-user { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 4px 8px 4px 4px; border-radius: 999px; cursor: pointer; font: 600 .875rem var(--font-sans); color: var(--ink-800); }
.dtop-user:hover { background: var(--ink-100); }
body.dash-body .sidebar { top: 60px; height: calc(100vh - 60px); }
body.dash-body .dash { min-height: calc(100vh - 60px); }
.cur-switch select { appearance: none; -webkit-appearance: none; border: 1px solid #dfe4de; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 8px center / 12px; border-radius: 6px; padding: 7px 26px 7px 10px; font: 600 .8125rem var(--font-sans); color: var(--ink-700); cursor: pointer; }
.cur-switch select:hover { border-color: var(--ink-400); }
.google-btn { gap: 12px; }
.or-divider { display: flex; align-items: center; gap: 14px; margin: 20px 0; color: var(--ink-400); font-size: .8125rem; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--ink-200); }
@media (max-width: 900px) {
  .dtop { padding: 0 12px; } .dtop-user-name, .dtop-site span { display: none; } .dtop-site { padding: 6px 9px; }
  body.dash-body .sidebar { top: auto; height: auto; }
  .dash-link span { display: none; } .dash-link { padding: 6px 9px; }
  .cur-switch select { padding: 6px 22px 6px 8px; }
}
@media (max-width: 480px) { .cur-switch { display: none; } .nav-actions .dash-link { display: none; } }

/* ---- v5: gallery, author page, editor, avatars ---- */
.gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.gallery-thumb { width: 96px; aspect-ratio: 590/300; padding: 0; border: 2px solid #dfe4de; border-radius: 6px; overflow: hidden; background: #fff; cursor: pointer; opacity: .75; transition: opacity .15s, border-color .15s; }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }
.gallery-thumb:hover, .gallery-thumb.active { opacity: 1; border-color: var(--brand-500); }
.gallery-edit { display: flex; gap: 12px; flex-wrap: wrap; }
.gallery-edit-item { display: block; width: 130px; font-size: .8125rem; } .gallery-edit-item img { width: 100%; aspect-ratio: 590/300; object-fit: cover; border-radius: 6px; border: 1px solid #dfe4de; margin-bottom: 6px; }
.avatar-xl { width: 88px; height: 88px; font-size: 2rem; border: 4px solid #fff; box-shadow: var(--shadow-sm); }
.author-hero { height: 200px; background: linear-gradient(135deg, #15251b, #3f7f1f) center / cover no-repeat; }
/* the name block starts BELOW the banner (dark text on the white page); only the round photo overlaps the banner */
.author-head { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; margin: 0 0 28px; padding-top: 18px; position: relative; }
.author-head .avatar-xl { margin-top: -62px; flex: none; position: relative; z-index: 1; }
.author-head > .min-0 { flex: 1 1 260px; padding-top: 4px; } .author-head h1 { overflow-wrap: anywhere; line-height: 1.2; }
.author-links { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding-top: 6px; }
@media (max-width: 560px) { .author-hero { height: 150px; } .author-head { gap: 14px; } .author-head .avatar-xl { margin-top: -54px; } .author-head > .min-0 { flex-basis: calc(100% - 110px); } .author-links { width: 100%; } }
.author-banner { height: 120px; border-radius: 8px; background: linear-gradient(135deg, #15251b, #3f7f1f) center / cover no-repeat; }
.editor { border: 1px solid #cfd6cd; border-radius: 8px; background: #fff; overflow: hidden; }
.editor:focus-within { border-color: var(--brand-500); box-shadow: var(--ring); }
.editor-bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 8px; background: #f6f8f5; border-bottom: 1px solid #e5e9e4; }
.editor-bar button { border: 1px solid transparent; background: transparent; border-radius: 6px; padding: 5px 10px; font: 700 .8125rem var(--font-sans); color: var(--ink-700); cursor: pointer; }
.editor-bar button:hover { background: #fff; border-color: #dfe4de; }
.editor-area { min-height: 320px; padding: 16px 18px; outline: none; max-width: none; }
.editor-area img { max-width: 100%; height: auto; }
.prose img { max-width: 100%; height: auto; margin: 1em 0; } .prose table { border-collapse: collapse; width: 100%; } .prose td, .prose th { border: 1px solid var(--ink-200); padding: 8px 10px; }
.avatar img { border-radius: 50%; }

/* ---- v6: languages: per-script fonts and right-to-left layout (Arabic) ---- */
html[lang="ar"] { --font-sans: 'Noto Sans Arabic', 'Inter', ui-sans-serif, system-ui, 'Segoe UI', Tahoma, Arial, sans-serif; --font-display: 'Noto Sans Arabic', 'Plus Jakarta Sans', ui-sans-serif, system-ui, Tahoma, Arial, sans-serif; }
html[lang="hi"], html[lang="ne"] { --font-sans: 'Noto Sans Devanagari', 'Inter', ui-sans-serif, system-ui, 'Segoe UI', Mangal, sans-serif; --font-display: 'Noto Sans Devanagari', 'Plus Jakarta Sans', ui-sans-serif, system-ui, Mangal, sans-serif; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="hi"] h1, html[lang="hi"] h2, html[lang="ne"] h1, html[lang="ne"] h2 { letter-spacing: 0; line-height: 1.35; }

[dir="rtl"] body { text-align: right; }
[dir="rtl"] .dropdown-menu { right: auto; left: 0; }
[dir="rtl"] .input-icon .icon { left: auto; right: 12px; } [dir="rtl"] .input-icon .input { padding-left: 14px; padding-right: 40px; }
[dir="rtl"] .select, [dir="rtl"] .cur-switch select { background-position: left 12px center; padding-right: 14px; padding-left: 38px; }
[dir="rtl"] .cur-switch select { padding-left: 26px; padding-right: 10px; background-position: left 8px center; }
[dir="rtl"] .search-box select { border-right: 0; border-left: 1px solid #e5e9e4; padding: 0 14px 0 30px; background-position: left 10px center; }
[dir="rtl"] .wa-float { right: auto; left: 20px; } [dir="rtl"] .flash-wrap { right: auto; left: 16px; }
[dir="rtl"] .catbar .sep { margin-left: 0; margin-right: auto; }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--ink-200); }
[dir="rtl"] .sidebar-link .count { margin-left: 0; margin-right: auto; }
[dir="rtl"] .text-right, [dir="rtl"] .table td.actions { text-align: left; }
[dir="rtl"] .table th { text-align: right; }
[dir="rtl"] .count-dot { right: auto; left: 2px; }
[dir="rtl"] .product-flags { left: auto; right: 10px; } [dir="rtl"] .wish-btn { right: auto; left: 10px; }
[dir="rtl"] .price-old { margin-right: 0; margin-left: 6px; } [dir="rtl"] .price-tag { text-align: left; }
[dir="rtl"] .pay-chip { margin-left: 0; margin-right: 8px; }
[dir="rtl"] .cart-item .text-right { text-align: left; }
[dir="rtl"] .icon[class*="arrow"], [dir="rtl"] .btn .icon-sm { transform: scaleX(-1); }
[dir="rtl"] .check input, [dir="rtl"] .radio-card input { margin-left: 0; }
[dir="rtl"] .alert-success, [dir="rtl"] .flash-wrap .alert-success { border-left: 1px solid #bbf7d0; border-right: 4px solid var(--green-600); }
[dir="rtl"] .flash-wrap .alert-error { border-left: 1px solid #fecaca; border-right: 4px solid var(--red-600); }
[dir="rtl"] .review-reply, [dir="rtl"] .prose blockquote { border-left: 0; border-right: 3px solid var(--brand-300); border-radius: 10px 0 0 10px; }
[dir="rtl"] .breadcrumb .sep { transform: scaleX(-1); display: inline-block; }
/* numbers, currencies, codes and emails read left-to-right even inside Arabic text */
[dir="rtl"] .price, [dir="rtl"] .price-tag, [dir="rtl"] .buy-price, [dir="rtl"] .mono, [dir="rtl"] .license-key, [dir="rtl"] code,
[dir="rtl"] input[type="email"], [dir="rtl"] input[type="url"], [dir="rtl"] input[type="password"], [dir="rtl"] .summary-row span:last-child, [dir="rtl"] .summary-total span:last-child { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .price-tag, [dir="rtl"] .summary-row span:last-child, [dir="rtl"] .summary-total span:last-child { text-align: right; }
@media (max-width: 900px) { [dir="rtl"] .sidebar { border-left: 0; } }

/* ==========================================================================
   v7: uploaded logo, off-canvas public menu (drawer), off-canvas dashboard sidebar, image-edit widgets
   ========================================================================== */
.brand-logo { height: 36px; width: auto; max-width: 200px; object-fit: contain; display: block; }
.brand-logo.on-dark { background: #fff; border-radius: 8px; padding: 5px 10px; height: 40px; }
.dtop .brand-logo { height: 30px; } .dtop-area-tag { font: 700 .65rem/1 var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); background: var(--ink-100); padding: 5px 8px; border-radius: 4px; margin-left: 10px; }
.dtop .brand { display: inline-flex; align-items: center; }
.dtop-toggle, .sidebar-head, .sidebar-overlay { display: none; }

/* ---- public drawer: hidden on desktop, slides in from the side on small screens ---- */
.drawer, .drawer-overlay { display: none; }
@media (max-width: 900px) {
  .drawer-overlay { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.55); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 85; }
  .drawer { display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; width: min(330px, 88vw); background: #fff; z-index: 90;
    transform: translateX(-104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); box-shadow: none; visibility: hidden; }
  body.drawer-open .drawer { transform: none; box-shadow: 0 0 48px rgba(0,0,0,.3); visibility: visible; }
  body.drawer-open .drawer-overlay { opacity: 1; visibility: visible; }
  body.drawer-open, body.sidebar-open { overflow: hidden; }
  .drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 12px 18px; border-bottom: 1px solid var(--ink-200); flex: none; }
  .drawer-body { flex: 1; overflow-y: auto; padding: 16px 16px 8px; -webkit-overflow-scrolling: touch; }
  .drawer-search { margin-bottom: 14px; }
  .drawer-search .search-box select { max-width: 120px; }
  .drawer-nav { display: flex; flex-direction: column; margin-bottom: 8px; }
  .drawer-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 8px; border-radius: 8px; color: var(--ink-700); font-weight: 600; font-size: .95rem; }
  .drawer-nav a .icon { width: 19px; height: 19px; color: var(--ink-400); }
  .drawer-nav a:hover { background: var(--ink-50); color: var(--ink-900); }
  .drawer-nav a.accent { color: var(--brand-700); } .drawer-nav a.accent .icon { color: var(--brand-600); }
  .drawer-group { font: 700 .7rem/1 var(--font-sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-400); padding: 14px 8px 6px; border-top: 1px solid var(--ink-100); margin-top: 6px; }
  .drawer-prefs { border-top: 1px solid var(--ink-100); margin-top: 10px; padding-top: 6px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .drawer-prefs label { font-size: .75rem; margin-bottom: 4px; }
  .drawer-prefs .select { padding: 8px 30px 8px 10px; font-size: .875rem; }
  .drawer-foot { flex: none; padding: 12px 16px calc(14px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--ink-200); display: grid; gap: 10px; background: #fff; }
  [dir="rtl"] .drawer { left: auto; right: 0; transform: translateX(104%); }
  [dir="rtl"] body.drawer-open .drawer { transform: none; }
  [dir="rtl"] .drawer-head { padding: 12px 18px 12px 14px; }
}

/* ---- dashboard sidebar becomes an off-canvas drawer on small screens (replaces the old horizontal strip) ---- */
@media (max-width: 900px) {
  html body.dash-body .dtop-toggle { display: inline-flex; margin-right: 2px; }
  html body.dash-body .dash { grid-template-columns: minmax(0, 1fr); }
  html body.dash-body aside.sidebar { position: fixed; top: 0; bottom: 0; left: 0; height: auto; width: min(300px, 86vw); z-index: 90; padding: 0 14px 20px;
    border: 0; border-right: 1px solid var(--ink-200); overflow-y: auto; overflow-x: hidden; background: #fff;
    transform: translateX(-104%); transition: transform .26s cubic-bezier(.2,.8,.2,1); visibility: hidden; box-shadow: none; }
  html body.dash-body.sidebar-open aside.sidebar { transform: none; visibility: visible; box-shadow: 0 0 48px rgba(0,0,0,.3); }
  html body.dash-body .sidebar-head { display: flex; align-items: center; justify-content: space-between; height: 60px; margin: 0 -14px 12px; padding: 0 12px 0 16px; border-bottom: 1px solid var(--ink-200); position: sticky; top: 0; background: #fff; z-index: 2; }
  html body.dash-body .sidebar-title { display: block; }
  html body.dash-body .sidebar-nav { flex-direction: column; overflow: visible; gap: 2px; padding-bottom: 4px; }
  html body.dash-body .sidebar-link { white-space: normal; padding: 11px 12px; }
  html body.dash-body .sidebar-switch { display: block; }
  html body.dash-body .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.55); opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s; z-index: 85; }
  html body.dash-body.sidebar-open .sidebar-overlay { opacity: 1; visibility: visible; }
  html body.dash-body .dtop { padding-left: 8px; }
  [dir="rtl"] html body.dash-body aside.sidebar, html[dir="rtl"] body.dash-body aside.sidebar { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--ink-200); transform: translateX(104%); }
  html[dir="rtl"] body.dash-body.sidebar-open aside.sidebar { transform: none; }
}

/* ---- image edit widgets (admin forms) ---- */
.img-edit { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.img-edit .preview { width: 88px; height: 88px; border-radius: 12px; border: 1px dashed var(--ink-300); background: var(--ink-50) center / contain no-repeat; display: flex; align-items: center; justify-content: center; color: var(--ink-400); flex: none; overflow: hidden; }
.img-edit .preview.wide { width: 200px; height: 80px; } .img-edit .preview.round { border-radius: 50%; }
.img-edit .preview img { width: 100%; height: 100%; object-fit: contain; }
.img-edit .controls { flex: 1; min-width: 200px; }
.cat-photo { width: 48px; height: 48px; border-radius: 10px; object-fit: cover; }
.category-banner { height: 140px; border-radius: 12px; background: #15251b center / cover no-repeat; margin-bottom: 20px; }
.logo-on-dark { background: #121a15; padding: 14px 18px; border-radius: 10px; display: inline-flex; }
.table-user .avatar, .table-thumb { flex: none; }

/* ---- phones: keep the dashboard top bar on one line (logo shrinks, extras move into the sidebar) ---- */
@media (max-width: 900px) {
  html body.dash-body .dtop { gap: 6px; }
  html body.dash-body .dtop .brand { min-width: 0; flex: 1 1 auto; overflow: hidden; }
  html body.dash-body .dtop .brand-logo { max-width: 150px; height: 28px; }
  html body.dash-body .dtop-right { flex: none; gap: 2px; }
}
@media (max-width: 640px) {
  html body.dash-body .dtop-area-tag, html body.dash-body .dtop-site { display: none; }
  html body.dash-body .dtop .dtop-brand-text small { display: none; }
}
@media (max-width: 480px) {
  .site-header .brand-logo { max-width: 132px; height: 30px; }
  .nav-actions .btn-primary.btn-sm { display: none; }   /* "Get started" lives in the menu drawer */
}
@media (max-width: 900px) { .drawer-search .search-box select { display: none; } }

/* ==========================================================================
   v8: admin dashboard redesign, clickable stat cards, order confirmation, one-time downloads
   ========================================================================== */
.stat-link { display: block; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; }
.stat-link:hover { transform: translateY(-2px); box-shadow: 0 12px 26px -14px rgba(15,23,42,.35); border-color: var(--brand-300); color: inherit; }
.stat-link:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }

.range-tabs { display: inline-flex; background: var(--ink-100); border-radius: 10px; padding: 3px; }
.range-tabs a { padding: 7px 14px; border-radius: 8px; font-size: .8125rem; font-weight: 600; color: var(--ink-600); }
.range-tabs a.active { background: #fff; color: var(--ink-900); box-shadow: 0 1px 3px rgba(15,23,42,.12); }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { position: relative; display: flex; flex-direction: column; padding: 18px 20px 20px; background: #fff; border: 1px solid var(--ink-200); border-radius: 14px; color: inherit; text-decoration: none; transition: transform .15s, box-shadow .15s, border-color .15s; min-width: 0; }
.kpi:hover { transform: translateY(-2px); box-shadow: 0 14px 28px -16px rgba(15,23,42,.35); border-color: var(--brand-300); color: inherit; }
.kpi:focus-visible { outline: 2px solid var(--brand-500); outline-offset: 2px; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--brand-50); color: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.kpi-icon .icon { width: 19px; height: 19px; }
.kpi-value { font: 800 1.65rem/1.15 var(--font-display); color: var(--ink-900); margin-top: 14px; letter-spacing: -.03em; overflow-wrap: anywhere; }
.kpi-label { font-weight: 600; color: var(--ink-700); font-size: .875rem; margin-top: 2px; }
.kpi-hint { font-size: .78rem; color: var(--ink-500); margin-top: 4px; }
.kpi-go { position: absolute; right: 16px; bottom: 16px; opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; color: var(--brand-600); }
.kpi:hover .kpi-go { opacity: 1; transform: none; }
.kpi.lead { background: var(--gradient-brand); border-color: transparent; }
.kpi.lead .kpi-value { color: #fff; } .kpi.lead .kpi-label { color: #ecf6dd; } .kpi.lead .kpi-hint { color: #d3e8b9; }
.kpi.lead .kpi-icon { background: rgba(255,255,255,.18); color: #fff; } .kpi.lead .kpi-go { color: #fff; }
.kpi.warn { background: #fffbeb; border-color: #fcd34d; } .kpi.warn .kpi-icon { background: #fef3c7; color: #b45309; }
.delta { font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.delta.up { background: #dcfce7; color: #15803d; } .delta.down { background: #fee2e2; color: #b91c1c; }
.kpi.lead .delta { background: rgba(255,255,255,.2); color: #fff; }

.dash-two { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: start; }
.dash-two > .card { margin-bottom: 0; }
.rev-chart { width: 100%; height: auto; display: block; }
.rev-chart .grid { stroke: var(--ink-100); stroke-width: 1; }
.rev-chart .bar { fill: var(--brand-500); transition: opacity .15s; } .rev-chart .bar:hover { opacity: .75; } .rev-chart .bar.zero { fill: var(--ink-200); }
.rev-chart .lbl { font: 11px var(--font-sans); fill: var(--ink-400); }

.attn-list { display: flex; flex-direction: column; padding: 6px 10px 12px; }
.attn-list a { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 10px; color: var(--ink-700); font-weight: 500; font-size: .9rem; }
.attn-list a:hover { background: var(--ink-50); color: var(--ink-900); }
.attn-icon { width: 32px; height: 32px; border-radius: 9px; background: var(--ink-100); color: var(--ink-500); display: inline-flex; align-items: center; justify-content: center; flex: none; } .attn-icon .icon { width: 16px; height: 16px; }
.attn-label { flex: 1; min-width: 0; }
.attn-list b { min-width: 28px; text-align: center; background: var(--ink-100); color: var(--ink-600); border-radius: 99px; padding: 2px 9px; font-size: .8125rem; }
.attn-list a.hot .attn-icon { background: #fef3c7; color: #b45309; } .attn-list a.hot b { background: #f59e0b; color: #fff; }

.rank-list { padding: 4px 10px 12px; display: flex; flex-direction: column; }
.rank-list a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; color: var(--ink-700); }
.rank-list a:hover { background: var(--ink-50); }
.rank { width: 24px; height: 24px; border-radius: 50%; background: var(--brand-50); color: var(--brand-700); font-weight: 800; font-size: .75rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.rank-name { flex: 1; min-width: 0; font-weight: 600; color: var(--ink-900); font-size: .9rem; }
.rank-val { text-align: right; font-weight: 700; color: var(--ink-900); font-size: .9rem; white-space: nowrap; } .rank-val small { display: block; font-weight: 500; color: var(--ink-400); font-size: .72rem; }

.status-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.status-tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--ink-200); border-radius: 99px; background: #fff; color: var(--ink-600); font-weight: 600; font-size: .85rem; }
.status-tabs a:hover { border-color: var(--brand-400); color: var(--ink-900); }
.status-tabs a.active { background: var(--ink-900); border-color: var(--ink-900); color: #fff; }
.status-tabs a.hot:not(.active) { border-color: #fcd34d; background: #fffbeb; color: #b45309; }
.tab-count { font-size: .72rem; background: rgba(15,23,42,.08); padding: 1px 8px; border-radius: 99px; } .status-tabs a.active .tab-count { background: rgba(255,255,255,.2); }
.confirm-banner { border-left: 4px solid #f59e0b; background: #fffbeb; }

.dl-list { display: flex; flex-direction: column; gap: 4px; }
.dl-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--ink-100); } .dl-row:first-child { border-top: 0; }
.currency-strip { display: flex; align-items: center; gap: 10px; background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; border-radius: 10px; padding: 9px 14px; font-size: .8125rem; margin-bottom: 18px; } .currency-strip .icon { flex: none; }
.sidebar-prefs { display: none; }
.dtop-cur select { min-width: 86px; }

@media (max-width: 1100px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dash-two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 900px) {
  html body.dash-body .sidebar-prefs { display: block; margin: 0 0 14px; padding-bottom: 14px; border-bottom: 1px solid var(--ink-100); }
  .sidebar-prefs label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-400); margin-bottom: 6px; }
}
@media (max-width: 640px) {
  .dtop-cur { display: none; }
  .kpi-grid { gap: 10px; } .kpi { padding: 14px 14px 16px; } .kpi-value { font-size: 1.3rem; } .kpi-icon { width: 32px; height: 32px; }
  .range-tabs a { padding: 6px 10px; } .dl-row { flex-wrap: wrap; }
}
[dir="rtl"] .kpi-go { right: auto; left: 16px; } [dir="rtl"] .rank-val { text-align: left; }

.table-user .cell-title, .table-user .cell-sub { display: block; }

/* ==========================================================================
   v9: bigger logo, sales, bundles, author levels & badges, plans, collections, follow, newsletter, search suggestions
   ========================================================================== */
/* ---- bigger logo everywhere (header rows grow a little to fit it) ---- */
:root { --header-h: 116px; }
.nav { height: 72px; }
.brand-logo { height: 48px; max-width: 260px; }
.brand-logo.on-dark { height: 54px; padding: 6px 12px; }
.brand-mark { width: 40px; height: 40px; font-size: 1.1rem; }
.dtop .brand-logo { height: 42px; max-width: 220px; }
body.dash-body { --header-h: 68px; }
.dtop { height: 68px; }
.drawer .brand-logo, .sidebar-head .brand-logo { height: 42px; max-width: 200px; }
@media (max-width: 900px) {
  :root { --header-h: 72px; }
  html body.dash-body .dtop .brand-logo { max-width: 170px; height: 36px; }
  html body.dash-body .sidebar-head { height: 68px; }
}
@media (max-width: 480px) { .site-header .brand-logo { max-width: 150px; height: 40px; } }

/* ---- sales ---- */
.sale-strip { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; background: var(--sc, #e11d48); color: #fff; padding: 9px 16px; font-size: .875rem; text-align: center; text-decoration: none; }
.sale-strip:hover { color: #fff; filter: brightness(1.06); }
.sale-strip .sale-off { background: rgba(255,255,255,.22); border-radius: 99px; padding: 2px 10px; font-weight: 800; }
.sale-strip .sale-timer b, .sale-note b { font-variant-numeric: tabular-nums; }
.sale-strip .sale-go { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.sale-note { margin-top: 12px; padding: 9px 12px; border-radius: 8px; font-size: .8125rem; color: #fff; background: var(--sc, #e11d48); }
.sale-hero { background: var(--sc, #e11d48); background: linear-gradient(120deg, var(--sc, #e11d48), color-mix(in srgb, var(--sc, #e11d48) 55%, #0f172a)); color: #fff; padding: 36px 0; margin-bottom: 8px; }
.sale-hero-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.sale-hero h1, .sale-hero h2 { color: #fff; margin: 6px 0; } .sale-hero p { margin: 0; color: rgba(255,255,255,.88); max-width: 56ch; }
.sale-tag { display: inline-block; background: rgba(255,255,255,.2); border-radius: 99px; padding: 3px 12px; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.sale-hero-side { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.sale-count { display: flex; gap: 8px; }
.sale-count .cd-box { background: rgba(255,255,255,.16); border-radius: 10px; padding: 8px 12px; min-width: 62px; text-align: center; font-variant-numeric: tabular-nums; }
.sale-count .cd-box b { display: block; font: 800 1.5rem/1.1 var(--font-display); } .sale-count .cd-box small { font-size: .65rem; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.sale-btn { background: #fff; color: var(--ink-900); } .sale-btn:hover { background: #f1f5f9; color: var(--ink-900); }
.sale-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; border-left: 6px solid var(--sc, #e11d48); color: inherit; text-decoration: none; }
.sale-card:hover { color: inherit; box-shadow: var(--shadow-md, 0 10px 24px -14px rgba(15,23,42,.4)); }
.sale-card h2 { margin: 6px 0 4px; } .sale-card p { margin: 0; color: var(--ink-500); }
.sale-card-side { text-align: center; } .sale-pct { font: 800 2.6rem/1 var(--font-display); color: var(--sc, #e11d48); } .sale-card-side small { display: block; color: var(--ink-500); margin-top: 4px; }
.sale-card .sale-tag { background: var(--sc, #e11d48); color: #fff; }

/* ---- bundles ---- */
.bundle-card { display: block; overflow: hidden; color: inherit; text-decoration: none; }
.bundle-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--ink-100); }
.bundle-thumb { aspect-ratio: 4/3; overflow: hidden; display: block; } .bundle-thumb img, .bundle-thumb > * { width: 100%; height: 100%; object-fit: cover; }
.bundle-body { padding: 16px 18px 18px; } .bundle-body h3 { margin: 8px 0 4px; font-size: 1.05rem; } .bundle-body p { margin: 0 0 10px; }
.bundle-price { font-size: 1.1rem; color: var(--ink-900); } .bundle-price s { color: var(--ink-400); font-size: .9rem; margin-left: 6px; }
.bundle-teaser { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; border: 1px dashed var(--brand-300); background: var(--brand-50); }
.bundle-teaser:hover { color: inherit; border-style: solid; }
.bundle-page .buy-box { position: sticky; top: calc(var(--header-h) + 20px); }
.bundle-line { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-top: 1px solid var(--ink-100); color: inherit; text-decoration: none; } .bundle-line:first-child { border-top: 0; } .bundle-line:hover { background: var(--ink-50); color: inherit; }
.bundle-line-thumb { width: 84px; flex: none; aspect-ratio: 590/300; border-radius: 6px; overflow: hidden; background: var(--ink-100); }
.pick-list { max-height: 300px; overflow-y: auto; border: 1px solid var(--ink-200); border-radius: 10px; background: #fff; }
.pick-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin: 0; border-bottom: 1px solid var(--ink-100); } .pick-row:last-child { border-bottom: 0; } .pick-row:hover { background: var(--ink-50); }
.field-error { color: #b91c1c; font-size: .8125rem; margin-top: 4px; }

/* ---- author levels, badges, plans ---- */
.author-badges { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.author-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 8px; border-radius: 99px; font-size: .72rem; font-weight: 700; color: var(--bc, #64748b); background: color-mix(in srgb, var(--bc, #64748b) 12%, #fff); border: 1px solid color-mix(in srgb, var(--bc, #64748b) 35%, #fff); }
.author-badge .icon { width: 13px; height: 13px; }
.lvl-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-left: 6px; vertical-align: 1px; flex: none; }
.level-strip { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin: 4px 0 24px; background: #fff; border: 1px solid var(--ink-200); border-left: 5px solid var(--bc, #64748b); border-radius: 12px; color: inherit; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.level-strip:hover { color: inherit; transform: translateY(-1px); box-shadow: 0 10px 24px -16px rgba(15,23,42,.4); }
.level-medal { width: 42px; height: 42px; border-radius: 50%; background: color-mix(in srgb, var(--bc, #64748b) 14%, #fff); color: var(--bc, #64748b); display: inline-flex; align-items: center; justify-content: center; flex: none; } .level-medal .icon { width: 22px; height: 22px; } .level-medal.lg { width: 64px; height: 64px; } .level-medal.lg .icon { width: 32px; height: 32px; }
.level-text { flex: 1; min-width: 0; display: flex; flex-direction: column; } .level-text small { color: var(--ink-500); } .level-go { color: var(--ink-400); }
.level-hero { background: #fff; border: 1px solid var(--ink-200); border-top: 5px solid var(--bc, #64748b); border-radius: 14px; padding: 24px; margin-bottom: 24px; }
.level-hero-main { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; } .level-name { font: 800 1.5rem/1.2 var(--font-display); color: var(--ink-900); } .level-sub { color: var(--ink-500); margin-top: 2px; }
.level-progress { margin-top: 20px; }
.progress { height: 10px; border-radius: 99px; background: var(--ink-100); overflow: hidden; margin-top: 8px; } .progress span { display: block; height: 100%; background: var(--bc, var(--brand-500)); border-radius: 99px; transition: width .6s ease; } .progress.mini { height: 5px; width: 90px; margin-top: 4px; }
.row-current { background: #f6fbf0; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.plan-card { position: relative; background: #fff; border: 1px solid var(--ink-200); border-radius: 14px; padding: 24px 22px; display: flex; flex-direction: column; gap: 6px; }
.plan-card.featured { border-color: var(--brand-500); box-shadow: 0 16px 34px -22px rgba(63,127,31,.7); } .plan-card.current { background: #f6fbf0; }
.plan-flag { position: absolute; top: -11px; left: 20px; background: var(--brand-600); color: #fff; font-size: .7rem; font-weight: 800; padding: 3px 12px; border-radius: 99px; letter-spacing: .04em; }
.plan-card h3 { margin: 0; } .plan-price { font: 800 2rem/1.1 var(--font-display); color: var(--ink-900); } .plan-price small { font: 500 .8rem var(--font-sans); color: var(--ink-500); margin-left: 6px; }
.plan-feats { list-style: none; padding: 0; margin: 10px 0 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; font-size: .9rem; } .plan-feats li { display: flex; gap: 8px; align-items: flex-start; } .plan-feats .icon { width: 16px; height: 16px; color: var(--brand-600); flex: none; margin-top: 3px; }

/* ---- follow / save / rails / collections ---- */
.follow-form { display: inline; } .btn.following { color: var(--ink-600); }
.save-menu { position: relative; flex: 1; } .save-menu > summary { list-style: none; cursor: pointer; width: 100%; justify-content: center; } .save-menu > summary::-webkit-details-marker { display: none; }
.save-pop { position: absolute; z-index: 30; right: 0; left: 0; margin-top: 8px; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; box-shadow: 0 18px 40px -18px rgba(15,23,42,.45); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.rail-section { margin-top: 64px; } .link-all { font-weight: 600; font-size: .9rem; }
.collection-item { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .collection-item .product-card { width: 100%; }

/* ---- newsletter ---- */
.footer-news { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: 26px 0; border-top: 1px solid rgba(255,255,255,.1); }
.footer-news h4 { margin: 0 0 4px; color: #fff; } .footer-news p { margin: 0; font-size: .875rem; }
.news-form { display: flex; gap: 8px; flex: 1; min-width: 260px; max-width: 460px; position: relative; }
.news-form input[type="email"] { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff; font: inherit; } .news-form input::placeholder { color: rgba(255,255,255,.55); }
.news-form button { padding: 11px 20px; border: 0; border-radius: 8px; background: var(--brand-500); color: #fff; font-weight: 700; cursor: pointer; } .news-form button:hover { background: var(--brand-600); }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---- search suggestions (floats over the page because the search box clips its children) ---- */
.suggest-box { position: fixed; z-index: 120; background: #fff; border: 1px solid var(--ink-200); border-radius: 12px; box-shadow: 0 24px 50px -20px rgba(15,23,42,.5); overflow: hidden; max-height: min(70vh, 480px); overflow-y: auto; text-align: left; color: var(--ink-800); }
.suggest-group { padding: 10px 16px 4px; font: 700 .68rem var(--font-sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-400); }
.suggest-item { display: flex; align-items: center; gap: 12px; padding: 9px 16px; color: inherit; text-decoration: none; cursor: pointer; }
.suggest-item:hover, .suggest-item.active { background: var(--brand-50); color: inherit; }
.suggest-thumb { width: 52px; aspect-ratio: 590/300; border-radius: 5px; background: var(--ink-100) center / cover no-repeat; flex: none; }
.suggest-main { min-width: 0; flex: 1; } .suggest-main b { display: block; font-weight: 600; font-size: .9rem; color: var(--ink-900); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .suggest-main small { color: var(--ink-500); font-size: .78rem; }
.suggest-price { font-weight: 700; font-size: .85rem; color: var(--ink-900); white-space: nowrap; }
.suggest-all { display: block; padding: 11px 16px; border-top: 1px solid var(--ink-100); font-weight: 600; font-size: .875rem; background: var(--ink-50); color: var(--brand-700); text-decoration: none; }
.suggest-empty { padding: 16px; color: var(--ink-500); font-size: .9rem; }

@media (max-width: 640px) {
  .sale-strip { font-size: .8rem; gap: 8px; padding: 8px 12px; }
  .sale-hero { padding: 26px 0; } .sale-count .cd-box { min-width: 52px; padding: 6px 8px; } .sale-count .cd-box b { font-size: 1.2rem; }
  .footer-news { flex-direction: column; align-items: stretch; } .news-form { max-width: none; }
  .level-hero { padding: 18px; } .rail-section { margin-top: 44px; }
}
[dir="rtl"] .sale-card { border-left: 0; border-right: 6px solid var(--sc, #e11d48); } [dir="rtl"] .level-strip { border-left: 1px solid var(--ink-200); border-right: 5px solid var(--bc, #64748b); }
[dir="rtl"] .bundle-price s, [dir="rtl"] .lvl-dot { margin-left: 0; margin-right: 6px; }

/* phones: the language/currency pickers live in the slide-in menu, and the logo gets a size that always fits */
@media (max-width: 640px) { .site-header .nav-actions .cur-switch { display: none; } }
@media (max-width: 480px) { .site-header .brand-logo { max-width: 132px; height: 36px; } }

/* ---- staff role editor ---- */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.perm-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--ink-200); border-radius: 10px; cursor: pointer; background: #fff; }
.perm-item:hover { border-color: var(--brand-400); background: var(--brand-50); }
.perm-item input { margin-top: 4px; flex: none; }
.perm-item span { display: flex; flex-direction: column; gap: 2px; } .perm-item small { color: var(--ink-500); font-size: .78rem; line-height: 1.4; }

/* ---- reports ---- */
.report-tabs { overflow-x: auto; flex-wrap: nowrap; white-space: nowrap; -webkit-overflow-scrolling: touch; }
.report-filter { flex-wrap: wrap; align-items: center; } .report-filter .input[type=date] { max-width: 168px; }
.report-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.report-totals .stat { padding: 14px 16px; } .report-totals .stat-value { font-size: 1.25rem; }
.rep-chart { width: 100%; height: 220px; display: block; } .rep-chart .bar { fill: var(--brand-500); } .rep-chart .bar:hover { fill: var(--brand-700); } .rep-chart .lbl { font: 10px var(--font-sans); fill: var(--ink-500); }
.hbars { display: flex; flex-direction: column; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 220px) 1fr auto; gap: 12px; align-items: center; font-size: .875rem; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-700); } .hbar-track { height: 12px; background: var(--ink-100); border-radius: 99px; overflow: hidden; }
.hbar-track span { display: block; height: 100%; background: var(--brand-500); border-radius: 99px; } .hbar-value { font-weight: 700; color: var(--ink-900); min-width: 80px; text-align: right; }
.report-table tfoot th { background: var(--ink-50); border-top: 2px solid var(--ink-200); color: var(--ink-900); }
@media (max-width: 640px) { .hbar { grid-template-columns: 1fr auto; } .hbar-track { grid-column: 1 / -1; grid-row: 2; } }

/* ---- developer docs ---- */
.api-intro ul.plain { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 10px; } .api-intro code, .api-row code { background: var(--ink-100); border-radius: 5px; padding: 1px 6px; font-size: .85em; }
.api-row { padding: 16px 20px; border-top: 1px solid var(--ink-100); } .api-row:first-child { border-top: 0; } .api-row p { margin: 6px 0 0; color: var(--ink-600); font-size: .9rem; }
.api-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .api-path { font-weight: 700; color: var(--ink-900); word-break: break-all; } .api-params { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.api-method { display: inline-block; min-width: 62px; text-align: center; padding: 3px 8px; border-radius: 6px; font: 800 .72rem var(--font-sans); color: #fff; background: #64748b; }
.api-method.m-get { background: #2563eb; } .api-method.m-post { background: #16a34a; } .api-method.m-put { background: #d97706; } .api-method.m-delete { background: #dc2626; }
.report-table th, .report-table td { white-space: nowrap; }

.role-table td:first-child { min-width: 190px; } .role-table .actions { white-space: nowrap; }

/* Top authors: seamless auto-scrolling loop */
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); padding: 4px 0; }
.marquee-track { display: flex; width: max-content; animation: marquee-scroll 45s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee-set { display: flex; gap: 18px; padding-right: 18px; flex-shrink: 0; }
.marquee .seller-card { width: 210px; flex-shrink: 0; }
@keyframes marquee-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
[dir="rtl"] .marquee-track { animation-direction: reverse; }
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .marquee-track { animation: none; }
  .marquee-set[aria-hidden="true"] { display: none; }
}
