/*
Theme Name: Chelsea Car Dealership
Theme URI: https://sitespinners.co.uk
Author: SiteSpinners
Author URI: https://sitespinners.co.uk
Description: Premium car dealership theme for Chelsea Car Dealership, built by SiteSpinners. Pairs with the Motors – Car Dealership & Classified Listings plugin for vehicle inventory, search/filter and single listing pages; degrades to static placeholder content when the plugin is inactive so the design is never broken.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Text Domain: ccd
*/

/* =========================================================
   1. Design tokens
   ========================================================= */
:root {
  --ccd-accent: #E85D26;
  --ccd-accent-hover: #CF4F1C;
  --ccd-ink: #1C1C2E;
  --ccd-dark: #141417;
  --ccd-dark-2: #23232B;
  --ccd-grey: #6B6B76;
  --ccd-grey-light: #8E8E97;
  --ccd-border: #ECECEF;
  --ccd-surface: #F7F6F3;
  --ccd-white: #FFFFFF;
  --ccd-font-heading: 'Oswald', sans-serif;
  --ccd-font-body: 'Manrope', sans-serif;
  --ccd-max: 1240px;
}

/* =========================================================
   2. Reset / base
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--ccd-font-body);
  background: var(--ccd-white);
  color: var(--ccd-ink);
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--ccd-font-heading);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: var(--ccd-font-body); cursor: pointer; }
.ccd-container { max-width: var(--ccd-max); margin: 0 auto; padding: 0 24px; }
.ccd-eyebrow {
  color: var(--ccd-accent);
  font-family: var(--ccd-font-heading);
  font-weight: 600;
  letter-spacing: 0.14em;
  font-size: 13px;
  display: inline-block;
}

/* =========================================================
   3. Buttons
   ========================================================= */
.ccd-btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 2px;
  font-weight: 700;
  font-size: 14px;
  font-family: var(--ccd-font-heading);
  letter-spacing: 0.03em;
  border: 2px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
}
.ccd-btn--primary { background: var(--ccd-accent); color: var(--ccd-white); }
.ccd-btn--primary:hover { background: var(--ccd-accent-hover); }
.ccd-btn--outline { border-color: var(--ccd-accent); color: var(--ccd-accent); background: transparent; }
.ccd-btn--outline:hover { background: var(--ccd-accent); color: var(--ccd-white); }

/* =========================================================
   4. Utility bar + header
   ========================================================= */
.ccd-utility-bar {
  background: var(--ccd-dark);
  color: #B9B9C2;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 10px 24px;
  font-size: 13px;
  gap: 12px;
}
.ccd-utility-bar .ccd-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; width: 100%; gap: 12px; padding: 0; }
.ccd-utility-left { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.ccd-utility-left a { display: flex; align-items: center; gap: 8px; }
.ccd-social { display: flex; gap: 14px; align-items: center; }
.ccd-social svg { display: block; }

.ccd-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--ccd-border);
  gap: 16px;
  max-width: var(--ccd-max);
  margin: 0 auto;
}
.ccd-logo img { height: 56px; width: auto; object-fit: contain; }
.ccd-logo { font-family: var(--ccd-font-heading); font-size: 22px; font-weight: 700; letter-spacing: 0.02em; }

.ccd-nav-toggle {
  display: none;
  background: transparent;
  border: none;
  padding: 8px;
}
.ccd-nav-toggle svg { display: block; }

.ccd-primary-nav ul {
  display: flex;
  gap: 32px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--ccd-font-heading);
  letter-spacing: 0.03em;
}
.ccd-primary-nav a:hover { color: var(--ccd-accent); }

/* =========================================================
   5. Hero
   ========================================================= */
