/* ================================================================
   Fivo Demo Site — Styles
   ================================================================ */

/* ── CSS Variables (Light / Dark) ────────────────────────────── */
:root {
  /* Background */
  --bg-page: #f8f9fc;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f3f4f6;
  --bg-header: rgba(255, 255, 255, 0.95);

  /* Borders */
  --border: #d1d5db;
  --border-light: #e5e7eb;
  --border-subtle: rgba(0, 0, 0, 0.08);

  /* Text */
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --text-body: #1f2937;

  /* Accent */
  --accent: #667eea;
  --accent-bg: #f0f0ff;
  --accent-bg-subtle: rgba(102, 126, 234, 0.08);

  /* Components */
  --cart-total-border: #111827;
  /* Scrollbar */
  --scrollbar-thumb: rgba(0, 0, 0, 0.12);
  --scrollbar-thumb-hover: rgba(0, 0, 0, 0.25);

  /* Code (always dark) */
  --code-bg: #1a1b26;
  --code-border: #2d2f3d;
  --code-text: #a9b1d6;
  --code-filename: #7c7f93;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-btn: 0 2px 8px rgba(102, 126, 234, 0.25);
  --shadow-btn-hover: 0 4px 14px rgba(102, 126, 234, 0.35);
}

[data-theme="dark"] {
  /* Background */
  --bg-page: #09090b;
  --bg-surface: #18181b;
  --bg-surface-hover: #27272a;
  --bg-header: rgba(9, 9, 11, 0.95);

  /* Borders */
  --border: #27272a;
  --border-light: #27272a;
  --border-subtle: rgba(255, 255, 255, 0.06);

  /* Text */
  --text-primary: #f4f4f5;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --text-body: #d4d4d8;

  /* Accent */
  --accent: #818cf8;
  --accent-bg: rgba(129, 140, 248, 0.1);
  --accent-bg-subtle: rgba(129, 140, 248, 0.06);

  /* Components */
  --cart-total-border: #f4f4f5;
  /* Scrollbar */
  --scrollbar-thumb: rgba(255, 255, 255, 0.12);
  --scrollbar-thumb-hover: rgba(255, 255, 255, 0.25);

  /* Code (stays same) */
  --code-bg: #1a1b26;
  --code-border: #2d2f3d;
  --code-text: #a9b1d6;
  --code-filename: #7c7f93;

  /* Shadows */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-btn: 0 2px 8px rgba(129, 140, 248, 0.2);
  --shadow-btn-hover: 0 4px 14px rgba(129, 140, 248, 0.3);
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-body);
  background:
    radial-gradient(ellipse 130% 120% at 65% 50%, rgba(195,205,245,0.5) 0%, transparent 55%),
    radial-gradient(ellipse 100% 100% at 85% 30%, rgba(180,195,240,0.35) 0%, transparent 50%),
    radial-gradient(ellipse 80% 80% at 30% 70%, rgba(210,215,245,0.25) 0%, transparent 50%),
    var(--bg-page);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s, color 0.3s;
  overflow-x: hidden;
  max-width: 100vw;
}

[data-theme="dark"] body {
  background: var(--bg-page);
  background-attachment: unset;
}

