/*
Theme Name: CamReview Pro
Theme URI: https://camreview.pro
Author: CamReview Team
Author URI: https://camreview.pro
Description: Professional multi-camera review theme with side-by-side spec comparison, star ratings, ACF-compatible custom fields, and a responsive tech/industrial UI. Inspired by AutoHome's hardware comparison features. Built-in Custom Post Type: camera_review.
Version: 2.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: camreview
Tags: technology, review, comparison, responsive, custom-fields
*/

/* =============================================
   CSS Variables & Reset
   ============================================= */
:root {
  --primary:     #0066FF;
  --primary-dark:#0047B3;
  --accent:      #00D4FF;
  --bg-dark:     #0A0E1A;
  --bg-card:     #111827;
  --bg-card2:    #1A2235;
  --border:      #1E2D45;
  --text:        #E8EDF5;
  --text-muted:  #7A8DA8;
  --text-light:  #B0BEC5;
  --success:     #00E676;
  --warning:     #FFB300;
  --danger:      #FF1744;
  --gold:        #FFD700;
  --silver:      #C0C0C0;
  --bronze:      #CD7F32;
  --radius:      8px;
  --radius-lg:   12px;
  --shadow:      0 4px 24px rgba(0,102,255,0.12);
  --transition:  all 0.25s cubic-bezier(0.4,0,0.2,1);
  --font-main:   'Inter', sans-serif;
  --font-mono:   'JetBrains Mono', 'Consolas', monospace;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text);
  line-height:1.7;
  -webkit-font-smoothing: antialiased;
}

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

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

ul, ol { list-style: none; }

/* =============================================
   Layout
   ============================================= */
.container { max-width: 1280px; margin:0 auto; padding: 0 20px; }
.container--narrow { max-width: 900px; }
.container--wide { max-width: 1440px; }

.site-main { min-height: 70vh; }

.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  align-items: start;
}

.layout-sidebar.no-sidebar { grid-template-columns: 1fr; }

@media (max-width: 1024px) {
  .layout-sidebar { grid-template-columns: 1fr; }
}

/* =============================================
   Header
   ============================================= */
.site-header {
  background: rgba(10,14,26,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 999;
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.site-logo span { color: var(--primary); }
.site-logo img { height: 38px; width: auto; }

/* Primary Nav */
.primary-nav { display: flex; align-items: center; gap: 4px; }

.primary-nav a {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius);
  transition: var(--transition);
}

.primary-nav a:hover,
.primary-nav a.active {
  color: var(--primary);
  background: rgba(0,102,255,0.1);
}

/* Header Actions */
.header-actions { display: flex; align-items: center; gap: 12px; }

.btn-compare-badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-compare-badge:hover { background: var(--primary-dark); }

.compare-count {
  background: var(--accent);
  color: var(--bg-dark);
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-search {
  position: relative;
}

.header-search input {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 36px 8px 14px;
  border-radius: 20px;
  font-size: 0.875rem;
  width: 200px;
  transition: var(--transition);
}

.header-search input:focus {
  outline: none;
  border-color: var(--primary);
  width: 260px;
  box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
}

.header-search button {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

@media (max-width: 768px) {
  .primary-nav { display: none; }
  .primary-nav.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px;
    gap: 4px;
    z-index: 998;
  }
  .mobile-menu-toggle { display: block; }
  .header-search input { width: 140px; }
  .header-search input:focus { width: 160px; }
}

/* =============================================
   Hero Banner (Homepage)
   ============================================= */
.hero {
  background: linear-gradient(135deg, #0A0E1A 0%, #0D1930 50%, #0A0E1A 100%);
  border-bottom: 1px solid var(--border);
  padding: 80px 0 60px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(0,102,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  right: -5%;
  width: 40%;
  height: 160%;
  background: radial-gradient(ellipse, rgba(0,212,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(0,102,255,0.15);
  border: 1px solid rgba(0,102,255,0.3);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -1px;
}

.hero h1 .highlight {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.8;
}

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* =============================================
   Buttons
   ============================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  line-height: 1;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px rgba(0,102,255,0.35);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,102,255,0.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0,102,255,0.06);
}

.btn-accent {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  color: #fff;
}

.btn-accent:hover { opacity: 0.9; transform: translateY(-1px); color: #fff; }

.btn-sm { padding: 8px 18px; font-size: 0.85rem; }
.btn-lg { padding: 16px 36px; font-size: 1.05rem; }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #cc1133; color: #fff; }

/* =============================================
   Cards
   ============================================= */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(0,102,255,0.4);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
  background: var(--bg-card2);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 20px; }

.card-category {
  display: inline-block;
  background: rgba(0,102,255,0.15);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.4;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.card-meta span { display: flex; align-items: center; gap: 4px; }

.card-excerpt {
  font-size: 0.875rem;
  color: var(--text-light);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 16px;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-card2);
}

/* =============================================
   Star Rating
   ============================================= */
.star-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 1rem;
}

.star-rating .star { color: #333; }
.star-rating .star.filled { color: var(--gold); }
.star-rating .star.half { color: var(--gold); }

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,215,0,0.12);
  border: 1px solid rgba(255,215,0,0.25);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
}

.score-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: conic-gradient(var(--primary) calc(var(--score, 0) * 1%), var(--bg-card2) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  flex-shrink: 0;
}

.score-circle::before {
  content: '';
  position: absolute;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-card);
}

.score-circle span {
  position: relative;
  z-index: 1;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
}

/* =============================================
   Specs Table (Product Specs)
   ============================================= */
.specs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.specs-table tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.specs-table tr:last-child { border-bottom: none; }
.specs-table tr:hover { background: rgba(0,102,255,0.04); }

.specs-table th {
  background: var(--bg-card2);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 16px;
  text-align: left;
  white-space: nowrap;
}

.specs-table td {
  padding: 12px 16px;
  color: var(--text);
  vertical-align: middle;
}

.specs-table td:first-child {
  color: var(--text-muted);
  font-weight: 500;
  width: 180px;
  white-space: nowrap;
}

/* =============================================
   Compare System
   ============================================= */
.compare-tray {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 2px solid var(--primary);
  padding: 12px 20px;
  z-index: 9000;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.5);
}