.ccd-hero {
  position: relative;
  background: linear-gradient(135deg, #141417 0%, #23232B 55%, #3A2A1F 100%);
  padding: 80px 24px 140px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
}
.ccd-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 80% 20%, rgba(232, 93, 38, 0.18), transparent 55%);
}
.ccd-hero-inner { position: relative; max-width: 760px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.ccd-hero h1 { color: var(--ccd-white); font-size: 48px; line-height: 1.1; font-weight: 700; }
.ccd-hero p { color: #C6C6CE; font-size: 17px; max-width: 540px; line-height: 1.6; margin: 0; }

.ccd-search-card {
  position: relative;
  margin-top: 48px;
  background: var(--ccd-white);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 24px;
  width: 100%;
  max-width: 1040px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}
.ccd-search-fallback .ccd-field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 160px; min-width: 140px; text-align: left; }
.ccd-search-fallback label { font-size: 12px; font-weight: 700; color: var(--ccd-grey); font-family: var(--ccd-font-heading); letter-spacing: 0.05em; }
.ccd-search-fallback select {
  padding: 11px 10px; border: 1px solid #DDDDE2; border-radius: 4px; font-size: 14px; color: var(--ccd-ink); font-family: var(--ccd-font-body);
}
/* Motors plugin search shortcode wrapper — loosen the card padding so the plugin's own form styling has room */
.ccd-search-card .motors-search-form,
.ccd-search-card [class*="mtr-"] { width: 100%; }

/* =========================================================
   6. Trust strip
   ========================================================= */
.ccd-trust-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; padding: 48px 24px; max-width: var(--ccd-max); margin: 0 auto; }
.ccd-trust-item { text-align: center; display: flex; flex-direction: column; gap: 6px; }
.ccd-trust-item .value { font-family: var(--ccd-font-heading); font-weight: 700; font-size: 28px; color: var(--ccd-accent); }
.ccd-trust-item .label { font-size: 13px; color: var(--ccd-grey); font-weight: 600; letter-spacing: 0.02em; }

/* =========================================================
   7. Featured stock
   ========================================================= */
.ccd-stock-section { background: var(--ccd-surface); padding: 64px 24px; }
.ccd-section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.ccd-section-head h2 { font-size: 30px; margin-top: 8px; }

.ccd-vehicle-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .ccd-vehicle-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .ccd-vehicle-grid { grid-template-columns: 1fr; } }