/* ── Subtle scrollbar ─────────────────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) transparent;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }


/* ── Header ───────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg-header);
  border-bottom: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-card);
  transform: translateZ(0);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}

.header-center {
  display: flex;
  justify-content: center;
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.logo:hover {
  opacity: 0.8;
}

.logo-img {
  height: 32px;
  width: auto;
}

/* ── Nav Tabs ────────────────────────────────────────────────── */
.nav-tabs {
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

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

.nav-tabs .tab-btn {
  padding: 8px 12px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.nav-tabs .tab-btn:hover {
  color: var(--text-primary);
}

.nav-tabs .tab-btn.active {
  color: var(--accent);
  font-weight: 600;
}

.nav-tabs .tab-link {
  text-decoration: none;
  opacity: 0.7;
}

.nav-tabs .tab-link:hover {
  opacity: 1;
}

/* ── Environment Dropdown ────────────────────────────────────── */
.env-dropdown {
  position: relative;
}

.env-dropdown-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.env-dropdown-btn:hover {
  border-color: var(--accent);
}

.env-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px;
  min-width: 120px;
  box-shadow: var(--shadow-card);
  z-index: 50;
}

.env-dropdown-menu.open {
  display: flex;
  flex-direction: column;
}

.env-dropdown-item {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.env-dropdown-item:hover {
  color: var(--text-primary);
  background: var(--accent-bg-subtle);
}

.env-dropdown-item.active {
  color: var(--accent);
  font-weight: 600;
  cursor: default;
}

.header-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.btn-theme {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-card);
}

.btn-theme:hover {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.btn-theme svg {
  width: 18px;
  height: 18px;
}

/* Show/hide sun/moon icons */
.icon-sun { display: none; }
.icon-moon { display: block; }

[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: var(--shadow-btn), var(--shadow-card);
  white-space: nowrap;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 28px 24px 12px;
  max-width: 700px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.hero h1, .hero p {
  transition: opacity 0.2s;
}

.hero p {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}


/* ── Tab Content ──────────────────────────────────────────────── */
.tab-content {
  display: none;
  animation: fadeSlideIn 0.35s ease;
  overflow-x: hidden;
}

.tab-content.active {
  display: block;
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  overflow-x: hidden;
}

#quickstart .content-wrapper {
  padding: 16px 24px 24px;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.content-grid > * {
  min-width: 0;
}

/* ── Demo Area (left column) ──────────────────────────────────── */
.demo-area {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s, border-color 0.3s;
}

.demo-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.demo-label::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ── Code Area (right column) ─────────────────────────────────── */
.code-area {
  position: relative;
  box-shadow: var(--shadow-card);
  border-radius: 12px;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: var(--code-bg);
  border-radius: 12px 12px 0 0;
  border: 1px solid var(--code-border);
  border-bottom: none;
}

.code-filename {
  font-size: 13px;
  font-weight: 500;
  color: var(--code-filename);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.code-dots {
  display: flex;
  gap: 6px;
}

.code-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3b3d4f;
}

.btn-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: #7c7f93;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-copy:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #a5a8c0;
}

.btn-copy.copied {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.2);
  background: rgba(16, 185, 129, 0.08);
}

.btn-copy svg {
  width: 14px;
  height: 14px;
}

.code-block {
  background: var(--code-bg);
  border: 1px solid var(--code-border);
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 20px;
  overflow-x: auto;
}

.code-block pre {
  margin: 0;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--code-text);
  white-space: pre;
  tab-size: 2;
}

