/* ============================================================
   CamperVS — Static Site Stylesheet
   Modern, mobile-first, no frameworks.
   ============================================================ */

/* --- Custom Properties --- */
:root {
  --c-primary: #2563eb;
  --c-primary-dark: #1e40af;
  --c-primary-light: #dbeafe;
  --c-primary-50: #eff6ff;
  --c-accent: #f59e0b;
  --c-accent-dark: #d97706;
  --c-accent-light: #fef3c7;
  --c-bg: #f8fafc;
  --c-bg-white: #ffffff;
  --c-text: #1a1a2e;
  --c-text-secondary: #475569;
  --c-text-muted: #94a3b8;
  --c-border: #e2e8f0;
  --c-border-light: #f1f5f9;
  --c-success: #10b981;
  --c-success-bg: #f0fdf4;
  --c-success-text: #065f46;
  --c-danger: #ef4444;
  --c-danger-bg: #fef2f2;
  --c-danger-text: #991b1b;
  --c-dark: #1a1a2e;
  --shadow-xs: 0 1px 2px rgba(0,0,0,.04);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.08), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.08), 0 8px 10px -6px rgba(0,0,0,.04);
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-full: 9999px;
  --t: .2s ease;
  --t-slow: .35s ease;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--c-primary); text-decoration: none; transition: color var(--t); }
a:hover { color: var(--c-primary-dark); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: 1.25;
  font-weight: 700;
  color: var(--c-text);
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.15rem; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
table { border-collapse: collapse; border-spacing: 0; }

/* --- Container --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ============================================================
   1. HEADER
   ============================================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--c-bg-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-xs);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: .75rem;
  height: 60px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Logo */
.logo {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--c-text);
  letter-spacing: -.02em;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo:hover { color: var(--c-text); }
.logo span {
  color: var(--c-primary);
  font-weight: 800;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--t), opacity var(--t);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Nav — mobile first (hidden) */
.nav {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--c-bg-white);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-md);
  padding: .5rem 0;
  z-index: 190;
}
.nav.open { display: block; }
.nav a {
  display: block;
  padding: .7rem 1.5rem;
  color: var(--c-text);
  font-weight: 500;
  font-size: .95rem;
  transition: background var(--t);
}
.nav a:hover { background: var(--c-border-light); color: var(--c-primary); }

/* Header search */
.header-search {
  position: relative;
  display: none;
}
.header-search input {
  width: 200px;
  padding: .45rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  font-size: .88rem;
  background: var(--c-bg);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t), width var(--t-slow);
}
.header-search input:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px var(--c-primary-light);
  width: 260px;
}

/* Search dropdown */
.search-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  min-width: 280px;
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  max-height: 380px;
  overflow-y: auto;
  z-index: 300;
}
.search-dropdown.active { display: block; }
.search-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .85rem;
  color: var(--c-text);
  transition: background var(--t);
  border-bottom: 1px solid var(--c-border-light);
  cursor: pointer;
}
.search-item:last-child { border-bottom: none; }
.search-item:hover, .search-item.highlighted { background: var(--c-primary-50); }
.search-item-name { font-weight: 600; font-size: .9rem; }
.search-item-meta { font-size: .78rem; color: var(--c-text-muted); }
.search-empty {
  padding: 1rem;
  text-align: center;
  color: var(--c-text-muted);
  font-size: .88rem;
}

/* ============================================================
   2. HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
  letter-spacing: -.02em;
}
.hero-highlight { color: var(--c-accent); }
.hero-subtitle {
  font-size: 1.05rem;
  opacity: .9;
  max-width: 620px;
  margin: 0 auto 1.75rem;
  line-height: 1.6;
}

/* Hero compare form */
.hero-compare {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  max-width: 680px;
  margin: 0 auto;
}
.hero-compare-inputs {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: .5rem;
}
.hero-compare-field {
  position: relative;
  flex: 1;
}
.hero-compare-field input {
  width: 100%;
  padding: .85rem 1rem;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: var(--r);
  font-size: 1rem;
  background: rgba(255,255,255,.15);
  color: #fff;
  outline: none;
  transition: border-color var(--t), background var(--t);
}
.hero-compare-field input::placeholder { color: rgba(255,255,255,.65); }
.hero-compare-field input:focus {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.5);
}
.hero-compare-vs {
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: .05em;
  color: var(--c-accent);
  text-align: center;
}
.hero-compare-btn {
  padding: .85rem 2rem;
  background: var(--c-accent);
  color: #fff;
  border: none;
  border-radius: var(--r);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--t), transform var(--t);
  white-space: nowrap;
}
.hero-compare-btn:hover { background: var(--c-accent-dark); transform: translateY(-1px); }