.ccd-vehicle-card { background: var(--ccd-white); border-radius: 6px; overflow: hidden; box-shadow: 0 2px 14px rgba(20, 20, 23, 0.07); display: flex; flex-direction: column; }
.ccd-vehicle-media { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #E7E5E0, #D9D6CF); display: flex; align-items: center; justify-content: center; }
.ccd-vehicle-media img { width: 100%; height: 100%; object-fit: cover; }
.ccd-vehicle-badge { position: absolute; top: 10px; right: 10px; background: var(--ccd-accent); color: #fff; font-size: 11px; padding: 4px 10px; border-radius: 2px; font-weight: 700; font-family: var(--ccd-font-heading); letter-spacing: 0.03em; }
.ccd-vehicle-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.ccd-vehicle-body h3 { font-size: 18px; font-weight: 600; text-transform: none; }
.ccd-vehicle-trim { font-size: 13px; color: var(--ccd-grey); margin-top: 4px; }
.ccd-vehicle-specs { display: flex; gap: 12px; font-size: 12.5px; color: var(--ccd-grey); border-top: 1px solid var(--ccd-border); border-bottom: 1px solid var(--ccd-border); padding: 10px 0; flex-wrap: wrap; }
.ccd-vehicle-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.ccd-vehicle-price { font-family: var(--ccd-font-heading); font-weight: 700; font-size: 21px; }
.ccd-vehicle-footer .ccd-btn { padding: 9px 18px; font-size: 12.5px; }

/* Inventory shortcode fallback container (when Motors plugin provides its own markup) */
.ccd-inventory-shortcode .motors-listing-grid,
.ccd-inventory-shortcode [class*="mtr-"] { width: 100%; }

/* =========================================================
   8. About / why choose us
   ========================================================= */
.ccd-about { padding: 72px 24px; max-width: var(--ccd-max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.ccd-about-media { flex: 1 1 420px; min-width: 280px; aspect-ratio: 4 / 3; background: linear-gradient(135deg, var(--ccd-ink), #3A2A1F); border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.ccd-about-media img { width: 100%; height: 100%; object-fit: cover; }
.ccd-about-copy { flex: 1 1 420px; min-width: 280px; display: flex; flex-direction: column; gap: 18px; }
.ccd-about-copy h2 { font-size: 30px; line-height: 1.2; }
.ccd-about-copy p { color: var(--ccd-grey); font-size: 15.5px; line-height: 1.7; margin: 0; }
.ccd-usp-list { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.ccd-usp-item { display: flex; align-items: center; gap: 12px; }
.ccd-usp-item .tick { width: 26px; height: 26px; border-radius: 50%; background: var(--ccd-accent); display: flex; align-items: center; justify-content: center; flex: none; }
.ccd-usp-item span.text { font-size: 15px; font-weight: 600; }

/* =========================================================
   9. Testimonials
   ========================================================= */
.ccd-testimonials { background: var(--ccd-surface); padding: 64px 24px; }
.ccd-testimonials .ccd-section-head { justify-content: center; text-align: center; flex-direction: column; align-items: center; }
.ccd-review-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .ccd-review-grid { grid-template-columns: 1fr; } }
.ccd-review-card { background: var(--ccd-white); border-radius: 6px; padding: 26px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 2px 10px rgba(20, 20, 23, 0.05); }
.ccd-stars { display: flex; gap: 3px; }
.ccd-review-card p { font-size: 14.5px; color: #4A4A52; line-height: 1.6; margin: 0; }
.ccd-review-name { font-size: 13px; font-weight: 700; font-family: var(--ccd-font-heading); letter-spacing: 0.02em; }

/* =========================================================
   10. CTA banner
   ========================================================= */
.ccd-cta { background: linear-gradient(120deg, var(--ccd-dark), #2A2016); padding: 56px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.ccd-cta-copy { max-width: 520px; }
.ccd-cta-copy h2 { color: var(--ccd-white); font-size: 26px; }
.ccd-cta-copy p { color: #B9B9C2; font-size: 15px; margin-top: 10px; line-height: 1.6; }

/* =========================================================
   11. Footer
   ========================================================= */
.ccd-footer { background: var(--ccd-dark); color: #B9B9C2; padding: 48px 24px 24px; }
.ccd-footer-grid { max-width: var(--ccd-max); margin: 0 auto; display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.ccd-footer-col { flex: 1 1 200px; min-width: 180px; }
.ccd-footer-col h3 { color: var(--ccd-white); font-size: 14px; margin-bottom: 14px; letter-spacing: 0.04em; }
.ccd-footer-col ul { display: flex; flex-direction: column; gap: 10px; font-size: 13.5px; }
.ccd-footer-brand { display: flex; flex-direction: column; gap: 14px; }
.ccd-footer-brand img { height: 44px; width: auto; }
.ccd-footer-bottom { max-width: var(--ccd-max); margin: 36px auto 0; padding-top: 18px; border-top: 1px solid #27272F; font-size: 12.5px; color: #6E6E78; text-align: center; }

/* =========================================================
   12. Vehicle photo placeholder (used when a listing has no image)
   ========================================================= */
.ccd-photo-placeholder { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; color: #ABA79D; }

/* =========================================================
   13. Responsive nav (mobile)
   ========================================================= */
@media (max-width: 860px) {
  .ccd-nav-toggle { display: flex; align-items: center; justify-content: center; }
  .ccd-primary-nav { display: none; width: 100%; order: 3; }
  .ccd-primary-nav.is-open { display: block; }
  .ccd-primary-nav ul { flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px 0; }
  .ccd-header { position: relative; }
}

/* =========================================================
   14. Basic page/post content (fallback templates)
   ========================================================= */
.ccd-page-content { max-width: 860px; margin: 0 auto; padding: 56px 24px; line-height: 1.7; }
.ccd-page-content h1 { font-size: 34px; margin-bottom: 24px; text-transform: none; }