/* Syntax highlighting (manual, minimal) */
.hl-tag { color: #7aa2f7; }
.hl-attr { color: #bb9af7; }
.hl-string { color: #9ece6a; }
.hl-comment { color: #565f89; font-style: italic; }
.hl-keyword { color: #f7768e; }
.hl-url { color: #73daca; }


/* ── Quick Start Footer (steps below grid) ───────────────────── */
.qs-footer {
  max-width: 560px;
  margin: 20px auto 0;
  text-align: center;
}

/* ── Browser Frame (Store Preview) ───────────────────────────── */
.browser-frame {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: var(--bg-surface);
  transition: background-color 0.3s, border-color 0.3s;
}

.browser-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: var(--bg-surface-hover);
  border-bottom: 1px solid var(--border-light);
}

.browser-dots {
  display: flex;
  gap: 6px;
}

.browser-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border);
}

.browser-dots span:first-child { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:last-child { background: #22c55e; }

.browser-url {
  flex: 1;
  padding: 5px 12px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 6px;
  font-family: 'Inter', system-ui, sans-serif;
}

.browser-body {
  padding: 16px;
}

/* ── Store Preview ───────────────────────────────────────────── */
.store-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}

.store-logo {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.store-links {
  font-size: 12px;
  color: var(--text-muted);
}

.store-product {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.store-product-img {
  width: 120px;
  height: 120px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(102,126,234,0.08), rgba(118,75,162,0.08));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.store-product-info {
  flex: 1;
  min-width: 0;
}

.store-category {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
  margin-bottom: 4px;
}

.store-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.store-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.store-stock {
  font-size: 12px;
  font-weight: 600;
  color: #16a34a;
  margin-bottom: 8px;
}

.store-colors {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.store-color {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: default;
  box-sizing: border-box;
}

.store-color.active {
  border-color: var(--text-primary);
}

.store-price-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.store-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.store-buy-btn {
  width: 100%;
  padding: 10px;
  background: var(--text-primary);
  color: var(--bg-page);
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: default;
  font-family: inherit;
}

/* ── Code highlight for new lines ────────────────────────────── */
.hl-new {
  display: block;
  background: rgba(102, 126, 234, 0.1);
  margin: 0 -20px;
  padding: 0 20px;
  border-left: 2px solid var(--accent);
}

/* ── Steps (Quick Start) ──────────────────────────────────────── */
.steps-indicator {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 12px;
}

.step-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-surface);
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  flex-shrink: 0;
}

.step-num.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.step-num.completed {
  border-color: var(--accent);
  background: var(--accent-bg);
  color: var(--accent);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  transition: background 0.3s;
}

.step-line.active {
  background: var(--accent);
}

.step-content {
  display: none;
  animation: fadeSlideIn 0.3s ease;
}

.step-content.active {
  display: block;
}

.step-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.step-content code {
  font-size: 13px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  background: var(--accent-bg);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.step-prev, .step-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.step-prev {
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.step-prev:hover:not(:disabled) {
  color: var(--text-primary);
  border-color: var(--text-muted);
}

.step-prev:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.step-next {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.step-next:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.step-next:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}


.step-code {
  display: none;
}

.step-code.active {
  display: block;
}

/* ── Integration Guide ───────────────────────────────────────── */
.guide {
  margin-top: 64px;
  padding: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
}

.guide-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 40px;
}

.guide-section {
  margin-bottom: 36px;
}

.guide-section h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.guide-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.guide-section p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.guide-section p + p {
  margin-top: 10px;
}

.guide-section a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.guide-section a:hover {
  text-decoration: underline;
}

.guide-flow {
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.guide-flow li {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.guide-flow li strong {
  color: var(--text-primary);
}

.guide-flow a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.guide-flow a:hover {
  text-decoration: underline;
}

.guide-cta {
  margin: 32px auto 0;
  max-width: 900px;
  padding: 24px;
  background: var(--accent-bg-subtle);
  border: 1px solid var(--accent);
  border-radius: 12px;
  text-align: center;
}

.guide-cta h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.guide-cta p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
}

.guide-cta-link {
  display: inline-block;
  padding: 10px 20px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.guide-cta-link:hover {
  opacity: 0.9;
}

/* ── Product Hero (Product tab) ──────────────────────────────── */
.product-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  max-width: 900px;
  margin: 0 auto;
}

.product-hero-image {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.product-hero-image img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.product-hero-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #fff;
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 16px;
}

.product-hero-title {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.2;
}

.product-hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}

.product-hero-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.product-hero-feature {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.product-hero-feature svg {
  width: 16px;
  height: 16px;
  color: #22c55e;
  flex-shrink: 0;
}

.product-hero-price {
  font-size: 36px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.product-hero-currency {
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.product-hero-fee {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* ── Multiple Products Store ─────────────────────────────────── */
.store-banner {
  text-align: center;
  margin-bottom: 36px;
}

.store-banner h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.store-banner p {
  font-size: 14px;
  color: var(--text-secondary);
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.store-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.store-card-image {
  width: 100%;
  height: 160px;
  overflow: hidden;
}

.store-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.store-card:hover .store-card-image img {
  transform: scale(1.05);
}

.store-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.store-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.store-card-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-bottom: 12px;
}

.store-card-footer {
  display: flex;
  flex-direction: column;
  margin-top: auto;
  gap: 12px;
}

.store-card-price {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  white-space: nowrap;
}

.store-card-currency {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg-subtle);
  padding: 2px 8px;
  border-radius: 6px;
  margin-left: 4px;
}

.store-card-footer fivo-button {
  flex-shrink: 0;
}

.store-note {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 20px;
  background: var(--accent-bg-subtle);
  border-radius: 12px;
  margin-bottom: 40px;
  line-height: 1.6;
}

.store-note strong {
  color: var(--text-primary);
}

/* ── Cart: Store + Sidebar Layout ─────────────────────────────── */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  align-items: start;
}

/* Product grid (left side) */
.cart-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.cart-product {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cart-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.cart-product-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
}

.cart-product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.cart-product:hover .cart-product-image img {
  transform: scale(1.05);
}

.cart-product-body {
  padding: 12px;
}

.cart-product-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.cart-product-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
}

.cart-add-btn {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
}

.cart-add-btn:hover {
  background: var(--accent);
  color: #fff;
}

.cart-add-btn.added {
  background: #10b981;
  border-color: #10b981;
  color: #fff;
  pointer-events: none;
}

/* Sidebar (right side) */
.cart-sidebar {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 80px;
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cart-sidebar-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.cart-sidebar-count {
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
}

.cart-sidebar-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  padding: 32px 0;
  line-height: 1.6;
}

/* Sidebar cart items */
.cart-sidebar .cart-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 16px;
}

.cart-sidebar .cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
}

.cart-sidebar .cart-item-image {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}

.cart-sidebar .cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-sidebar .cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-sidebar .cart-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
}

.cart-sidebar .cart-item-variant {
  font-size: 11px;
  color: var(--text-muted);
}

.cart-sidebar .cart-item-qty {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.cart-sidebar .qty-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-surface);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-family: inherit;
  transition: border-color 0.2s;
}

.cart-sidebar .qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-remove-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.cart-remove-btn:hover {
  color: #ef4444;
}

.cart-remove-btn svg {
  width: 14px;
  height: 14px;
}

.cart-sidebar .cart-divider {
  height: 1px;
  background: var(--border-light);
  margin: 12px 0;
}

.cart-sidebar .cart-totals {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.cart-sidebar .cart-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
}

.cart-sidebar .cart-total-row.total {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-primary);
  padding-top: 8px;
  border-top: 2px solid var(--cart-total-border);
}

/* ── Campaign cards (Donation tab) ────────────────────────────── */
.campaign-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.campaign-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.campaign-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  position: relative;
}

.campaign-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.campaign-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  letter-spacing: 0.3px;
}

