/* ============================================================
   Affiliate Engine — Site Styles
   Mobile-first, fast-loading, conversion-focused
   ============================================================ */

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

:root {
  --color-bg: #ffffff;
  --color-text: #1a1a2e;
  --color-text-muted: #555;
  --color-accent: #e63946;
  --color-accent-hover: #c1121f;
  --color-surface: #f8f9fa;
  --color-border: #e0e0e0;
  --color-success: #2a9d8f;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --max-width: 1100px;
  --radius: 8px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.12);
}

html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { color: var(--color-accent-hover); }

/* --- Header / Nav --- */
.site-header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text);
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}
.nav-links a { color: var(--color-text-muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--color-accent); }

.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: transform 0.2s;
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow);
  }
  .mobile-nav-toggle { display: flex; }
}

/* --- Main Content --- */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* --- Product Page --- */
.product-page h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  margin: 2.5rem 0 1rem;
  color: var(--color-text);
}

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}
@media (min-width: 768px) {
  .hero { grid-template-columns: 1fr 1fr; }
}
.headline {
  font-family: var(--font-heading);
  font-size: 2rem;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}
@media (min-width: 768px) {
  .headline { font-size: 2.5rem; }
}
.subheadline {
  font-size: 1.1rem;
  color: var(--color-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}
.hero-image img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* --- CTA Buttons --- */
.cta-button {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.05rem;
  text-align: center;
  transition: background 0.2s, transform 0.1s;
}
.cta-button:hover { transform: translateY(-1px); }
.cta-primary {
  background: var(--color-accent);
  color: #fff;
}
.cta-primary:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* --- Features Section --- */
.features ul, .features ol {
  list-style: none;
  padding: 0;
}
.features li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}
.features li:last-child { border-bottom: none; }
.features strong { display: block; font-size: 1.05rem; margin-bottom: 0.25rem; }

/* --- Social Proof --- */
.testimonial {
  background: var(--color-surface);
  padding: 1.5rem 2rem;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  line-height: 1.7;
}

/* --- FAQ --- */
.faq h3, .faq strong {
  font-size: 1.05rem;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}
.faq p { color: var(--color-text-muted); margin-bottom: 0.75rem; }

/* --- Bottom CTA --- */
.cta-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  margin: 3rem 0;
}
.cta-card p { margin-bottom: 1.25rem; font-size: 1.1rem; }
.cta-card .cta-button { margin-top: 0.5rem; }

/* --- Product Meta Sidebar --- */
.product-meta {
  background: var(--color-surface);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-top: 2rem;
}
.product-meta dl { display: grid; grid-template-columns: auto 1fr; gap: 0.5rem 1rem; }
.product-meta dt { font-weight: 600; color: var(--color-text-muted); }

/* --- Catalogue / Product Grid --- */
.catalogue-header, .category-header {
  text-align: center;
  margin-bottom: 2.5rem;
}
.catalogue-header h1, .category-header h1 {
  font-family: var(--font-heading);
  font-size: 2rem;
}
.catalogue-subtitle, .category-count {
  color: var(--color-text-muted);
  margin-top: 0.5rem;
}

.category-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}
.category-nav a {
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.category-nav a:hover, .category-nav a.active {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.product-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 540px)  { .product-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }

.product-card {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
  background: var(--color-bg);
}
.product-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.product-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}
.product-card-body {
  padding: 1rem 1.25rem;
}
.product-card-body h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.product-card-body h3 a { color: var(--color-text); }
.product-card-body .price {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 1.1rem;
}
.product-card-body .rating {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 0.25rem;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* --- About Page --- */
.about-page h1 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 1rem; }
.about-page h2 { font-size: 1.3rem; margin: 2rem 0 0.75rem; }
.about-page p { margin-bottom: 1rem; color: var(--color-text-muted); }

/* --- Footer --- */
.site-footer {
  border-top: 1px solid var(--color-border);
  margin-top: 4rem;
  padding: 2rem 1.5rem;
  text-align: center;
}
.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
}
.affiliate-disclosure {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}
.footer-nav { margin-bottom: 0.75rem; }
.footer-nav a {
  color: var(--color-text-muted);
  margin: 0 0.75rem;
  font-size: 0.9rem;
}
.copyright { font-size: 0.8rem; color: var(--color-text-muted); }