/* Hero simple search */
.hero-search {
  display: flex;
  max-width: 540px;
  margin: 0 auto;
  box-shadow: var(--shadow-xl);
  border-radius: var(--r);
  overflow: hidden;
}
.hero-search input {
  flex: 1;
  padding: .85rem 1rem;
  border: none;
  font-size: 1rem;
  outline: none;
  min-width: 0;
}
.hero-search button {
  background: var(--c-accent);
  color: #fff;
  border: none;
  padding: .85rem 1.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--t);
  white-space: nowrap;
}
.hero-search button:hover { background: var(--c-accent-dark); }

/* ============================================================
   3. STATS BAR
   ============================================================ */
.stats-bar {
  background: var(--c-bg-white);
  border-bottom: 1px solid var(--c-border);
  padding: 1.5rem 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  text-align: center;
}
.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--c-primary);
}
.stat-label {
  font-size: .82rem;
  color: var(--c-text-muted);
  letter-spacing: .02em;
}

/* ============================================================
   4. SECTIONS
   ============================================================ */
.section { padding: 2.5rem 0; }
.section-alt { background: var(--c-bg-white); }
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}
.section-count { font-weight: 400; color: var(--c-text-muted); font-size: .9em; }

/* ============================================================
   5. CAMPER CARDS
   ============================================================ */
.camper-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.camper-grid-sm { gap: 1rem; }

.camper-card {
  background: var(--c-bg-white);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), transform var(--t);
  display: flex;
  flex-direction: column;
  color: var(--c-text);
}
.camper-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  color: var(--c-text);
}
.camper-card-img {
  position: relative;
  aspect-ratio: 16/10;
  background: var(--c-border-light);
  overflow: hidden;
}
.camper-card-img img { width: 100%; height: 100%; object-fit: cover; }
.camper-card-img .badge { position: absolute; top: .5rem; left: .5rem; }
.camper-card-body {
  padding: .9rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.camper-card-body h3 {
  font-size: .95rem;
  margin-bottom: .2rem;
  line-height: 1.35;
  font-family: var(--font-body);
  font-weight: 700;
}
.camper-card-mfg { font-size: .8rem; color: var(--c-text-muted); margin-bottom: .5rem; }
.camper-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-top: auto;
  padding-top: .5rem;
}
.camper-card-specs span {
  font-size: .73rem;
  color: var(--c-text-secondary);
  background: var(--c-border-light);
  padding: .15rem .5rem;
  border-radius: var(--r-full);
}
.camper-card-price {
  font-weight: 700;
  color: var(--c-primary);
  font-size: .95rem;
  margin-top: .5rem;
}
.camper-card-compact { border: 1px solid var(--c-border); }
.camper-card-link { color: var(--c-text); display: block; }
.camper-card-link:hover { color: var(--c-text); }
.camper-grid-ad { grid-column: 1 / -1; padding: 1rem 0; }

/* Image placeholder */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--c-border-light) 0%, var(--c-border) 100%);
  color: var(--c-text-muted);
  font-size: 3rem;
}
.img-placeholder-lg { min-height: 280px; font-size: 4.5rem; }
.image-credit { font-size: .72rem; color: var(--c-text-muted); margin-top: .25rem; line-height: 1.4; }

/* ============================================================
   6. COMPARE PAGE
   ============================================================ */
.compare-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1.5rem 1rem;
}
.compare-title {
  text-align: center;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}
.compare-title a { color: var(--c-text); }
.compare-title a:hover { color: var(--c-primary); }
.vs-badge {
  display: inline-block;
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .75rem;
  font-weight: 800;
  padding: .3rem .75rem;
  border-radius: var(--r-sm);
  margin: 0 .5rem;
  vertical-align: middle;
  letter-spacing: .05em;
}