.campaign-card-body {
  padding: 20px 24px 24px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.campaign-card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.campaign-card-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex: 1;
}

/* Fivo button inside campaign cards */
.campaign-card fivo-button {
  display: block;
  margin-top: auto;
}

/* ── Donation code comparison ─────────────────────────────────── */
.donation-compare {
  max-width: 700px;
  margin: 36px auto 0;
  text-align: center;
}

.donation-compare-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.donation-compare-subtitle {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.donation-compare-subtitle code {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--accent);
}

.donation-compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.donation-compare-block {
  background: var(--code-bg, #1e1e2e);
  border-radius: 10px;
  overflow: hidden;
}

.donation-compare-label {
  display: block;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.donation-compare-block pre {
  padding: 16px;
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  text-align: left;
  overflow-x: auto;
}
.donation-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 24px;
}

.donation-disclaimer a {
  color: var(--accent);
  text-decoration: none;
}

/* ── Donation benefits ───────────────────────────────────────── */
.donation-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  max-width: 700px;
  margin: 32px auto 0;
}

.donation-benefit {
  text-align: center;
}

.donation-benefit-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.08), rgba(118, 75, 162, 0.08));
  border-radius: 10px;
  color: var(--accent);
}

.donation-benefit-icon svg {
  width: 20px;
  height: 20px;
}

.donation-benefit h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.donation-benefit p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── Invoicing specific ───────────────────────────────────────── */
/* ── E-commerce: Order Summary Demo ─────────────────────────── */
.order-summary {
  max-width: 420px;
  margin: 0 auto;
  padding: 8px 0;
}

.order-summary-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 20px;
}

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.order-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.order-item-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.order-item-detail {
  font-size: 12px;
  color: var(--text-muted);
}

