/*
Theme Name: OzCarSpares
Theme URI: https://ozcarspares.com.au
Author: OzCarSpares
Description: A clean, fast, blog-first theme for OzCarSpares — Australia's used car parts guide. No page builder or paid plugins required. Write posts in the standard WordPress editor and they appear styled automatically. Includes a built-in quote-request form.
Version: 1.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: ozcarspares
*/

/* =========================================================================
   1. DESIGN TOKENS  (OzCarSpares brand)
   ========================================================================= */
:root {
  --ozcs-navy: #091c3d;
  --ozcs-blue: #1769e0;
  --ozcs-blue-dark: #1257be;
  --ozcs-green: #16834a;
  --ozcs-green-dark: #106a3b;
  --ozcs-orange: #f28c28;          /* conversion only — always navy text */
  --ozcs-orange-light: #f9a85a;
  --ozcs-red: #d92d3a;
  --ozcs-red-dark: #b21f2b;
  --ozcs-text: #172033;
  --ozcs-text-2: #5f6878;
  --ozcs-bg: #f5f7fa;
  --ozcs-border: #dce2e8;
  --ozcs-white: #ffffff;
  --ozcs-blue-tint: #e8f0fc;
  --ozcs-green-tint: #e7f3ed;
  --ozcs-orange-tint: #fdf1e4;
  --ozcs-red-tint: #fbeaec;

  --ozcs-font-head: "Manrope", "Poppins", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --ozcs-font-body: "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, Arial, sans-serif;

  --ozcs-container: 1180px;
  --ozcs-article: 760px;
  --ozcs-radius: 10px;
  --ozcs-radius-sm: 6px;
}

/* =========================================================================
   2. RESET & BASE
   ========================================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ozcs-font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ozcs-text);
  background: var(--ozcs-bg);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ozcs-blue); text-decoration: none; }
a:hover { color: var(--ozcs-blue-dark); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--ozcs-font-head); color: var(--ozcs-navy); line-height: 1.25; }

.ozcs-container {
  width: 100%;
  max-width: var(--ozcs-container);
  margin: 0 auto;
  padding: 0 20px;
}

/* Skip link for accessibility */
.ozcs-skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ozcs-navy); color: #fff; padding: 12px 18px; z-index: 1000;
}
.ozcs-skip:focus { left: 8px; top: 8px; }

/* =========================================================================
   3. HEADER
   ========================================================================= */
.ozcs-header {
  background: var(--ozcs-white);
  border-bottom: 1px solid var(--ozcs-border);
  position: sticky; top: 0; z-index: 100;
}
.ozcs-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 68px;
}
.ozcs-logo {
  font-family: var(--ozcs-font-head);
  font-weight: 800; font-size: 1.35rem; color: var(--ozcs-navy);
  text-decoration: none; letter-spacing: -0.02em;
}
.ozcs-logo:hover { text-decoration: none; color: var(--ozcs-navy); }
.ozcs-logo span { color: var(--ozcs-blue); }

.ozcs-nav { display: flex; align-items: center; gap: 4px; }
.ozcs-nav a {
  display: inline-block; padding: 9px 14px; color: var(--ozcs-text);
  font-weight: 600; font-size: 0.95rem; border-radius: var(--ozcs-radius-sm);
}
.ozcs-nav a:hover { background: var(--ozcs-bg); color: var(--ozcs-navy); text-decoration: none; }
.ozcs-nav .ozcs-nav__cta {
  background: var(--ozcs-orange); color: var(--ozcs-navy); font-weight: 700; margin-left: 6px;
}
.ozcs-nav .ozcs-nav__cta:hover { background: var(--ozcs-orange-light); color: var(--ozcs-navy); }

/* Mobile menu toggle */
.ozcs-menu-toggle {
  display: none; background: none; border: 1px solid var(--ozcs-border);
  border-radius: var(--ozcs-radius-sm); padding: 8px 10px; cursor: pointer;
  color: var(--ozcs-navy);
}
.ozcs-menu-toggle svg { display: block; }

@media (max-width: 860px) {
  .ozcs-menu-toggle { display: inline-flex; }
  .ozcs-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ozcs-white); border-bottom: 1px solid var(--ozcs-border);
    padding: 8px 20px 16px; box-shadow: 0 8px 20px rgba(9,28,61,0.08);
  }
  .ozcs-nav.is-open { display: flex; }
  .ozcs-nav a { padding: 12px 8px; border-radius: 0; }
  .ozcs-nav .ozcs-nav__cta { margin: 8px 0 0; text-align: center; }
}