/* Compare images */
.compare-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.compare-img { text-align: center; }
.compare-img img,
.compare-img .img-placeholder {
  border-radius: var(--r);
  aspect-ratio: 16/10;
  object-fit: cover;
  margin-bottom: .75rem;
}
.compare-img .img-placeholder { min-height: 120px; }

/* Compare table */
.compare-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
  border-radius: var(--r);
  border: 1px solid var(--c-border);
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.compare-table thead th {
  background: var(--c-primary-dark);
  color: #fff;
  padding: .75rem .6rem;
  font-weight: 600;
  font-size: .82rem;
  text-align: center;
  white-space: nowrap;
}
.compare-table thead th.comp-label { background: var(--c-primary); }
.compare-table .section-row td {
  background: var(--c-border-light);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  padding: .5rem;
  text-align: center;
}
.compare-table tbody tr { border-bottom: 1px solid var(--c-border-light); }
.compare-table tbody tr:last-child { border-bottom: none; }
.compare-table .comp-label {
  text-align: center;
  font-weight: 500;
  color: var(--c-text-secondary);
  background: var(--c-border-light);
  padding: .5rem .4rem;
  width: 30%;
  white-space: nowrap;
}
.compare-table .comp-val {
  text-align: center;
  padding: .55rem .5rem;
  width: 35%;
  font-weight: 500;
}
.compare-table .comp-val.winner {
  background: var(--c-success-bg);
  color: var(--c-success-text);
  font-weight: 700;
}
.compare-table .comp-val.loser {
  background: var(--c-danger-bg);
  color: var(--c-danger-text);
}
.winner-badge { color: var(--c-accent); font-size: .85em; }

/* Compare summary */
.compare-summary { margin: 2rem 0; }
.compare-summary h2 { font-size: 1.25rem; margin-bottom: 1rem; }
.compare-summary-text {
  line-height: 1.85;
  color: var(--c-text-secondary);
  font-size: .95rem;
}
.compare-summary-text p { margin-bottom: 1rem; }
.compare-summary-text p:last-child { margin-bottom: 0; }

/* Verdict */
.compare-verdict { margin: 2rem 0; }
.compare-verdict h2 { text-align: center; margin-bottom: 1.5rem; }
.verdict-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.verdict-card {
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-left: 4px solid var(--c-primary);
  border-radius: var(--r);
  padding: 1.25rem;
}
.verdict-card h3 {
  font-size: 1rem;
  margin-bottom: .75rem;
  color: var(--c-primary-dark);
  font-family: var(--font-body);
}
.verdict-card ul { padding-left: 1.25rem; list-style: disc; margin-bottom: 1rem; }
.verdict-card li { margin-bottom: .35rem; font-size: .9rem; color: var(--c-text-secondary); line-height: 1.5; }

/* Intro text section */
.intro-text {
  margin: 1.5rem 0;
  line-height: 1.85;
  color: var(--c-text-secondary);
  font-size: .95rem;
}
.intro-text p { margin-bottom: 1rem; }

/* ============================================================
   7. CAMPER DETAIL PAGE
   ============================================================ */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 1.5rem 1rem;
}
.detail-hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}
.detail-hero-img {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--c-border-light);
  aspect-ratio: 16/10;
}
.detail-hero-img img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero-info .badge { margin-right: .5rem; margin-bottom: .5rem; }
.detail-hero-info h1 { margin: .5rem 0 .25rem; font-size: 1.5rem; }
.detail-manufacturer { color: var(--c-text-muted); margin-bottom: 1rem; }
.detail-manufacturer a { color: var(--c-primary); }

/* Key specs row */
.key-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
  margin-top: 1rem;
}
.key-spec {
  background: var(--c-border-light);
  padding: .75rem;
  border-radius: var(--r-sm);
  text-align: center;
}
.key-spec-value {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--c-text);
}
.key-spec-label {
  font-size: .72rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.key-spec-price .key-spec-value { color: var(--c-primary); }

/* Detail sections */
.detail-section { margin-bottom: 2rem; }
.detail-section h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--c-border);
}
.detail-description {
  line-height: 1.85;
  color: var(--c-text-secondary);
  font-size: .95rem;
}

