/* ═══════════════════════════════════════════════════════════
   CutIntoAI Storefront Styles
   Design tokens from landing page
   ═══════════════════════════════════════════════════════════ */

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

:root {
  --ink: #0a0a0a;
  --paper: #f8f6f1;
  --accent: #e85d26;
  --accent-hover: #d04e1c;
  --accent-light: #fff0e8;
  --muted: #6b6560;
  --border: #e0dbd4;
  --highlight: #fef3c7;
  --white: #ffffff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.06);
  --shadow-lg: 0 20px 60px rgba(0,0,0,0.08);
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
}

a { color: inherit; text-decoration: none; }

/* ─── NAV ──────────────────────────────────────────────── */
nav {
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s;
  padding: 0.5rem 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--accent);
}

.nav-tag {
  font-size: 0.8rem;
  color: var(--muted);
  border: 1px solid var(--border);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ─── BROWSE HERO ──────────────────────────────────────── */
.browse-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.browse-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.browse-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ─── CATEGORY FILTER ──────────────────────────────────── */
.browse-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2.5rem;
  padding: 0 1rem;
}

.category-pill {
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  color: var(--muted);
  transition: all 0.2s;
  white-space: nowrap;
}

.category-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.category-pill.active {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ─── MANUALS GRID ─────────────────────────────────────── */
.manuals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.manual-grid-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  display: block;
}

.manual-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-cover {
  padding: 2rem;
  color: white;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.card-cover-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.6;
}

.card-cover-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-top: 0.75rem;
}

.card-cover-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  opacity: 0.7;
  margin-top: auto;
  padding-top: 1rem;
}

.card-cover-price {
  background: rgba(255,255,255,0.15);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
  font-weight: 600;
}

.card-info {
  padding: 1.5rem;
}

.card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.card-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.card-info p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── DETAIL PAGE ──────────────────────────────────────── */
.detail-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.detail-hero-grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 3rem;
  align-items: start;
}

.detail-cover {
  color: white;
  border-radius: var(--radius);
  padding: 2.5rem;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-lg);
}

.detail-cover-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  opacity: 0.6;
}

.detail-cover-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-top: 1rem;
}

.detail-cover-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-top: auto;
  padding-top: 1.5rem;
}

.detail-cover-price {
  background: rgba(255,255,255,0.15);
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 1rem;
}

.detail-info {
  padding-top: 0.5rem;
}

.detail-info h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  margin-top: 0.5rem;
}

.detail-subtitle {
  font-size: 1.2rem;
  color: var(--muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.detail-description {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.detail-meta {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.meta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.meta-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
}

.price-accent {
  color: var(--accent);
}

/* ─── BUY BUTTON ───────────────────────────────────────── */
.buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2.5rem;
  background: var(--accent);
  color: var(--white);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
  text-decoration: none;
}

.buy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.buy-btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.buy-btn.secondary:hover {
  background: var(--accent-light);
}

.buy-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.75rem;
}

/* ─── DETAIL CONTENT (TOC + PREVIEW) ──────────────────── */
.detail-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.toc-section h2, .preview-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.toc-list {
  list-style: none;
  counter-reset: none;
}

.toc-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.toc-num {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  color: var(--accent);
  font-size: 0.85rem;
  min-width: 1.5rem;
}

.preview-content {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  position: relative;
  max-height: 500px;
  overflow: hidden;
  font-size: 0.95rem;
  line-height: 1.8;
}

.preview-content h3 {
  font-size: 1.3rem;
  margin: 1.5rem 0 0.75rem;
}

.preview-content h3:first-child {
  margin-top: 0;
}

.preview-content h4 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

.preview-content ul {
  padding-left: 1.5rem;
  margin: 0.75rem 0;
}

.preview-content li {
  margin-bottom: 0.35rem;
}

.preview-content strong {
  font-weight: 600;
}

.preview-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(transparent, var(--paper));
  pointer-events: none;
}

.preview-section .buy-btn {
  margin-top: 1.5rem;
}