/* =========================================================================
   4. LAYOUT — content + sidebar
   ========================================================================= */
.ozcs-main { padding: 32px 0 56px; }
.ozcs-layout {
  display: grid; gap: 40px; align-items: start;
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .ozcs-layout { grid-template-columns: minmax(0, 1fr) 320px; }
}
.ozcs-sidebar { display: grid; gap: 24px; }
@media (min-width: 1000px) {
  .ozcs-sidebar { position: sticky; top: 92px; }
}

/* =========================================================================
   5. POST CARDS (blog/archive/home)
   ========================================================================= */
.ozcs-pagetitle {
  margin: 0 0 24px; font-size: clamp(1.6rem, 1.3rem + 1.4vw, 2.2rem);
}
.ozcs-pagetitle__eyebrow {
  display: block; font-family: var(--ozcs-font-body); font-size: 0.8rem;
  font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--ozcs-blue); margin-bottom: 6px;
}

.ozcs-cards { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 620px) { .ozcs-cards { grid-template-columns: 1fr 1fr; } }

.ozcs-card {
  display: flex; flex-direction: column; background: var(--ozcs-white);
  border: 1px solid var(--ozcs-border); border-radius: var(--ozcs-radius);
  overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.ozcs-card:hover { box-shadow: 0 10px 26px rgba(9,28,61,0.09); transform: translateY(-2px); }
.ozcs-card__media { aspect-ratio: 16/9; background: var(--ozcs-blue-tint); overflow: hidden; }
.ozcs-card__media img { width: 100%; height: 100%; object-fit: cover; }
.ozcs-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.ozcs-card__cat {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ozcs-blue);
}
.ozcs-card__title { margin: 0; font-size: 1.2rem; }
.ozcs-card__title a { color: var(--ozcs-navy); }
.ozcs-card__title a:hover { color: var(--ozcs-blue); text-decoration: none; }
.ozcs-card__excerpt { margin: 0; font-size: 0.95rem; color: var(--ozcs-text-2); }
.ozcs-card__meta {
  margin-top: auto; padding-top: 6px; font-size: 0.82rem; color: var(--ozcs-text-2);
}

/* =========================================================================
   6. SINGLE POST / PAGE (the article view)
   ========================================================================= */
.ozcs-article {
  background: var(--ozcs-white); border: 1px solid var(--ozcs-border);
  border-radius: var(--ozcs-radius); padding: clamp(22px, 4vw, 44px);
}
.ozcs-article__header { margin-bottom: 24px; }
.ozcs-article__cat {
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--ozcs-blue);
}
.ozcs-article__title { margin: 6px 0 12px; font-size: clamp(1.6rem, 1.3rem + 1.6vw, 2.3rem); }
.ozcs-article__meta {
  font-size: 0.9rem; color: var(--ozcs-text-2);
  display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center;
}
.ozcs-article__thumb { margin: 0 0 26px; border-radius: var(--ozcs-radius); overflow: hidden; }

/* The actual post content — styles whatever you write in the editor */
.ozcs-content { max-width: var(--ozcs-article); }
.ozcs-content > * { margin-top: 0; }
.ozcs-content p,
.ozcs-content ul,
.ozcs-content ol,
.ozcs-content blockquote,
.ozcs-content figure,
.ozcs-content table { margin: 0 0 1.25em; }
.ozcs-content h2 { font-size: 1.6rem; margin: 1.8em 0 0.6em; }
.ozcs-content h3 { font-size: 1.28rem; margin: 1.5em 0 0.5em; }
.ozcs-content h4 { font-size: 1.1rem; margin: 1.3em 0 0.4em; }
.ozcs-content a { text-decoration: underline; }
.ozcs-content ul, .ozcs-content ol { padding-left: 1.4em; }
.ozcs-content li { margin-bottom: 0.4em; }
.ozcs-content img { border-radius: var(--ozcs-radius-sm); }
.ozcs-content blockquote {
  border-left: 4px solid var(--ozcs-blue); background: var(--ozcs-blue-tint);
  padding: 14px 20px; border-radius: 0 var(--ozcs-radius-sm) var(--ozcs-radius-sm) 0;
  color: var(--ozcs-navy); font-style: normal;
}
.ozcs-content blockquote p:last-child { margin-bottom: 0; }
.ozcs-content code {
  background: var(--ozcs-bg); border: 1px solid var(--ozcs-border);
  padding: 2px 6px; border-radius: 4px; font-size: 0.9em;
}
.ozcs-content table { width: 100%; border-collapse: collapse; }
.ozcs-content th, .ozcs-content td {
  border: 1px solid var(--ozcs-border); padding: 10px 12px; text-align: left;
}
.ozcs-content th { background: var(--ozcs-bg); font-family: var(--ozcs-font-head); }
.ozcs-content figcaption { font-size: 0.85rem; color: var(--ozcs-text-2); margin-top: 6px; }