/* Specs tables */
.specs-tables { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
.spec-group h3 {
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-bottom: .5rem;
  font-family: var(--font-body);
}
.spec-table { width: 100%; }
.spec-table tr { border-bottom: 1px solid var(--c-border-light); }
.spec-table th {
  text-align: left;
  padding: .5rem .75rem;
  font-weight: 500;
  color: var(--c-text-muted);
  width: 45%;
  font-size: .88rem;
}
.spec-table td {
  padding: .5rem .75rem;
  font-weight: 600;
  font-size: .88rem;
}

/* Sidebar */
.detail-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* ============================================================
   8. BROWSE PAGE
   ============================================================ */
.browse-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 1.5rem 1rem;
}
.browse-sidebar { order: 2; }
.browse-main { order: 1; }
.browse-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: .5rem;
}
.browse-count { color: var(--c-text-muted); font-size: .9rem; }

/* Sidebar filters */
.sidebar-title {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--c-primary);
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group h4 {
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-bottom: .4rem;
  font-family: var(--font-body);
}
.filter-list li { margin-bottom: .1rem; }
.filter-link {
  display: block;
  padding: .35rem .75rem;
  color: var(--c-text);
  font-size: .88rem;
  border-radius: var(--r-sm);
  transition: background var(--t), color var(--t);
}
.filter-link:hover { background: var(--c-primary-light); color: var(--c-primary-dark); }
.filter-link.active { background: var(--c-primary); color: #fff; font-weight: 600; }

/* ============================================================
   9. TYPE GRID (category cards)
   ============================================================ */
.type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
}
.type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem .75rem;
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  text-align: center;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  color: var(--c-text);
}
.type-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--c-text);
}
.type-icon { font-size: 2rem; margin-bottom: .5rem; }
.type-name { font-weight: 600; font-size: .9rem; }
.type-count {
  font-size: .78rem;
  color: var(--c-text-muted);
  margin-top: .25rem;
  background: var(--c-border-light);
  padding: .1rem .5rem;
  border-radius: var(--r-full);
}

/* ============================================================
   10. MANUFACTURER GRID
   ============================================================ */
.mfg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: .75rem;
}
.mfg-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .75rem 1rem;
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  color: var(--c-text);
  transition: border-color var(--t), box-shadow var(--t);
}
.mfg-card:hover { border-color: var(--c-primary); box-shadow: var(--shadow-sm); color: var(--c-text); }
.mfg-name { font-weight: 600; font-size: .85rem; }
.mfg-count { font-size: .75rem; color: var(--c-text-muted); }

/* ============================================================
   11. POPULAR COMPARISONS
   ============================================================ */
.comparison-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: .75rem;
}
.comparison-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .875rem 1.25rem;
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  color: var(--c-text);
}
.comparison-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  color: var(--c-text);
}
.comp-vs { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.comp-name { font-weight: 600; font-size: .9rem; }
.comp-badge {
  background: var(--c-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: .62rem;
  font-weight: 800;
  padding: .2rem .5rem;
  border-radius: var(--r-sm);
  letter-spacing: .06em;
}

/* Popular grid (card-style comparisons) */
.popular-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.popular-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  padding: 1rem;
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  text-align: center;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
  color: var(--c-text);
}
.popular-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  color: var(--c-text);
}
.popular-card .vs-badge { margin: 0; font-size: .65rem; }

/* ============================================================
   12. BADGES
   ============================================================ */
