/*
Theme Name: PLR Automotive
Theme URI: https://plrautomotive.com
Author: PLR Automotive
Author URI: https://plrautomotive.com
Description: Premium automotive specifications, reviews and comparison theme. Pairs with the AutoSpec Pro plugin, and ships with a self-contained demo mode so it works standalone. Navy + emerald design system, Saira/Mulish typography, mobile-first, AdSense-ready, built for Core Web Vitals.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.6
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: plr-automotive
Tags: automotive, custom-post-types, block-styles, translation-ready, custom-logo, editor-style
*/

/* ============================================================
   1 · DESIGN TOKENS  (ported from the PLR design system)
   ============================================================ */
:root {
  /* Navy — brand ink */
  --navy-950:#040b18; --navy-900:#0a1626; --navy-850:#0e1c30; --navy-800:#11203a;
  --navy-700:#1b2e4a; --navy-600:#2a4368; --navy-500:#3d597f; --navy-400:#5a7398;
  --navy-300:#8497b4; --navy-200:#b6c2d4; --navy-100:#dde3ec; --navy-50:#eef1f6;

  /* Accent — emerald (brand accent) */
  --acc-800:#0d6b46; --acc-700:#12784f; --acc-600:#15875a; --acc-500:#1fa871;
  --acc-400:#3dc08c; --acc-300:#6dd3aa; --acc-200:#a3e5cb; --acc-100:#d6f3e7; --acc-50:#ecfbf4;

  /* Neutral gray */
  --gray-900:#161a22; --gray-800:#232936; --gray-700:#39414f; --gray-600:#565f6e;
  --gray-500:#767f8d; --gray-400:#9aa2ae; --gray-300:#c2c8d1; --gray-200:#dde1e7;
  --gray-150:#e7eaef; --gray-100:#eff2f5; --gray-50:#f6f8fa; --white:#fff;

  /* Semantic */
  --amber-500:#f5a623; --amber-600:#c47f08;
  --bg-page:var(--gray-50); --surface:var(--white); --surface-sunken:var(--gray-100);
  --text-strong:var(--navy-900); --text-body:var(--gray-800); --text-muted:var(--gray-500);
  --text-faint:var(--gray-400);
  --border-subtle:var(--gray-200); --border-default:var(--gray-300);
  --accent:var(--acc-500); --accent-hover:var(--acc-600); --link:var(--acc-600);

  /* Type */
  --font-display:'Saira','Arial Narrow',system-ui,sans-serif;
  --font-body:'Mulish',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-mono:'Roboto Mono',ui-monospace,monospace;

  /* Radius + shadow */
  --r-sm:6px; --r-md:10px; --r-lg:14px; --r-xl:20px;
  --sh-sm:0 1px 2px rgba(4,11,24,.08);
  --sh-md:0 4px 14px rgba(4,11,24,.10);
  --sh-lg:0 12px 30px rgba(4,11,24,.14);
  --sh-xl:0 24px 60px rgba(4,11,24,.20);
  --sh-acc:0 6px 18px rgba(31,168,113,.28);

  /* Layout */
  --content:1200px; --wide:1320px; --dur:.18s;
}

/* ============================================================
   2 · BASE
   ============================================================ */
