/*
Theme Name: CarDekho Portal
Theme URI: https://carreview.atmindicator.com/
Author: Antigravity Automotive
Description: Pixel-perfect, high-performance automotive review, multi-car comparison, and blog theme inspired by CarDekho. Built for speed, mobile responsiveness, and Google AdSense monetization.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: cardekho-portal
*/

:root {
  --cd-orange: #f34723;
  --cd-orange-hover: #d63613;
  --cd-dark: #1e293b;
  --cd-gray: #64748b;
  --cd-light: #f8fafc;
  --cd-border: #e2e8f0;
  --cd-green: #15803d;
  --cd-red: #b91c1c;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--cd-dark);
  background-color: #f1f5f9;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }

.cd-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.cd-header {
  background: #ffffff;
  border-bottom: 1px solid var(--cd-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.cd-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}

.cd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  font-weight: 900;
  color: var(--cd-dark);
  letter-spacing: -0.5px;
}

.cd-brand span { color: var(--cd-orange); }

.cd-search-bar {
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid var(--cd-border);
  border-radius: 9999px;
  padding: 8px 18px;
  width: 460px;
}

.cd-search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 14px;
  color: var(--cd-dark);
}

.cd-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

/* Nav Menu */
.cd-nav-menu {
  display: flex;
  gap: 20px;
  padding: 12px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 14px;
  font-weight: 700;
  overflow-x: auto;
}

.cd-nav-menu a {
  color: #334155;
  transition: all 0.2s;
  white-space: nowrap;
}

.cd-nav-menu a:hover, .cd-nav-menu a.active {
  color: var(--cd-orange);
  border-bottom: 2px solid var(--cd-orange);
  padding-bottom: 4px;
}

/* Ad Banner Styles */
.cd-ad-banner {
  background: repeating-linear-gradient(45deg, #fffbeb, #fffbeb 10px, #fef3c7 10px, #fef3c7 20px);
  border: 2px dashed #f59e0b;
  border-radius: 12px;
  padding: 14px;
  margin: 20px auto;
  text-align: center;
  color: #92400e;
}

.cd-ad-banner .ad-tag {
  background: #f59e0b;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 4px;
}

/* Hero Section */
.cd-hero {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 24px;
  margin: 24px 0;
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--cd-border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.cd-filter-card {
  padding: 24px;
  background: #ffffff;
  border-right: 1px solid var(--cd-border);
}

.cd-filter-card h2 {
  margin: 0 0 16px 0;
  font-size: 20px;
  font-weight: 800;
}

.cd-tab-buttons {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.cd-btn-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--cd-border);
  background: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.cd-btn-tab.active {
  background: var(--cd-dark);
  color: #ffffff;
  border-color: var(--cd-dark);
}

.cd-select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--cd-border);
  margin-bottom: 14px;
  font-size: 14px;
  background: #f8fafc;
  outline: none;
}

.cd-btn-search {
  width: 100%;
  background: var(--cd-orange);
  color: #ffffff;
  border: none;
  padding: 12px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s;
}

.cd-btn-search:hover { background: var(--cd-orange-hover); }

.cd-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cd-hero-content { max-width: 55%; }

.cd-badge-launch {
  background: var(--cd-orange);
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 10px;
}

.cd-hero-content h1 {
  font-size: 28px;
  font-weight: 900;
  margin: 0 0 10px 0;
  line-height: 1.2;
}

.cd-hero-content p {
  color: #cbd5e1;
  font-size: 14px;
  margin: 0 0 20px 0;
}

.cd-hero-img img {
  max-width: 320px;
  border-radius: 12px;
  filter: drop-shadow(0 15px 25px rgba(0,0,0,0.5));
}

/* Category Filter Pills */
.cd-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 32px 0 16px 0;
}

.cd-section-header h2 { font-size: 22px; font-weight: 800; margin: 0; }

.cd-category-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.cd-cat-tab {
  padding: 8px 18px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--cd-border);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.cd-cat-tab.active, .cd-cat-tab:hover {
  background: var(--cd-orange);
  color: #ffffff;
  border-color: var(--cd-orange);
}

/* Car Cards Grid */
.cd-car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.cd-car-card {
  background: #ffffff;
  border: 1px solid var(--cd-border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cd-car-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.08);
}

.cd-card-img-wrap {
  height: 180px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  position: relative;
}

.cd-card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.3s;
}

.cd-car-card:hover .cd-card-img-wrap img {
  transform: scale(1.04);
}

.cd-card-tag {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(30, 41, 59, 0.9);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cd-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cd-card-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--cd-dark);
}

.cd-card-price {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 8px;
}

.cd-card-meta {
  font-size: 13px;
  color: var(--cd-gray);
  margin-bottom: 16px;
  line-height: 1.4;
}

.cd-card-footer { margin-top: auto; }

.cd-btn-offer {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 0;
  border: 1px solid var(--cd-orange);
  color: var(--cd-orange);
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  transition: all 0.2s;
}

.cd-btn-offer:hover {
  background: var(--cd-orange);
  color: #ffffff;
}

/* Single Review Page Styles */
.cd-review-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  margin: 24px 0;
}

.cd-review-main {
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid var(--cd-border);
  padding: 24px;
}

.cd-review-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cd-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 14px;
}

.cd-specs-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
}

.cd-specs-table td:first-child {
  color: var(--cd-gray);
  font-weight: 600;
  width: 35%;
}

.cd-specs-table td:last-child {
  font-weight: 700;
  color: var(--cd-dark);
}

.cd-pros-box {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.cd-cons-box {
  background: #fef2f2;
  border-left: 4px solid #ef4444;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 20px;
}

/* Footer */
.cd-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 0 20px 0;
  margin-top: 50px;
  font-size: 14px;
}

.cd-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

.cd-footer h4 { color: #ffffff; margin-top: 0; margin-bottom: 14px; }
.cd-footer ul { list-style: none; padding: 0; margin: 0; }
.cd-footer li { margin-bottom: 8px; }
.cd-footer a { color: #94a3b8; transition: color 0.2s; }
.cd-footer a:hover { color: #ffffff; }

.cd-copyright {
  border-top: 1px solid #1e293b;
  padding-top: 20px;
  text-align: center;
  font-size: 12px;
}

@media (max-width: 1024px) {
  .cd-car-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-hero { grid-template-columns: 1fr; }
  .cd-review-layout { grid-template-columns: 1fr; }
  .cd-search-bar { display: none; }
  .cd-footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .cd-car-grid { grid-template-columns: 1fr; }
}