.badge {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: var(--r-full);
  font-size: .73rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-category { background: var(--c-primary-light); color: var(--c-primary-dark); }
.badge-year { background: var(--c-border-light); color: var(--c-text-muted); }

/* ============================================================
   13. BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: .6rem 1.25rem;
  font-weight: 600;
  font-size: .9rem;
  border-radius: var(--r-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--t);
  text-align: center;
  line-height: 1.4;
}
.btn-primary { background: var(--c-primary); color: #fff; }
.btn-primary:hover { background: var(--c-primary-dark); color: #fff; }
.btn-accent { background: var(--c-accent); color: #fff; border-color: var(--c-accent); }
.btn-accent:hover { background: var(--c-accent-dark); color: #fff; border-color: var(--c-accent-dark); }
.btn-outline { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn-outline:hover { background: var(--c-primary); color: #fff; }
.btn-sm { padding: .4rem .9rem; font-size: .8rem; }
.btn-lg { padding: .875rem 2rem; font-size: 1rem; }
.btn-block { display: block; width: 100%; }

/* ============================================================
   14. BREADCRUMBS
   ============================================================ */
.breadcrumb {
  background: var(--c-bg-white);
  border-bottom: 1px solid var(--c-border);
  padding: .7rem 0;
}
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  font-size: .82rem;
  color: var(--c-text-muted);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.breadcrumb li::after { content: '\203A'; margin-left: .4rem; color: var(--c-text-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb li:last-child { color: var(--c-text); font-weight: 500; }
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-primary); }

/* ============================================================
   15. AFFILIATE BOXES
   ============================================================ */
.affiliate-cta {
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 1.25rem;
  transition: box-shadow var(--t);
}
.affiliate-cta:hover { box-shadow: var(--shadow-sm); }
.affiliate-cta h4 { margin-bottom: .5rem; font-size: 1rem; font-family: var(--font-body); }
.affiliate-cta p { font-size: .85rem; color: var(--c-text-muted); margin-bottom: .75rem; line-height: 1.5; }

/* ============================================================
   16. AD UNITS
   ============================================================ */
.ad-container {
  margin: 1.5rem 0;
  text-align: center;
  min-height: 0;
  overflow: hidden;
}
.ad-container:empty { display: none; }
.ad-container.ad-hidden { display: none !important; }
.ad-container ins.adsbygoogle[data-ad-status="unfilled"] { display: none !important; }
.ad-sidebar { margin: 0; }

.ad-unit {
  margin: 1.5rem auto;
  text-align: center;
  overflow: hidden;
  max-width: 728px;
}
.ad-unit:empty { display: none; }
.ad-unit.ad-hidden { display: none !important; }

/* ============================================================
   17. CTA BOX
   ============================================================ */
.cta-section { padding: 0; }
.cta-box {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-primary-dark) 100%);
  color: #fff;
  padding: 2rem 1.5rem;
  border-radius: var(--r-lg);
  text-align: center;
  margin: 1.5rem 0;
}
.cta-box h2, .cta-box h3 { color: #fff; margin-bottom: .75rem; }
.cta-box p {
  opacity: .9;
  margin-bottom: 1.25rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* ============================================================
   18. PAGINATION
   ============================================================ */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .35rem;
  margin: 2rem 0;
}
.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: .5rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: .88rem;
  color: var(--c-text);
  background: var(--c-bg-white);
  transition: all var(--t);
}
.page-link:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-link.active {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  font-weight: 600;
}
.page-ellipsis { padding: .5rem .4rem; color: var(--c-text-muted); }

/* ============================================================
   19. PAGE HEADER
   ============================================================ */
.page-header { padding: 2rem 0 1rem; }
.page-header h1 { margin-bottom: .25rem; }
.page-subtitle { color: var(--c-text-muted); font-size: .95rem; }

/* ============================================================
   20. SEARCH PAGE
   ============================================================ */
.search-form {
  display: flex;
  gap: .5rem;
  max-width: 540px;
  margin: 1.5rem auto;
}
.search-form input {
  flex: 1;
  padding: .75rem 1rem;
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
.search-form input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px var(--c-primary-light); }

/* ============================================================
   21. DESCRIPTION BLOCKS
   ============================================================ */