/* ─── RELATED MANUALS ──────────────────────────────────── */
.related-scroll {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding: 0 2rem 2rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.related-scroll::-webkit-scrollbar {
  display: none;
}

.related-card {
  flex: 0 0 220px;
  scroll-snap-align: start;
}

.related-cover {
  color: white;
  border-radius: var(--radius);
  padding: 1.5rem;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s;
}

.related-cover:hover {
  transform: scale(1.03);
}

.related-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.related-price {
  font-weight: 600;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ─── SUCCESS PAGE ─────────────────────────────────────── */
.success-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

.success-icon {
  width: 80px;
  height: 80px;
  background: var(--accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  margin: 0 auto 2rem;
}

.success-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.success-page p {
  font-size: 1.1rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.success-note {
  font-size: 0.9rem !important;
}

.success-note a {
  color: var(--accent);
  text-decoration: underline;
}

.success-page .buy-btn {
  margin-top: 2rem;
}

/* ─── ERROR PAGE ───────────────────────────────────────── */
.error-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 6rem 2rem;
  text-align: center;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-page p {
  color: var(--muted);
}

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

/* ─── EMPTY STATE ──────────────────────────────────────── */
.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 4rem 2rem;
  grid-column: 1 / -1;
  font-size: 1.1rem;
}

/* ─── WAITLIST FORM ────────────────────────────────────── */
.waitlist-form {
  display: flex;
  gap: 0.75rem;
  max-width: 400px;
  margin: 2rem auto 0;
}

.waitlist-input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  background: var(--white);
  outline: none;
  transition: border-color 0.2s;
}

.waitlist-input:focus {
  border-color: var(--accent);
}

.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.back-link:hover {
  color: var(--accent);
}

/* ─── FOOTER ───────────────────────────────────────────── */
footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

footer a {
  color: var(--muted);
  text-decoration: none;
}

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

/* ─── GUIDES LISTING ──────────────────────────────────── */
.guides-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 2rem;
  text-align: center;
}

.guides-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.guides-hero p {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto;
}

.guides-grid-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 2rem 5rem;
}

.guides-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.guide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  transition: transform 0.3s, box-shadow 0.3s;
}

.guide-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.guide-card-accent {
  width: 6px;
  flex-shrink: 0;
}

.guide-card-body {
  padding: 1.75rem 2rem;
  flex: 1;
}

.guide-card-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: inline-block;
}

.guide-card-body h2 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

.guide-card-body p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.guide-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.guide-card-tag {
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.75rem;
}

/* ─── GUIDE ARTICLE ───────────────────────────────────── */
.guide-article {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem;
}

.guide-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}

.guide-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.guide-category-badge {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.3rem 0.8rem;
  border-radius: 100px;
}

.guide-read-time {
  font-size: 0.85rem;
  color: var(--muted);
}

.guide-header h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.guide-subtitle {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.6;
}

.guide-body {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
}

.guide-body p {
  margin-bottom: 1.25rem;
}

.guide-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  letter-spacing: -0.01em;
}

.guide-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
}

.guide-body ul, .guide-body ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
}

.guide-body li {
  margin-bottom: 0.5rem;
  line-height: 1.75;
}

.guide-body strong {
  font-weight: 600;
  color: var(--ink);
}

.guide-body em {
  font-style: italic;
}

/* ─── GUIDE CTA ───────────────────────────────────────── */
.guide-cta {
  margin: 3rem 0;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  padding: 3px;
}

.guide-cta-inner {
  background: var(--white);
  border-radius: calc(var(--radius) - 2px);
  padding: 2.5rem;
  text-align: center;
}

.guide-cta h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.guide-cta p {
  color: var(--muted);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

.guide-cta-features {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.guide-cta-features span {
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 100px;
}

/* ─── RELATED GUIDES ──────────────────────────────────── */
.related-guides-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 2rem 5rem;
}

.related-guides-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.related-guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.related-guide-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.related-guide-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.related-guide-category {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
}

.related-guide-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.related-guide-meta {
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: auto;
}

/* ─── RESPONSIVE ───────────────────────────────────────── */
@media (max-width: 1024px) {
  .manuals-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .detail-content-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger-btn {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--paper);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 9999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-link {
    font-size: 1.5rem;
  }

  .manuals-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .related-guides-grid {
    grid-template-columns: 1fr;
  }

  .guide-article {
    padding: 0 1.5rem;
  }

  .guides-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .guides-grid-section {
    padding: 1rem 1.5rem 3rem;
  }

  .guide-cta-inner {
    padding: 2rem 1.5rem;
  }

  .guide-cta-features {
    gap: 0.5rem;
  }

  .related-guides-section {
    padding: 0 1.5rem 3rem;
  }

  .detail-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .detail-cover {
    min-height: 320px;
  }

  .detail-meta {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .browse-hero {
    padding: 3rem 1.5rem 1.5rem;
  }

  .browse-section {
    padding: 0 1.5rem 3rem;
  }

  .detail-hero {
    padding: 2rem 1.5rem;
  }

  .detail-content {
    padding: 0 1.5rem 3rem;
  }

  .waitlist-form {
    flex-direction: column;
  }

  footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
}

@media (max-width: 480px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .browse-hero h1 {
    font-size: 1.8rem;
  }

  .detail-cover {
    min-height: 280px;
    padding: 1.75rem;
  }

  .detail-cover-title {
    font-size: 1.4rem;
  }

  .card-cover {
    min-height: 200px;
    padding: 1.5rem;
  }

  .buy-btn {
    width: 100%;
    text-align: center;
  }
}