.compare-tray.visible { transform: translateY(0); }

.compare-tray-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.compare-tray-items {
  display: flex;
  gap: 12px;
  flex: 1;
  flex-wrap: wrap;
}

.compare-tray-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 12px;
  font-size: 0.85rem;
  max-width: 200px;
}

.compare-tray-item img {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 4px;
}

.compare-tray-item .remove-item {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0;
  line-height: 1;
  margin-left: auto;
  flex-shrink: 0;
}

.compare-tray-item .remove-item:hover { color: var(--danger); }

.compare-tray-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Compare Table */
.compare-page { padding: 40px 0 80px; }

.compare-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 600px;
}

.compare-table th {
  background: var(--bg-card2);
  padding: 0;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 10;
}

.compare-table th:first-child {
  width: 160px;
  text-align: left;
  padding: 16px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compare-table .product-header {
  padding: 20px 16px;
  text-align: center;
}

.compare-table .product-header img {
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  margin: 0 auto 10px;
}

.compare-table .product-header .product-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  display: block;
  margin-bottom: 6px;
}

.compare-table .product-header .product-price {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--primary);
}

.compare-table .remove-product {
  display: inline-block;
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
  margin-top: 6px;
  transition: var(--transition);
}

.compare-table .remove-product:hover { color: var(--danger); }

.compare-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

.compare-table tbody tr:last-child { border-bottom: none; }
.compare-table tbody tr:hover { background: rgba(0,102,255,0.04); }

.compare-table td {
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
}

.compare-table td:first-child {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
  background: var(--bg-card2);
  white-space: nowrap;
}

.compare-table .group-header td {
  background: rgba(0,102,255,0.08);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 10px 16px;
}

.compare-table .group-header td:first-child { border-right: 1px solid var(--border); }

.compare-highlight { color: var(--success); font-weight: 700; }
.compare-low { color: var(--danger); }

/* Compare add button on card */
.btn-add-compare {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 6px 12px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-compare:hover,
.btn-add-compare.added {
  background: rgba(0,102,255,0.12);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-add-compare.added .icon { display: none; }

/* =============================================
   Section Titles
   ============================================= */
.section { padding: 60px 0; }
.section--dark { background: rgba(0,0,0,0.2); }
.section--bordered { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 1.4em;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  border-radius: 2px;
  flex-shrink: 0;
}

.section-link {
  font-size: 0.875rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.section-link:hover { color: var(--primary); }

/* =============================================
   Product Grid
   ============================================= */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-grid--3 { grid-template-columns: repeat(3, 1fr); }
.product-grid--4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1200px) {
  .product-grid--4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
  .product-grid--3,
  .product-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 540px) {
  .product-grid,
  .product-grid--3,
  .product-grid--4 { grid-template-columns: 1fr; }
}

/* =============================================
   Review Detail Page
   ============================================= */
.review-header {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 768px) {
  .review-header { grid-template-columns: 1fr; }
}

.review-gallery {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-card2);
}

.review-gallery .main-img {
  aspect-ratio: 4/3;
  width: 100%;
  object-fit: cover;
}

.review-info h1 {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
  line-height: 1.25;
}

.review-info .brand-model {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.review-price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.review-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -1px;
}

.review-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }

.review-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.review-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Pros / Cons */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 640px) { .pros-cons { grid-template-columns: 1fr; } }

.pros-box, .cons-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.pros-box { border-top: 3px solid var(--success); }
.cons-box { border-top: 3px solid var(--danger); }

.pros-box h4 { color: var(--success); font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }
.cons-box h4 { color: var(--danger); font-size: 0.85rem; font-weight: 700; margin-bottom: 10px; text-transform: uppercase; }

.pros-box li, .cons-box li {
  font-size: 0.875rem;
  color: var(--text-light);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}

.pros-box li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.cons-box li::before { content: '✕'; position: absolute; left: 0; color: var(--danger); font-weight: 700; }

