/*
Theme Name: CarDekho Portal
Theme URI: https://tataevcars.com/
Author: Antigravity Automotive
Description: 100% Fully Responsive (Mobile, Tablet, Desktop) SVG Automotive Review Theme.
Version: 1.2.0
License: GNU General Public License v2 or later
Text Domain: cardekho-portal
*/

:root {
  --cd-orange: #f34723;
  --cd-orange-hover: #d63613;
  --cd-dark: #0f172a;
  --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: #f8fafc;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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 2px 8px rgba(0,0,0,0.04);
}

.cd-nav-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}

.cd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 900;
  color: var(--cd-dark);
  letter-spacing: -0.5px;
}

.cd-logo-icon {
  background: var(--cd-orange);
  color: #ffffff;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(243, 71, 35, 0.3);
}

.cd-brand span { color: var(--cd-orange); }

.cd-search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f1f5f9;
  border: 1px solid var(--cd-border);
  border-radius: 9999px;
  padding: 7px 16px;
  width: 440px;
}

.cd-search-bar input {
  border: none;
  background: transparent;
  width: 100%;
  outline: none;
  font-size: 13px;
  color: var(--cd-dark);
}

.cd-user-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.cd-mobile-search-wrap { display: none; margin-bottom: 8px; }

/* Nav Menu */
.cd-nav-menu {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid #f1f5f9;
  font-size: 13px;
  font-weight: 700;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cd-nav-menu::-webkit-scrollbar { display: none; }

.cd-nav-menu a {
  color: #334155;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
}

.cd-nav-menu a:hover, .cd-nav-menu a.active {
  color: var(--cd-orange);
  background: #fff7ed;
}

/* Ad Banner */
.cd-ad-banner {
  background: repeating-linear-gradient(45deg, #fffbeb, #fffbeb 10px, #fef3c7 10px, #fef3c7 20px);
  border: 1px dashed #f59e0b;
  border-radius: 10px;
  padding: 12px;
  margin: 16px auto;
  text-align: center;
  color: #92400e;
}

.cd-ad-banner .ad-tag {
  background: #f59e0b;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 2px;
}

/* Hero Section */
.cd-hero {
  display: grid;
  grid-template-columns: 350px 1fr;
  gap: 20px;
  margin: 20px 0;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--cd-border);
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}

.cd-filter-card {
  padding: 20px;
  background: #ffffff;
  border-right: 1px solid var(--cd-border);
}

.cd-filter-card h2 {
  margin: 0 0 14px 0;
  font-size: 18px;
  font-weight: 800;
}

.cd-tab-buttons {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.cd-btn-tab {
  flex: 1;
  padding: 8px;
  border: 1px solid var(--cd-border);
  background: #ffffff;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
}

.cd-btn-tab.active {
  background: var(--cd-dark);
  color: #ffffff;
  border-color: var(--cd-dark);
}

.cd-select {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid var(--cd-border);
  margin-bottom: 12px;
  font-size: 13px;
  background: #f8fafc;
  outline: none;
}

.cd-btn-search {
  width: 100%;
  background: var(--cd-orange);
  color: #ffffff;
  border: none;
  padding: 11px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s;
}

.cd-btn-search:hover { background: var(--cd-orange-hover); }

.cd-hero-banner {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cd-hero-content { max-width: 58%; }

.cd-badge-launch {
  background: var(--cd-orange);
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 8px;
}

.cd-hero-content h1 {
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 8px 0;
  line-height: 1.25;
}

.cd-hero-content p {
  color: #cbd5e1;
  font-size: 13px;
  margin: 0 0 16px 0;
}

.cd-hero-img img {
  max-width: 280px;
  border-radius: 10px;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.5));
}

/* Category Filter Pills */
.cd-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 24px 0 14px 0;
  flex-wrap: wrap;
  gap: 8px;
}

.cd-section-header h2 { font-size: 20px; font-weight: 800; margin: 0; }

