/* ---- Base Variables (Atom-inspired palette for all marketplaces) ---- */
:root {
  --accent: #ff6955;
  --accent-hover: #e97543;
  --bg: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --card-bg: #f9fafb;
  --border: #e5e7eb;
  --hero-bg: #19184a;
  --hero-text: #ffffff;
  --hero-muted: #b0b0b0;
  --teal: #637cf7;
  --verified: #00b67a;
  --highlight: #637cf7;
  --text-secondary: #374151;
  --text-tertiary: #4b5563;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial,
    sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Hero Section ---- */
.hero-section {
  background: var(--hero-bg);
  padding: 1.25rem 0 2rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.hero-label {
  font-size: 0.9375rem;
  color: var(--hero-muted);
  margin-bottom: 0.25rem;
}

.hero-section h1 {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0.25rem;
  word-break: break-word;
  color: var(--hero-text);
}

.hero-sub {
  font-size: 1.25rem;
  color: var(--hero-muted);
  font-weight: 500;
}

/* ---- Main Grid ---- */
.main-grid {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 1.5rem;
  margin-top: -3rem;
}

/* ---- Purchase Card ---- */
.purchase-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--verified);
}

.verified-badge::before {
  content: "\2713";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  background: var(--verified);
  color: #fff;
  border-radius: 50%;
  font-size: 0.625rem;
}

/* Card pricing */
.card-pricing {
  margin-bottom: 1.25rem;
}

.card-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  margin-bottom: 0.5rem;
}

.card-price-row:first-child {
  background: rgba(255, 105, 85, 0.04);
  border-color: rgba(255, 105, 85, 0.2);
}

.card-price-label {
  font-size: 0.9375rem;
  font-weight: 600;
}

.card-price-value {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-price-row:last-child .card-price-value {
  font-size: 1.125rem;
  font-weight: 700;
}

/* CTA button */
.cta-btn {
  display: block;
  width: 100%;
  padding: 1rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  text-decoration: none;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(255, 105, 85, 0.3);
}

.cta-btn:hover {
  background: var(--accent-hover);
}

.cta-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Card checkmarks */
.card-checkmarks {
  list-style: none;
  margin-bottom: 1rem;
}

.card-checkmarks li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  padding: 0.25rem 0;
}

.card-checkmarks li::before {
  content: "\2713";
  color: var(--verified);
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* Payment methods */
.card-payments {
  font-size: 0.75rem;
  color: var(--muted);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

/* Offer section heading */
.card-offer-heading {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Card form */
.card-form .form-group {
  margin-bottom: 0.625rem;
}

.card-form .form-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.125rem;
  color: var(--text);
}

.card-form .form-group input,
.card-form .form-group textarea {
  width: 100%;
  padding: 0.5rem 0.625rem;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  background: var(--bg);
  font-family: inherit;
  transition: border-color 0.15s;
}

.card-form .form-group input:focus,
.card-form .form-group textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.card-form .form-group input:focus-visible,
.card-form .form-group textarea:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 1px;
  border-color: var(--teal);
  box-shadow: none;
}

.card-form .form-group textarea {
  resize: vertical;
  min-height: 3.5rem;
}

.card-form-submit {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  font-family: inherit;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background 0.15s;
}

.card-form-submit:hover {
  background: var(--accent-hover);
}

.card-form-submit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.card-form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-message {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  text-align: center;
}

.form-message.success {
  color: #059669;
}

.form-message.error {
  color: #dc2626;
}

/* ---- Content Column ---- */

/* Disclaimer bar */
.disclaimer {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: 0.375rem;
  padding: 0.625rem 0.875rem;
  margin-bottom: 1.5rem;
  font-size: 0.8125rem;
  color: #92400e;
  line-height: 1.5;
}

/* About section */
.about-section {
  margin-bottom: 2rem;
}

.about-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.about-section p {
  margin-bottom: 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.about-section p:last-of-type {
  margin-bottom: 0;
}

/* Use cases */
.use-cases-section {
  margin-bottom: 2rem;
}

.use-cases-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.use-cases {
  list-style: none;
}

.use-cases li {
  padding: 0.375rem 0 0.375rem 1.75rem;
  position: relative;
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

.use-cases li::before {
  content: "\2022";
  position: absolute;
  left: 0.5rem;
  top: 0.375rem;
  color: var(--teal);
  font-size: 1.125rem;
}

/* ---- Trust Icons Row ---- */
.trust-icons-row {
  display: flex;
  gap: 1px;
  margin-bottom: 2rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

.trust-icon-item {
  flex: 1;
  text-align: center;
  padding: 1.25rem 0.75rem;
  background: var(--card-bg);
}

.trust-icon-item + .trust-icon-item {
  border-left: 1px solid var(--border);
}

.trust-icon-item .icon {
  font-size: 1.5rem;
  margin-bottom: 0.375rem;
  display: block;
}

.trust-icon-item .icon-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  display: block;
}

.trust-icon-item .icon-desc {
  font-size: 0.6875rem;
  color: var(--muted);
  display: block;
  margin-top: 0.125rem;
}

/* ---- FAQ Accordion ---- */
.faq {
  margin-bottom: 2rem;
}

.faq h2 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0.875rem 0;
  font-size: 0.9375rem;
  font-weight: 600;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  font-family: inherit;
}

.faq-question:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.faq-question::after {
  content: "+";
  font-size: 1.125rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-item.open .faq-question::after {
  content: "\2212";
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 0 0.875rem;
  font-size: 0.875rem;
  color: var(--text-tertiary);
  line-height: 1.7;
}

/* ---- Footer ---- */
.footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  font-size: 0.75rem;
  color: var(--muted);
}

.footer a {
  color: var(--teal);
  text-decoration: underline;
}

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

.footer p {
  margin-bottom: 0.25rem;
}

/* ---- Loading / Error States ---- */
.loading {
  text-align: center;
  padding: 4rem 1rem;
}

.loading h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.loading p {
  color: var(--muted);
  font-size: 1rem;
}

.error-state {
  text-align: center;
  padding: 4rem 1rem;
}

.error-state h1 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.error-state p {
  color: var(--muted);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.error-state a {
  color: var(--text);
  text-decoration: underline;
}

/* ---- Construction State ---- */
.construction-state {
  text-align: center;
  padding: 6rem 1.5rem;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.construction-state h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.construction-state p {
  color: var(--muted);
  font-size: 1.125rem;
}

/* ---- Responsive: Tablet ---- */
@media (max-width: 1024px) and (min-width: 769px) {
  .main-grid {
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
  }

  .hero-section h1 {
    font-size: 2rem;
  }

  .sidebar {
    margin-top: -3rem;
  }

  .trust-icons-row {
    flex-direction: column;
  }

  .trust-icon-item + .trust-icon-item {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

/* ---- Responsive: Mobile ---- */
@media (max-width: 768px) {
  .hero-section {
    padding: 1rem 0 1.5rem;
  }

  .hero-section h1 {
    font-size: 1.75rem;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 0 1rem 2rem;
  }

  /* On mobile, sidebar (purchase card) comes first visually */
  .sidebar {
    position: static;
    order: -1;
    margin-top: -3.5rem;
    margin-bottom: 1.5rem;
  }

  .content-col {
    order: 1;
  }

  .trust-icons-row {
    flex-direction: column;
  }

  .trust-icon-item + .trust-icon-item {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}