/* =============================================
   Rankings
   ============================================= */
.ranking-list { display: flex; flex-direction: column; gap: 12px; }

.ranking-item {
  display: grid;
  grid-template-columns: 36px 80px 1fr auto;
  align-items: center;
  gap: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: var(--transition);
}

.ranking-item:hover {
  border-color: rgba(0,102,255,0.3);
  box-shadow: var(--shadow);
}

.rank-num {
  font-size: 1.3rem;
  font-weight: 900;
  text-align: center;
}

.rank-1 .rank-num { color: var(--gold); }
.rank-2 .rank-num { color: var(--silver); }
.rank-3 .rank-num { color: var(--bronze); }

.rank-num.normal { color: var(--text-muted); font-size: 1rem; }

.ranking-item img {
  width: 80px;
  height: 56px;
  object-fit: cover;
  border-radius: 6px;
}

.ranking-info h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.ranking-info p { font-size: 0.8rem; color: var(--text-muted); }

.ranking-score {
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--primary);
  text-align: right;
}

@media (max-width: 540px) {
  .ranking-item { grid-template-columns: 28px 60px 1fr auto; gap: 10px; }
}

/* =============================================
   Sidebar
   ============================================= */
.widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 24px;
}

.widget-title {
  background: var(--bg-card2);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-body { padding: 16px; }

/* Ad Widget */
.widget-ad {
  background: var(--bg-card2);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* =============================================
   Pagination
   ============================================= */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: #fff; }

/* =============================================
   Forms
   ============================================= */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.form-control {
  width: 100%;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: var(--font-main);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,102,255,0.15);
}

/* =============================================
   Tags & Badges
   ============================================= */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.tag-primary { background: rgba(0,102,255,0.15); color: var(--accent); border: 1px solid rgba(0,102,255,0.2); }
.tag-success { background: rgba(0,230,118,0.12); color: var(--success); border: 1px solid rgba(0,230,118,0.2); }
.tag-warning { background: rgba(255,179,0,0.12); color: var(--warning); border: 1px solid rgba(255,179,0,0.2); }
.tag-danger  { background: rgba(255,23,68,0.12); color: var(--danger); border: 1px solid rgba(255,23,68,0.2); }

/* =============================================
   Breadcrumb
   ============================================= */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 14px 0;
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text-light); }

/* =============================================
   404 Page
   ============================================= */
.error-404 {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
}

.error-404 .code {
  font-size: 8rem;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 16px;
}

.error-404 h2 { font-size: 1.8rem; margin-bottom: 12px; }
.error-404 p { color: var(--text-muted); margin-bottom: 32px; max-width: 400px; }

/* =============================================
   Footer
   ============================================= */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

.footer-brand .logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer-brand .logo span { color: var(--primary); }

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social { display: flex; gap: 10px; }

.footer-social a {
  width: 36px;
  height: 36px;
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-social a:hover { border-color: var(--primary); color: var(--primary); }

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 8px; }

.footer-col ul li a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-col ul li a:hover { color: var(--primary); padding-left: 4px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 8px;
}

/* =============================================
   Utility
   ============================================= */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }

.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* Lazy Load */
.lazy { opacity: 0; transition: opacity 0.4s ease; }
.lazy.loaded { opacity: 1; }

/* Divider */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* =============================================
   Content (Article / About)
   ============================================= */
.content-body {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-light);
}

.content-body h2 { font-size: 1.4rem; font-weight: 800; color: var(--text); margin: 32px 0 12px; }
.content-body h3 { font-size: 1.15rem; font-weight: 700; color: var(--text); margin: 24px 0 10px; }
.content-body p { margin-bottom: 16px; }
.content-body ul, .content-body ol { margin: 0 0 16px 20px; }
.content-body li { margin-bottom: 6px; }
.content-body ul li { list-style: disc; }
.content-body ol li { list-style: decimal; }
.content-body blockquote {
  border-left: 4px solid var(--primary);
  padding: 12px 20px;
  background: rgba(0,102,255,0.06);
  border-radius: 0 8px 8px 0;
  margin: 20px 0;
  font-style: italic;
  color: var(--text-light);
}

.content-body img { border-radius: var(--radius); margin: 20px 0; }
.content-body a { color: var(--primary); text-decoration: underline; text-decoration-color: rgba(0,102,255,0.3); }
.content-body a:hover { color: var(--accent); }
.content-body code {
  font-family: var(--font-mono);
  background: var(--bg-card2);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--accent);
}

/* =============================================
   Customizer / Admin Helpers
   ============================================= */
.customizer-ad-slot {
  display: block;
  width: 100%;
  overflow: hidden;
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-up { animation: fadeInUp 0.5s ease forwards; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.skeleton {
  background: var(--bg-card2);
  border-radius: var(--radius);
  animation: pulse 1.5s ease infinite;
}

/* =============================================
   Print
   ============================================= */
@media print {
  .site-header, .site-footer, .compare-tray, .sidebar { display: none; }
  body { background: #fff; color: #000; }
}