.cd-category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cd-category-tabs::-webkit-scrollbar { display: none; }

.cd-cat-tab {
  padding: 8px 16px;
  border-radius: 9999px;
  background: #ffffff;
  border: 1px solid var(--cd-border);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #334155;
}

.cd-cat-tab.active, .cd-cat-tab:hover {
  background: var(--cd-orange) !important;
  color: #ffffff !important;
  border-color: var(--cd-orange) !important;
}
.cd-cat-tab.active svg, .cd-cat-tab:hover svg {
  stroke: #ffffff;
}

/* Car Cards Grid */
.cd-car-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.cd-car-card {
  background: #ffffff;
  border: 1px solid var(--cd-border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cd-car-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

.cd-card-img-wrap {
  height: 165px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  position: relative;
}

.cd-card-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.cd-card-tag {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-size: 9px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.cd-card-body {
  padding: 14px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cd-card-title {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 6px 0;
  color: var(--cd-dark);
  line-height: 1.3;
}

.cd-card-price {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
}

.cd-card-meta {
  font-size: 12px;
  color: var(--cd-gray);
  margin-bottom: 12px;
  line-height: 1.4;
}

.cd-card-footer { margin-top: auto; }

.cd-btn-offer {
  display: block;
  width: 100%;
  text-align: center;
  padding: 9px 0;
  border: 1px solid var(--cd-orange);
  color: var(--cd-orange);
  border-radius: 6px;
  font-weight: 700;
  font-size: 12px;
  transition: all 0.15s;
}

.cd-btn-offer:hover {
  background: var(--cd-orange);
  color: #ffffff;
}

/* Single Review Page */
.cd-review-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 20px;
  margin: 20px 0;
}

.cd-review-main {
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid var(--cd-border);
  padding: 20px;
}

.cd-review-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cd-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 13px;
}

.cd-specs-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.cd-specs-table td:first-child {
  color: var(--cd-gray);
  font-weight: 600;
  width: 40%;
}

.cd-specs-table td:last-child {
  font-weight: 700;
  color: var(--cd-dark);
}

/* Footer */
.cd-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 36px 0 20px 0;
  margin-top: 40px;
  font-size: 13px;
}

.cd-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.cd-footer h4 { color: #ffffff; margin-top: 0; margin-bottom: 12px; font-size: 15px; }
.cd-footer ul { list-style: none; padding: 0; margin: 0; }
.cd-footer li { margin-bottom: 6px; }
.cd-footer a { color: #94a3b8; transition: color 0.15s; }
.cd-footer a:hover { color: #ffffff; }

.cd-copyright {
  border-top: 1px solid #1e293b;
  padding-top: 16px;
  text-align: center;
  font-size: 11px;
}

/* ================================================================ */
/* RESPONSIVE BREAKPOINTS (Tablets & Mobile Phones)                 */
/* ================================================================ */

/* Tablet (iPad / 768px - 1024px) */
@media (max-width: 1024px) {
  .cd-car-grid { grid-template-columns: repeat(2, 1fr); }
  .cd-hero { grid-template-columns: 1fr; }
  .cd-filter-card { border-right: none; border-bottom: 1px solid var(--cd-border); }
  .cd-review-layout { grid-template-columns: 1fr; }
  .cd-search-bar { width: 320px; }
  .cd-footer-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile Phones (< 640px) */
@media (max-width: 640px) {
  .cd-desktop-only { display: none !important; }
  .cd-search-bar { display: none; }
  .cd-mobile-search-wrap { display: block; }
  .cd-car-grid { grid-template-columns: 1fr; }
  .cd-hero-banner { flex-direction: column; text-align: center; padding: 20px; }
  .cd-hero-content { max-width: 100%; margin-bottom: 16px; }
  .cd-hero-img img { max-width: 220px; }
  .cd-footer-grid { grid-template-columns: 1fr; gap: 20px; }
  .cd-brand { font-size: 19px; }
  .cd-section-header h2 { font-size: 17px; }
}