.mfg-description,
.category-description {
  background: var(--c-bg-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  line-height: 1.85;
  color: var(--c-text-secondary);
  font-size: .95rem;
}

/* ============================================================
   22. ERROR PAGE
   ============================================================ */
.error-page {
  text-align: center;
  padding: 4rem 1rem;
}
.error-icon { font-size: 4rem; margin-bottom: 1rem; }
.error-page h1 { margin-bottom: .75rem; }
.error-page > p { color: var(--c-text-muted); margin-bottom: 1.5rem; }
.error-links { margin-top: 2rem; }
.error-links h3 { margin-bottom: .75rem; }
.error-links ul { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 1rem; }
.error-links li a { color: var(--c-primary); font-weight: 500; }

/* ============================================================
   23. EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
}
.empty-state h2 { margin-bottom: .5rem; color: var(--c-text); }
.empty-state p { margin-bottom: 1.25rem; }

/* ============================================================
   24. FOOTER
   ============================================================ */
.footer {
  background: var(--c-dark);
  color: #cbd5e1;
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 1.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #334155;
}
.footer-links a {
  color: #94a3b8;
  font-size: .88rem;
  transition: color var(--t);
}
.footer-links a:hover { color: #fff; }
.footer-copy {
  text-align: center;
  font-size: .78rem;
  color: #64748b;
}

/* Legacy footer grid (PHP templates) */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: #fff; margin-bottom: .75rem; font-size: 1rem; }
.footer-col p { font-size: .85rem; line-height: 1.6; }
.footer-col ul li { margin-bottom: .25rem; }
.footer-col ul a { color: #94a3b8; font-size: .85rem; }
.footer-col ul a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid #334155;
  padding-top: 1.5rem;
  text-align: center;
  font-size: .78rem;
  color: #64748b;
}

/* ============================================================
   25. UTILITY CLASSES
   ============================================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   RESPONSIVE — Small mobile (max 480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero { padding: 2rem 0; }
  .hero h1 { font-size: 1.4rem; }
  .hero-subtitle { font-size: .92rem; }
  .compare-table { min-width: 480px; }
  .type-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .type-card { padding: 1rem .5rem; }
  .type-icon { font-size: 1.5rem; }
}

/* ============================================================
   RESPONSIVE — Tablet (640px+)
   ============================================================ */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .hero h1 { font-size: 2.25rem; }
  .hero-compare-inputs { flex-direction: row; align-items: center; }
  .hero-compare-vs { margin: 0; }
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .camper-grid { grid-template-columns: repeat(2, 1fr); }
  .key-specs { grid-template-columns: repeat(4, 1fr); }
  .comparison-list { grid-template-columns: repeat(2, 1fr); }
  .popular-grid { grid-template-columns: repeat(2, 1fr); }
  .verdict-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .specs-tables { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   RESPONSIVE — Desktop (960px+)
   ============================================================ */
@media (min-width: 960px) {
  /* Header: desktop layout */
  .hamburger { display: none; }
  .nav {
    display: flex !important;
    position: static;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 0;
  }
  .nav a {
    padding: .5rem .85rem;
    font-size: .88rem;
  }
  .nav a:hover { background: transparent; }
  .header-search { display: block; }

  /* Grids */
  .camper-grid { grid-template-columns: repeat(3, 1fr); }
  .popular-grid { grid-template-columns: repeat(3, 1fr); }

  /* Layouts with sidebar */
  .detail-layout,
  .compare-layout {
    grid-template-columns: 1fr 300px;
    max-width: 1200px;
    margin: 0 auto;
  }
  .browse-layout {
    grid-template-columns: 240px 1fr;
    max-width: 1200px;
    margin: 0 auto;
  }
  .browse-sidebar { order: 0; }
  .browse-main { order: 0; }

  .hero { padding: 4rem 0; }
  .hero h1 { font-size: 2.5rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .compare-title { font-size: 1.5rem; }
}

/* ============================================================
   RESPONSIVE — Wide (1200px+)
   ============================================================ */
@media (min-width: 1200px) {
  .hero h1 { font-size: 2.75rem; }
  .container { padding: 0 2rem; }
  .camper-grid { grid-template-columns: repeat(4, 1fr); }
  .header-search input { width: 240px; }
  .header-search input:focus { width: 320px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .header, .footer, .ad-container, .ad-unit, .affiliate-cta,
  .cta-box, .hamburger, .browse-sidebar, .detail-sidebar,
  .header-search, .hero-compare, .hero-search { display: none !important; }
  body { background: #fff; color: #000; }
  .camper-card { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
  .compare-table .comp-val.winner { background: #e6f4ea; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