/* Post tags + share row */
.ozcs-posttags { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.ozcs-tag {
  font-size: 0.82rem; background: var(--ozcs-bg); border: 1px solid var(--ozcs-border);
  color: var(--ozcs-text-2); padding: 4px 12px; border-radius: 999px;
}
.ozcs-tag:hover { color: var(--ozcs-navy); text-decoration: none; border-color: var(--ozcs-blue); }

/* =========================================================================
   7. WIDGETS / SIDEBAR
   ========================================================================= */
.ozcs-widget {
  background: var(--ozcs-white); border: 1px solid var(--ozcs-border);
  border-radius: var(--ozcs-radius); padding: 22px;
}
.ozcs-widget__title {
  margin: 0 0 14px; font-size: 1.05rem; padding-bottom: 10px;
  border-bottom: 2px solid var(--ozcs-bg);
}
.ozcs-widget ul { list-style: none; margin: 0; padding: 0; }
.ozcs-widget li { padding: 7px 0; border-bottom: 1px solid var(--ozcs-bg); }
.ozcs-widget li:last-child { border-bottom: none; }
.ozcs-widget a { color: var(--ozcs-text); font-weight: 500; }
.ozcs-widget a:hover { color: var(--ozcs-blue); text-decoration: none; }

/* CTA widget */
.ozcs-cta {
  background: var(--ozcs-navy); color: #fff; border-radius: var(--ozcs-radius); padding: 24px;
}
.ozcs-cta__title { color: #fff; margin: 0 0 8px; font-size: 1.15rem; }
.ozcs-cta__text { margin: 0 0 16px; font-size: 0.92rem; color: #c9d4e6; }

/* =========================================================================
   8. BUTTONS
   ========================================================================= */
.ozcs-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--ozcs-font-head); font-weight: 700; font-size: 1rem;
  padding: 12px 22px; border-radius: var(--ozcs-radius-sm); border: 2px solid transparent;
  cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s;
  min-height: 46px; line-height: 1.2;
}
.ozcs-btn:hover { text-decoration: none; }
.ozcs-btn--cta { background: var(--ozcs-orange); color: var(--ozcs-navy); }
.ozcs-btn--cta:hover { background: var(--ozcs-orange-light); color: var(--ozcs-navy); }
.ozcs-btn--primary { background: var(--ozcs-blue); color: #fff; }
.ozcs-btn--primary:hover { background: var(--ozcs-blue-dark); color: #fff; }
.ozcs-btn--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,0.4); }
.ozcs-btn--ghost:hover { border-color: #fff; color: #fff; }
.ozcs-btn--block { width: 100%; }

/* =========================================================================
   9. HERO (front page)
   ========================================================================= */
.ozcs-hero {
  background: linear-gradient(135deg, var(--ozcs-navy), #123163);
  color: #fff; padding: clamp(40px, 7vw, 76px) 0;
}
.ozcs-hero__eyebrow {
  font-size: 0.82rem; font-weight: 700; letter-spacing: 0.09em;
  text-transform: uppercase; color: var(--ozcs-orange-light);
}
.ozcs-hero h1 {
  color: #fff; margin: 10px 0 14px; max-width: 18ch;
  font-size: clamp(1.9rem, 1.4rem + 2.6vw, 3rem);
}
.ozcs-hero p { font-size: 1.15rem; color: #cdd8ea; max-width: 52ch; margin: 0 0 26px; }
.ozcs-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* =========================================================================
   10. QUOTE FORM  (built into the theme — no plugin needed)
   ========================================================================= */
.ozcs-quotewrap {
  max-width: 640px; margin: 0 auto; background: var(--ozcs-white);
  border: 1px solid var(--ozcs-border); border-radius: var(--ozcs-radius);
  padding: clamp(22px, 4vw, 36px);
}
.ozcs-field { margin-bottom: 18px; }
.ozcs-field label { display: block; font-weight: 700; font-size: 0.92rem; color: var(--ozcs-navy); margin-bottom: 6px; }
.ozcs-req { color: var(--ozcs-red); }
.ozcs-field input, .ozcs-field select, .ozcs-field textarea {
  width: 100%; padding: 11px 14px; font: inherit; font-size: 1rem;
  color: var(--ozcs-text); background: #fff; border: 1px solid var(--ozcs-border);
  border-radius: var(--ozcs-radius-sm); min-height: 46px;
}
.ozcs-field textarea { min-height: 110px; resize: vertical; }
.ozcs-field input:focus, .ozcs-field select:focus, .ozcs-field textarea:focus {
  outline: 3px solid var(--ozcs-blue-tint); border-color: var(--ozcs-blue);
}
.ozcs-field__hint { font-size: 0.85rem; color: var(--ozcs-text-2); margin: 6px 0 0; }
.ozcs-grid2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 540px) { .ozcs-grid2 { grid-template-columns: 1fr 1fr; } }
.ozcs-grid2 .ozcs-field { margin-bottom: 0; }
.ozcs-consent { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 0.9rem; }
.ozcs-consent input { width: 22px; height: 22px; min-height: 0; }
.ozcs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ozcs-formnote { font-size: 0.85rem; color: var(--ozcs-text-2); margin: 14px 0 0; }
.ozcs-formmsg { padding: 16px 18px; border-radius: var(--ozcs-radius-sm); margin-bottom: 22px; }
.ozcs-formmsg--ok { background: var(--ozcs-green-tint); border-left: 4px solid var(--ozcs-green); color: var(--ozcs-green-dark); }
.ozcs-formmsg--err { background: var(--ozcs-red-tint); border-left: 4px solid var(--ozcs-red); color: var(--ozcs-red-dark); }

/* =========================================================================
   11. PAGINATION
   ========================================================================= */
.ozcs-pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 40px 0 0; }
.ozcs-pagination a, .ozcs-pagination span {
  min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center;
  padding: 0 14px; border: 1px solid var(--ozcs-border); border-radius: var(--ozcs-radius-sm);
  background: #fff; color: var(--ozcs-navy); font-weight: 600;
}
.ozcs-pagination a:hover { border-color: var(--ozcs-blue); color: var(--ozcs-blue); text-decoration: none; }
.ozcs-pagination .current { background: var(--ozcs-navy); color: #fff; border-color: var(--ozcs-navy); }

/* =========================================================================
   12. FOOTER
   ========================================================================= */
.ozcs-footer { background: var(--ozcs-navy); color: #c9d4e6; padding: 48px 0 28px; margin-top: 40px; }
.ozcs-footer a { color: #c9d4e6; }
.ozcs-footer a:hover { color: #fff; }
.ozcs-footer__grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .ozcs-footer__grid { grid-template-columns: 2fr 1fr 1fr; } }
.ozcs-footer__brand .ozcs-logo { color: #fff; }
.ozcs-footer__brand .ozcs-logo span { color: var(--ozcs-orange-light); }
.ozcs-footer h4 { color: #fff; font-size: 0.95rem; margin: 0 0 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.ozcs-footer ul { list-style: none; margin: 0; padding: 0; }
.ozcs-footer li { margin-bottom: 8px; }
.ozcs-footer__bottom {
  margin-top: 32px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem; color: #8fa3c4; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}
.ozcs-disclaimer { max-width: 70ch; }

/* =========================================================================
   13. UTILITIES
   ========================================================================= */
.ozcs-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.ozcs-notice {
  background: var(--ozcs-orange-tint); border-left: 4px solid var(--ozcs-orange);
  padding: 14px 18px; border-radius: 0 var(--ozcs-radius-sm) var(--ozcs-radius-sm) 0;
  margin: 0 0 24px; font-size: 0.95rem;
}

/* =========================================================================
   14. AD SLOTS  (added for AdSense)
   ========================================================================= */
.ozcs-ad {
  margin: 28px 0;
  padding: 14px;
  background: var(--ozcs-bg);
  border: 1px dashed var(--ozcs-border);
  border-radius: var(--ozcs-radius-sm);
  text-align: center;
  min-height: 100px;               /* reserves space to prevent layout shift */
}
.ozcs-ad__label {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ozcs-text-2);
  margin-bottom: 8px;
  text-align: left;
}
.ozcs-ad__slot { width: 100%; overflow: hidden; }
.ozcs-ad__slot ins,
.ozcs-ad__slot .adsbygoogle { display: block; margin: 0 auto; }
@media print { .ozcs-ad { display: none !important; } }