*,*::before,*::after{box-sizing:border-box;}
html{scroll-behavior:smooth;}
body{
  margin:0; background:var(--bg-page); color:var(--text-body);
  font-family:var(--font-body); font-size:16px; line-height:1.6;
  -webkit-font-smoothing:antialiased;
}
h1,h2,h3,h4,h5{font-family:var(--font-display); color:var(--text-strong); letter-spacing:-.01em; line-height:1.15; margin:0 0 .4em; font-weight:800;}
a{color:var(--link); text-decoration:none; transition:color var(--dur);}
a:hover{color:var(--accent-hover);}
img{max-width:100%; height:auto; display:block;}
p{margin:0 0 1em;}
.plr-container{width:100%; max-width:var(--content); margin:0 auto; padding:0 24px;}
.plr-data{font-family:var(--font-mono); font-variant-numeric:tabular-nums; letter-spacing:-.01em;}
.plr-eyebrow{font-family:var(--font-display); font-weight:700; font-size:12px; letter-spacing:.14em; text-transform:uppercase; color:var(--accent);}
.plr-eyebrow-line{display:flex; align-items:center; gap:10px;}
.plr-eyebrow-line::before{content:''; width:22px; height:3px; background:var(--accent); border-radius:2px;}
.section{padding:72px 0;}
.section--alt{background:var(--white); border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle);}
.skip-link{position:absolute; left:-9999px;}
.skip-link:focus{left:12px; top:12px; z-index:999; background:var(--navy-900); color:#fff; padding:10px 16px; border-radius:8px;}
:focus-visible{outline:3px solid var(--acc-300); outline-offset:2px;}

/* ============================================================
   3 · BUTTONS + BADGES
   ============================================================ */
.btn{display:inline-flex; align-items:center; gap:8px; font-family:var(--font-display); font-weight:700; font-size:14px; padding:11px 18px; border-radius:var(--r-md); border:1.5px solid transparent; cursor:pointer; transition:all var(--dur); white-space:nowrap; line-height:1;}
.btn--primary{background:var(--accent); color:#fff; box-shadow:var(--sh-acc);}
.btn--primary:hover{background:var(--accent-hover); color:#fff;}
.btn--ghost{background:transparent; border-color:var(--border-default); color:var(--text-strong);}
.btn--ghost:hover{border-color:var(--accent); color:var(--accent);}
.btn--dark{background:rgba(255,255,255,.08); border-color:rgba(255,255,255,.2); color:#fff;}
.btn--sm{padding:8px 13px; font-size:13px;}
.badge{display:inline-flex; align-items:center; gap:5px; font-family:var(--font-display); font-weight:700; font-size:11px; letter-spacing:.03em; text-transform:uppercase; padding:3px 9px; border-radius:999px; line-height:1.4;}
.badge--accent{background:var(--accent); color:#fff;}
.badge--navy{background:var(--navy-50); color:var(--navy-700);}
.badge--soft{background:var(--acc-50); color:var(--acc-700);}
.badge--amber{background:var(--amber-500); color:#fff;}

/* ============================================================
   4 · HEADER
   ============================================================ */
.site-header{position:sticky; top:0; z-index:50;}
.topbar{background:var(--navy-900); color:var(--navy-200); font-size:12.5px; border-bottom:1px solid var(--navy-800);}
.topbar .plr-container{height:38px; display:flex; align-items:center; justify-content:space-between;}
.topbar .dot{width:7px; height:7px; border-radius:50%; background:var(--acc-500); display:inline-block; margin-right:7px; box-shadow:0 0 0 3px rgba(31,168,113,.25);}
.topbar a{color:var(--navy-200); font-weight:600;}
.topbar a:hover{color:#fff;}
.topbar-links{display:flex; gap:20px;}
.header-bar{background:var(--surface); border-bottom:1px solid var(--border-subtle);}
.header-bar .plr-container{height:76px; display:flex; align-items:center; gap:18px;}
.site-logo img{height:50px; width:auto;}
.site-logo .logo-plate{display:inline-flex; align-items:center; background:#0b0b0d; border-radius:10px; padding:7px 13px; box-shadow:var(--sh-sm);}
.site-logo .logo-plate img{height:38px; width:auto; display:block;}
.site-logo .wordmark{font-family:var(--font-display); font-weight:800; font-size:26px; color:var(--navy-900); letter-spacing:-.02em;}
.site-logo .wordmark span{color:var(--accent);}
.main-nav{display:flex; align-items:center; gap:2px; margin-left:8px;}
.main-nav > li{list-style:none; position:static;}
.main-nav > li > a{display:inline-flex; align-items:center; gap:5px; height:76px; padding:0 13px; font-family:var(--font-display); font-weight:700; font-size:15px; color:var(--text-strong);}
.main-nav > li > a:hover{color:var(--accent);}
.main-nav .sub-menu{display:none;}
.header-actions{margin-left:auto; display:flex; align-items:center; gap:10px;}
.icon-btn{width:40px; height:40px; border-radius:var(--r-md); display:inline-flex; align-items:center; justify-content:center; background:var(--surface-sunken); color:var(--text-strong); border:1px solid var(--border-subtle); cursor:pointer;}
.icon-btn:hover{border-color:var(--accent); color:var(--accent);}
.burger{display:none;}

/* ============================================================
   5 · HERO
   ============================================================ */
.hero{position:relative; background:var(--navy-900); color:#fff; overflow:hidden;}
.hero__glow{position:absolute; inset:0; background:radial-gradient(1100px 500px at 78% -10%,rgba(31,168,113,.30),transparent 60%),radial-gradient(700px 400px at 5% 110%,rgba(31,168,113,.12),transparent 60%);}
.hero .plr-container{position:relative; padding:80px 24px;}
.hero__grid{display:grid; grid-template-columns:1.05fr .95fr; gap:64px; align-items:center;}
.hero h1{font-size:clamp(2.6rem,1.4rem+4vw,4rem); line-height:1.02; color:#fff; margin:0; text-wrap:balance;}
.hero h1 .accent{color:var(--acc-400);}
.hero__eyebrow{color:var(--acc-400);}
.hero__eyebrow.plr-eyebrow-line::before{background:var(--acc-500);}
.hero p.lede{color:var(--navy-200); font-size:1.125rem; max-width:480px; margin:18px 0 26px;}
.hero__search{display:flex; align-items:center; gap:10px; background:#fff; border-radius:var(--r-lg); padding:7px 7px 7px 16px; box-shadow:var(--sh-xl); max-width:540px;}
.hero__search input{flex:1; border:0; outline:0; font-family:var(--font-body); font-size:16px; color:var(--navy-900); background:transparent; min-width:0;}
.hero__chips{display:flex; flex-wrap:wrap; gap:8px; margin-top:16px; align-items:center;}
.hero__chips .lbl{font-size:12.5px; color:var(--navy-300); font-weight:600;}
.hero__chips a{font-size:13px; font-weight:600; color:#fff; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.16); padding:6px 12px; border-radius:999px;}
.hero__chips a:hover{background:var(--accent); border-color:var(--accent); color:#fff;}
.hero__stats{display:flex; gap:40px; margin-top:32px; flex-wrap:wrap;}
.hero__stats .n{font-family:var(--font-mono); font-size:24px; font-weight:600; color:#fff; line-height:1;}
.hero__stats .l{font-size:12px; color:var(--navy-300); margin-top:5px; font-weight:600;}
.hero__card{background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.12); border-radius:var(--r-xl); padding:14px; box-shadow:var(--sh-xl);}
.hero__card .ph{width:100%; height:240px; border-radius:12px; background:rgba(255,255,255,.06); display:flex; align-items:center; justify-content:center; color:var(--navy-300); font-size:13px;}

/* ============================================================
   6 · SECTION HEADS + GRIDS
   ============================================================ */
.sec-head{display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap; margin-bottom:32px;}
.sec-head h2{font-size:clamp(1.6rem,1.1rem+1.6vw,2.1rem); margin:8px 0 0;}
.sec-head .sub{margin:8px 0 0; color:var(--text-muted); max-width:560px;}
.sec-head .more{display:inline-flex; align-items:center; gap:7px; color:var(--text-strong); font-family:var(--font-display); font-weight:700; font-size:14px;}
.sec-head .more:hover{color:var(--accent);}
.grid-cards{display:grid; grid-template-columns:repeat(auto-fill,minmax(265px,1fr)); gap:24px;}
.grid-brands{display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:16px;}

/* ============================================================
   7 · VEHICLE CARD
   ============================================================ */
.vcard{background:var(--surface); border:1px solid var(--border-subtle); border-radius:var(--r-lg); overflow:hidden; display:flex; flex-direction:column; transition:transform var(--dur),box-shadow var(--dur),border-color var(--dur);}
.vcard:hover{transform:translateY(-3px); box-shadow:var(--sh-lg); border-color:var(--border-default);}
.vcard__media{position:relative; height:188px; background:var(--surface-sunken);}
.vcard__media img{width:100%; height:100%; object-fit:cover;}
.vcard__media .ph{width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:var(--text-faint); font-size:13px; font-family:var(--font-display); font-weight:700;}
.vcard__tag{position:absolute; top:10px; left:10px;}
.vcard__body{padding:16px; display:flex; flex-direction:column; gap:12px; flex:1;}
.vcard__brand{font-size:11px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--text-muted);}
.vcard__name{font-size:1.25rem; margin:2px 0 0;}
.vcard__chips{display:flex; gap:6px; margin-top:8px;}
.vcard__specs{display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; padding:12px 0; border-top:1px solid var(--border-subtle); border-bottom:1px solid var(--border-subtle);}
.vcard__specs .k{font-size:11px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--text-faint); display:block;}
.vcard__specs .v{font-family:var(--font-mono); font-size:14px; font-weight:600; color:var(--text-strong);}
.vcard__foot{display:flex; align-items:flex-end; justify-content:space-between; gap:10px; margin-top:auto;}
.vcard__price .lbl{font-size:11px; color:var(--text-faint); text-transform:uppercase; letter-spacing:.06em; font-weight:700;}
.vcard__price .amt{font-family:var(--font-mono); font-size:19px; font-weight:600; color:var(--text-strong); line-height:1.1;}

/* ============================================================
   8 · BRAND TILES + AD SLOTS
   ============================================================ */
.brand-tile{display:flex; align-items:center; justify-content:center; height:76px; background:var(--surface); border:1px solid var(--border-subtle); border-radius:var(--r-md); font-family:var(--font-display); font-weight:700; font-size:15px; color:var(--text-strong); text-align:center; padding:0 10px;}
.brand-tile:hover{border-color:var(--acc-300); transform:translateY(-2px); box-shadow:var(--sh-md); color:var(--text-strong);}
.ad-slot{width:100%; min-height:100px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; background:var(--surface-sunken); background-image:repeating-linear-gradient(135deg,var(--surface-sunken),var(--surface-sunken) 12px,transparent 12px,transparent 24px); border:1px dashed var(--border-default); border-radius:var(--r-md); color:var(--text-faint);}
.ad-slot .t{font-family:var(--font-display); font-weight:700; font-size:10.5px; letter-spacing:.18em; text-transform:uppercase;}
.ad-slot .s{font-size:11px; font-family:var(--font-mono);}
.ad-sticky{position:fixed; left:0; right:0; bottom:0; z-index:70; display:none; justify-content:center; padding:8px; background:var(--surface); border-top:1px solid var(--border-subtle); box-shadow:0 -6px 20px rgba(4,11,24,.12);}
.ad-sticky .unit{width:100%; max-width:360px; height:56px; }

/* ============================================================
   9 · SINGLE VEHICLE
   ============================================================ */
.v-hero{background:var(--navy-900); color:#fff; padding:36px 0;}
.v-hero__grid{display:grid; grid-template-columns:1.2fr .8fr; gap:32px; align-items:center;}
.v-gallery{border-radius:var(--r-lg); overflow:hidden;}
.v-gallery .main{height:360px; background:rgba(255,255,255,.06); border-radius:var(--r-lg); display:flex; align-items:center; justify-content:center; color:var(--navy-300);}
.spec-tabs{display:flex; gap:2px; border-bottom:1px solid var(--border-subtle); overflow-x:auto; margin:24px 0;}
.spec-tabs button{padding:12px 16px; border:0; border-bottom:2.5px solid transparent; background:transparent; cursor:pointer; font-family:var(--font-display); font-weight:700; font-size:14px; color:var(--text-muted); white-space:nowrap; margin-bottom:-1px;}
.spec-tabs button.on{color:var(--text-strong); border-bottom-color:var(--accent);}
.spec-table{width:100%; border-collapse:collapse;}
.spec-table th{text-align:left; padding:11px 14px; background:var(--surface-sunken); font-family:var(--font-display); font-size:13px; color:var(--text-strong); width:40%;}
.spec-table td{padding:11px 14px; border-bottom:1px solid var(--border-subtle); font-family:var(--font-mono); font-size:14px; color:var(--text-body);}
.body-grid{display:grid; grid-template-columns:1fr 320px; gap:32px; align-items:start;}
.side-sticky{position:sticky; top:96px; display:flex; flex-direction:column; gap:20px;}

/* ============================================================
   10 · ARCHIVE + FILTERS
   ============================================================ */
.vlist-grid{display:grid; grid-template-columns:260px 1fr; gap:32px; align-items:start;}
.vlist-side{position:sticky; top:92px; display:flex; flex-direction:column; gap:16px;}
.filter-card{background:var(--surface); border:1px solid var(--border-subtle); border-radius:var(--r-lg); padding:18px 20px;}
.filter-group{border-top:1px solid var(--border-subtle); padding:14px 0;}
.filter-group:first-child{border-top:0; padding-top:0;}
.filter-group h4{font-size:13px; margin:0 0 10px; text-transform:uppercase; letter-spacing:.04em; color:var(--text-muted);}
.filter-opt{display:flex; align-items:center; gap:9px; padding:5px 0; font-size:14px; cursor:pointer;}
.filter-toggle{display:none;}
.toolbar{display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-bottom:20px;}
.result-count strong{color:var(--text-strong);}

/* ============================================================
   11 · FOOTER
   ============================================================ */
.site-footer{background:var(--navy-950); color:var(--navy-200); padding-top:72px;}
.footer-grid{display:grid; grid-template-columns:1.4fr repeat(4,1fr); gap:24px; padding-bottom:48px;}
.site-footer h4{color:#fff; font-size:12px; letter-spacing:.1em; text-transform:uppercase; margin:0 0 14px;}
.site-footer a{color:var(--navy-300);}
.site-footer a:hover{color:#fff;}
.footer-col ul{list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:9px; font-size:13.5px;}
.footer-about p{font-size:13.5px; color:var(--navy-300); max-width:280px;}
.footer-bar{border-top:1px solid var(--navy-800); padding:20px 0 28px; display:flex; justify-content:space-between; align-items:center; gap:14px; flex-wrap:wrap; font-size:12.5px; color:var(--navy-400);}
.footer-legal{display:flex; gap:18px;}

/* ============================================================
   12 · MOBILE DRAWERS + RESPONSIVE
   ============================================================ */
.scrim{position:fixed; inset:0; background:rgba(4,11,24,.5); z-index:99; display:none;}
.scrim.open{display:block;}
.drawer{position:fixed; top:0; bottom:0; width:min(340px,86vw); background:var(--surface); z-index:100; padding:20px; overflow-y:auto; transition:transform var(--dur);}
.drawer--right{right:0; transform:translateX(100%);}
.drawer--left{left:0; transform:translateX(-100%);}
.drawer.open{transform:translateX(0);}
.drawer h4{font-size:16px; margin:0 0 8px;}
.drawer .m-nav{list-style:none; padding:0; margin:0;}
.drawer .m-nav > li{padding:10px 0; border-bottom:1px solid var(--border-subtle);}
.drawer .m-nav a{font-family:var(--font-display); font-weight:700; font-size:16px; color:var(--text-strong);}

@media (max-width:1080px){
  .main-nav{display:none;} .burger{display:inline-flex;} .header-cta{display:none;} .topbar-links{display:none;}
  .body-grid{grid-template-columns:1fr;} .side-sticky{position:static;}
  .v-hero__grid{grid-template-columns:1fr;}
}
@media (max-width:940px){
  .hero__grid{grid-template-columns:1fr;} .hero__card{display:none;}
  .footer-grid{grid-template-columns:1fr 1fr 1fr;}
}
@media (max-width:900px){
  .vlist-grid{grid-template-columns:1fr;} .vlist-side{display:none;} .filter-toggle{display:inline-flex;}
}
@media (max-width:768px){ .ad-sticky{display:flex;} }
@media (max-width:640px){
  .section{padding:48px 0;} .hero .plr-container{padding:44px 24px;}
  .hero__stats{gap:22px;} .footer-grid{grid-template-columns:1fr 1fr;}
  .vcard__specs{grid-template-columns:1fr 1fr;}
}
