/*
Theme Name: Affi Toy Store
Theme URI: https://example.com/affi-toy-store
Author: Antigravity
Description: Lightweight, ultra-fast WordPress affiliate theme focused on product reviews, technical specifications, and side-by-side comparisons for hobby, RC, and saber stores (Makerfire, NSabers, The Lucky LK) with no fixed prices and dynamic "Check Latest Price" CTAs.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: affi-toy-store
Tags: affiliate, reviews, comparison, lightweight, fast, blog
*/

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-alt: #f1f5f9;
  --text: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
  --max-width: 1120px;
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.site-brand {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.site-nav a:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Main Layout */
.site-main {
  padding: 2rem 0 3.5rem;
}

.hero-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
}

.hero-box h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  line-height: 1.2;
}

.hero-box p {
  margin: 0;
  color: var(--text-muted);
  max-width: 68ch;
}

/* Grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

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

.card-thumb img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.store-badge {
  background: var(--surface-alt);
  color: var(--text);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.rating-badge {
  color: #b45309;
  background: #fef3c7;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.card-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  line-height: 1.35;
}

.card-title a {
  color: var(--text);
}

.card-excerpt {
  color: var(--text-muted);
  font-size: 0.94rem;
  margin: 0 0 1.25rem;
  flex: 1;
}

/* CTA Button */
.btn-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  text-align: center;
  transition: background 0.15s ease;
  border: none;
  cursor: pointer;
}

.btn-cta:hover {
  background: var(--accent-hover);
  color: #ffffff;
  text-decoration: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-alt);
  color: var(--text);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1rem;
  border-radius: 8px;
}

.btn-secondary:hover {
  background: var(--border);
  text-decoration: none;
}

.card-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-actions .btn-cta {
  flex: 1;
}

/* Single Article & Product Review */
.entry-article {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2.5rem);
  box-shadow: var(--shadow);
}

.entry-header {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.entry-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  line-height: 1.2;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Affiliate Product Box */
.affi-box {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.75rem 0;
  background: var(--surface);
}

.affi-box-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.affi-box-title {
  margin: 0;
  font-size: 1.3rem;
}

.affi-specs-table,
.affi-compare-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.94rem;
}

.affi-specs-table th,
.affi-specs-table td,
.affi-compare-table th,
.affi-compare-table td {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.affi-specs-table th,
.affi-compare-table thead th {
  background: var(--surface-alt);
  font-weight: 700;
}

.table-scroll {
  overflow-x: auto;
}

.pros-cons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
}

.pros-box,
.cons-box {
  padding: 1rem 1.25rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.pros-box {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.cons-box {
  background: #fef2f2;
  border-color: #fecaca;
}

.pros-box h4,
.cons-box h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.pros-box ul,
.cons-box ul {
  margin: 0;
  padding-left: 1.2rem;
}

/* Footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.affiliate-disclosure {
  font-size: 0.82rem;
  background: var(--surface-alt);
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

/* Pagination */
.pagination {
  margin-top: 2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pagination .page-numbers {
  padding: 0.5rem 0.85rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-weight: 600;
}

.pagination .page-numbers.current {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