.order-item-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.order-divider {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 4px 0;
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.order-total-row.final {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  padding-top: 12px;
}

.order-pay-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.order-pay-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ── E-commerce: How It Works Steps ─────────────────────────── */
.api-steps {
  display: flex;
  gap: 24px;
  max-width: 900px;
  margin: 0 auto;
}

.api-step {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.api-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.api-step h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.api-step p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ── E-commerce: Code Language Tabs ─────────────────────────── */
.code-lang-tabs {
  display: flex;
  gap: 2px;
}

.code-lang-tab {
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: #7c7f93;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s;
}

.code-lang-tab:hover {
  color: #a5a8c0;
  background: rgba(255, 255, 255, 0.06);
}

.code-lang-tab.active {
  color: #e2e4f0;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.08);
}

.code-block pre {
  display: none;
}

.code-block pre.active {
  display: block;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px;
  text-align: center;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-brand a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent);
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 24px;
  }

  .hero p {
    font-size: 16px;
  }

  /* Header: stack logo left, env right, nav below */
  .header-inner {
    display: flex;
    flex-wrap: wrap;
    height: auto;
    padding: 8px 12px;
    gap: 0;
  }

  .header-left {
    flex: 0 0 auto;
  }

  .header-center {
    order: 3;
    flex: 0 0 100%;
    justify-content: flex-start;
    padding-top: 6px;
    border-top: 1px solid var(--border-subtle);
    margin-top: 6px;
  }

  .header-right {
    margin-left: auto;
  }

  .nav-tabs {
    width: 100%;
    gap: 0;
    padding-bottom: 4px;
  }

  .nav-tabs .tab-btn {
    padding: 6px 8px;
    font-size: 12px;
    flex-shrink: 0;
  }

  /* Content */
  .content-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .content-wrapper {
    padding: 24px 16px 48px;
  }

  #quickstart .content-wrapper {
    padding: 12px 16px 24px;
  }

  /* Demo area */
  .demo-area {
    padding: 20px;
  }

  /* Code blocks: prevent overflow */
  .code-block {
    max-width: 100%;
  }

  .code-block pre {
    font-size: 11px;
  }

  /* Step content: prevent text overflow */
  .step-content {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  .step-content h3 {
    font-size: 17px;
  }

  .step-content p {
    font-size: 14px;
  }

  .step-content code {
    font-size: 11px;
    word-break: break-all;
  }

  /* Step navigation buttons */
  .step-prev, .step-next {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Buttons */
  .btn-primary svg {
    display: none;
  }

  .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  /* Store / Product grids */
  .store-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-sidebar {
    position: static;
  }

  .cart-products {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-hero {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .product-hero-title {
    font-size: 26px;
  }

  .api-steps {
    flex-direction: column;
    gap: 16px;
  }

  .campaign-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .donation-benefits {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .donation-compare-grid {
    grid-template-columns: 1fr;
  }

  .cart-item-qty {
    display: none;
  }

  /* Browser frame */
  .browser-frame {
    max-width: 100% !important;
  }

  /* Guide sections */
  .guide {
    padding: 24px 16px;
  }

  .guide-title {
    font-size: 20px;
    margin-bottom: 24px;
  }

  .guide-cta {
    padding: 16px;
  }

  /* Order summary */
  .order-summary {
    max-width: 100%;
  }

  /* Store product layout */
  .store-product {
    flex-direction: column;
    gap: 16px;
  }

  .store-product-img {
    width: 100%;
    height: 160px;
  }

  /* Code language tabs (e-commerce) */
  .code-lang-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .code-lang-tabs::-webkit-scrollbar {
    display: none;
  }

  .code-lang-tab {
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 24px 12px 16px;
  }

  .hero h1 {
    font-size: 20px;
  }

  .hero p {
    font-size: 14px;
  }

  .content-wrapper {
    padding: 16px 12px 48px;
  }

  #quickstart .content-wrapper {
    padding: 8px 12px 20px;
  }

  .demo-area {
    padding: 16px;
    border-radius: 12px;
  }

  /* Code blocks */
  .code-area {
    border-radius: 10px;
  }

  .code-block {
    padding: 14px;
  }

  .code-block pre {
    font-size: 10px;
    line-height: 1.5;
  }

  /* Steps */
  .step-num {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .step-content h3 {
    font-size: 16px;
  }

  .step-content p {
    font-size: 13px;
  }

  /* Grids */
  .store-grid {
    grid-template-columns: 1fr;
  }

  .cart-products {
    grid-template-columns: 1fr;
  }

  .store-card {
    padding: 12px;
  }

  /* Header */
  .header-inner {
    padding: 6px 10px;
  }

  .nav-tabs .tab-btn {
    padding: 5px 6px;
    font-size: 11px;
  }

  .logo-img {
    height: 22px;
  }
}
