/* ============================================================
   Sandz Fleet CMS — Stylesheet
   Palette:
     --navy      #0B1F3A  primary dark / hero
     --blue      #1C4B82  primary brand blue
     --blue-2    #2E6BB0  hover / links
     --amber     #D9A441  accent (warm highlight)
     --paper     #F5F7FA  page background
     --white     #FFFFFF
     --ink       #16202B  body text
     --line      #E3E8EF  hairlines / borders
   Type:
     Headings — 'Space Grotesk' (geometric, road-sign character)
     Body     — 'Inter'
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --navy: #0B1F3A;
    --blue: #1C4B82;
    --blue-2: #2E6BB0;
    --amber: #D9A441;
    --paper: #F5F7FA;
    --white: #FFFFFF;
    --ink: #16202B;
    --ink-soft: #4B5A6B;
    --line: #E3E8EF;
    --radius: 6px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.55;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', 'Inter', sans-serif;
    font-weight: 600;
    line-height: 1.15;
    margin: 0 0 .5em;
    color: var(--navy);
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
p { margin: 0 0 1em; max-width: 62ch; color: var(--ink-soft); }
a { color: var(--blue-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }

:focus-visible {
    outline: 3px solid var(--amber);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    padding: .8em 1.6em;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    text-decoration: none;
}
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: #c6912f; text-decoration: none; }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); text-decoration: none; }
.btn-dark { background: var(--navy); color: var(--white); }
.btn-dark:hover { background: #142a4d; text-decoration: none; }
.btn-sm { padding: .5em 1em; font-size: .85rem; }
.btn-danger { background: #B3261E; color: #fff; }

/* ---------- Header ---------- */
.site-header {
    background: var(--navy);
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 3px solid var(--amber);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
}
.brand {
    display: flex;
    align-items: center;
    gap: .6em;
    color: var(--white);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
}
.brand:hover { text-decoration: none; }
.brand-mark {
    width: 34px; height: 34px;
    flex-shrink: 0;
}
.brand small { display: block; font-family: 'Inter', sans-serif; font-weight: 500; font-size: .62rem; letter-spacing: .04em; color: var(--amber); }

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav a {
    color: #CBD6E4;
    font-weight: 500;
    font-size: .95rem;
}
.nav a:hover, .nav a.active { color: var(--white); text-decoration: none; }
.nav-toggle { display: none; }

@media (max-width: 820px) {
    .nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); flex-direction: column; align-items: flex-start; padding: 10px 24px 20px; gap: 14px; display: none; border-bottom: 3px solid var(--amber); }
    .nav.open { display: flex; }
    .nav-toggle { display: inline-flex; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: var(--radius); padding: 8px 10px; cursor: pointer; }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background: linear-gradient(180deg, var(--navy) 0%, #12315C 100%);
    color: var(--white);
    overflow: hidden;
    padding: 76px 0 0;
}
.hero .container {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 40px;
    align-items: center;
    padding-bottom: 60px;
}
.hero-eyebrow { color: var(--amber); font-weight: 600; font-size: .85rem; letter-spacing: .02em; margin-bottom: .8em; }
.hero h1 { color: var(--white); }
.hero p.lead { color: #CBD6E4; font-size: 1.08rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin-top: 1.6em; flex-wrap: wrap; }

.hero-art { position: relative; }
.hero-road {
    width: 100%;
    height: auto;
}
.hero-photo {
    width: 100%;
    height: 100%;
    max-height: 360px;
    object-fit: cover;
    border-radius: var(--radius);
}

.skyline {
    width: 100%;
    height: 60px;
    display: block;
    color: var(--navy);
}

/* Quick search / inquiry bar sitting across the hero seam */
.quickbar {
    position: relative;
    z-index: 5;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(11,31,58,.18);
    margin: 0 auto -54px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 14px;
    align-items: end;
}
.quickbar label { display: block; font-size: .78rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.quickbar input, .quickbar select {
    width: 100%;
    padding: .7em .8em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    color: var(--ink);
    background: var(--white);
}
@media (max-width: 900px) {
    .quickbar { grid-template-columns: 1fr 1fr; margin-bottom: -30px; }
    .hero .container { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
section { padding: 90px 0 60px; }
section.tight { padding-top: 60px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 34px; flex-wrap: wrap; }
.section-head p { margin: 0; }

.stat-strip {
    background: var(--white);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.stat-strip .container { display: grid; grid-template-columns: repeat(4,1fr); gap: 20px; padding: 30px 24px; }
.stat { text-align: left; border-left: 3px solid var(--amber); padding-left: 14px; }
.stat b { font-family: 'Space Grotesk', sans-serif; font-size: 1.7rem; color: var(--navy); display: block; }
.stat span { font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 760px) { .stat-strip .container { grid-template-columns: 1fr 1fr; } }

/* ---------- Fleet / car cards ---------- */
.fleet-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}
@media (max-width: 980px) { .fleet-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 660px) { .fleet-grid { grid-template-columns: 1fr; } }

.car-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .18s ease, transform .18s ease;
}
.car-card:hover { box-shadow: 0 14px 30px rgba(11,31,58,.12); transform: translateY(-2px); }
.car-media { position: relative; aspect-ratio: 16/10; background: #DCE4EE; }
.car-media img { width: 100%; height: 100%; object-fit: cover; }
.car-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-body h3 { font-size: 1.08rem; margin: 0; }
.car-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .82rem; color: var(--ink-soft); }
.car-meta span { display: inline-flex; align-items: center; gap: 5px; }
.car-price { margin-top: auto; display: flex; align-items: baseline; justify-content: space-between; padding-top: 10px; border-top: 1px dashed var(--line); }
.car-price b { font-family: 'Space Grotesk', sans-serif; color: var(--navy); font-size: 1.25rem; }
.car-price small { color: var(--ink-soft); }

.badge { display: inline-block; padding: .32em .8em; border-radius: 30px; font-size: .72rem; font-weight: 700; letter-spacing: .01em; }
.badge-available { background: #E4F3E8; color: #227A44; }
.badge-booked { background: #FDEAEA; color: #B3261E; }
.badge-maintenance { background: #FFF3DC; color: #9C6B00; }
.chip { position: absolute; top: 12px; left: 12px; background: rgba(11,31,58,.85); color: #fff; font-size: .72rem; padding: .3em .7em; border-radius: 30px; }

/* ---------- Why us ---------- */
.why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 820px) { .why-grid { grid-template-columns: 1fr; } }
.why-card { padding: 24px; border-left: 3px solid var(--blue); background: var(--white); border-radius: 0 10px 10px 0; }
.why-card h3 { font-size: 1.05rem; }
.why-card p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
    background: var(--navy);
    color: var(--white);
    padding: 56px 0;
}
.cta-band .container { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-bottom: .2em; }
.cta-band p { color: #CBD6E4; margin: 0; }

/* ---------- Filter bar (fleet page) ---------- */
.filter-bar {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr) auto;
    gap: 12px;
    margin-bottom: 34px;
    align-items: end;
}
.filter-bar label { font-size: .78rem; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 6px; }
.filter-bar select { width: 100%; padding: .65em .7em; border: 1px solid var(--line); border-radius: var(--radius); font: inherit; }
@media (max-width: 820px) { .filter-bar { grid-template-columns: 1fr 1fr; } }

/* ---------- Car detail page ---------- */
.car-detail { display: grid; grid-template-columns: 1.2fr .8fr; gap: 44px; align-items: start; }
@media (max-width: 900px) { .car-detail { grid-template-columns: 1fr; } }
.car-detail-media { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; background: #DCE4EE; }
.car-detail-media img { width: 100%; height: 100%; object-fit: cover; }
.car-gallery-thumbs { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.car-gallery-thumbs .gallery-thumb { width: 76px; height: 56px; object-fit: cover; border-radius: 8px; border: 2px solid transparent; cursor: pointer; opacity: .75; transition: opacity .15s ease, border-color .15s ease; }
.car-gallery-thumbs .gallery-thumb:hover { opacity: 1; }
.car-gallery-thumbs .gallery-thumb.active { opacity: 1; border-color: var(--amber); }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; margin: 20px 0; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 10px; }
.spec-list div { font-size: .9rem; }
.spec-list b { display: block; color: var(--navy); font-family: 'Space Grotesk', sans-serif; }
.feature-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.feature-badges .chip { position: static; background: var(--paper); color: var(--ink); border: 1px solid var(--line); }

.booking-card { background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 24px; position: sticky; top: 100px; }
.booking-card .price { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; color: var(--navy); }
.booking-card .price small { font-family: 'Inter', sans-serif; font-size: .95rem; color: var(--ink-soft); font-weight: 500; }
.price-breakdown { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.price-breakdown-row { display: flex; justify-content: space-between; font-size: .92rem; color: var(--ink-soft); }
.price-breakdown-total { border-top: 1px solid var(--line); padding-top: 8px; margin-top: 2px; font-weight: 600; color: var(--navy); font-size: 1rem; }

/* ---------- Forms (shared: contact / booking / admin) ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.field input, .field select, .field textarea {
    width: 100%;
    padding: .75em .85em;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit;
    color: var(--ink);
    background: var(--white);
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-2); }

.alert { padding: 14px 16px; border-radius: var(--radius); font-size: .92rem; margin-bottom: 20px; }
.alert-success { background: #E4F3E8; color: #1E6A3A; border: 1px solid #BFE3C9; }
.alert-error { background: #FDEAEA; color: #93201A; border: 1px solid #F3C4C1; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #B9C6D6; padding: 56px 0 26px; margin-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.site-footer h4 { color: var(--white); font-size: .95rem; margin-bottom: 14px; }
.site-footer a { color: #B9C6D6; }
.site-footer a:hover { color: var(--white); }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: .9rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 40px; padding-top: 20px; font-size: .82rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Admin ---------- */
.admin-body { background: var(--paper); }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--navy); color: #CBD6E4; padding: 24px 16px; }
.admin-sidebar .brand { margin-bottom: 30px; }
.admin-sidebar nav a { display: block; padding: .7em .9em; border-radius: var(--radius); color: #CBD6E4; font-size: .92rem; font-weight: 500; margin-bottom: 4px; }
.admin-sidebar nav a:hover, .admin-sidebar nav a.active { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.admin-nav-toggle { display: none; }
.admin-main { padding: 30px 34px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 26px; flex-wrap: wrap; gap: 14px; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 30px; }
@media (max-width: 900px) { .admin-cards { grid-template-columns: 1fr 1fr; } }
.admin-card { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 18px; border-left: 3px solid var(--blue); }
.admin-card b { font-family: 'Space Grotesk', sans-serif; font-size: 1.6rem; display: block; color: var(--navy); }
.admin-card span { font-size: .82rem; color: var(--ink-soft); }

.admin-panel { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }

table.data-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data-table th, .data-table td { text-align: left; padding: 12px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table th { color: var(--ink-soft); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.data-table img.thumb { width: 56px; height: 40px; object-fit: cover; border-radius: 4px; border: 1px solid var(--line); }
.row-actions { display: flex; gap: 8px; }

/* Admin on narrow screens: the fixed 230px sidebar is unusable on a
   phone, so it collapses into a top bar with a hamburger toggle
   (same open/close pattern as the public .nav/.nav-toggle), and wide
   tables scroll horizontally instead of forcing the whole page wider
   than the viewport. */
@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 16px; }
    .admin-sidebar .brand { margin-bottom: 0; }
    .admin-nav-toggle { display: inline-flex; background: none; border: 1px solid rgba(255,255,255,.4); color: #fff; border-radius: var(--radius); padding: 8px 10px; cursor: pointer; }
    .admin-sidebar nav { display: none; width: 100%; flex-direction: column; margin-top: 16px; order: 3; }
    .admin-sidebar nav.open { display: flex; }
    .admin-sidebar > .muted { display: none; }
    .admin-main { padding: 20px 16px; }
    /* Wide tables scroll horizontally instead of forcing the page
       wider than the viewport — the table itself becomes the scroll
       container so no page-by-page wrapper markup is needed; rows/cells
       keep their normal table layout inside it. */
    table.data-table { display: block; overflow-x: auto; white-space: nowrap; }
    table.data-table thead, table.data-table tbody { display: table; width: 100%; }
}

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(180deg, var(--navy), #12315C); padding: 20px; }
.login-card { background: var(--white); border-radius: 12px; padding: 36px; width: 100%; max-width: 400px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.login-card .brand { color: var(--navy); justify-content: center; margin-bottom: 6px; }
.login-card p.lead { text-align: center; margin: 0 auto 24px; font-size: .9rem; }

.muted { color: var(--ink-soft); font-size: .85rem; }
.mt-0 { margin-top: 0; }

/* ---------- Page Builder — frontend output ----------
   Base styling for the generic structural/content classes
   includes/page-builder.php's render engine emits. Per-node visual
   settings (color, padding, etc.) still arrive as inline styles from
   that same engine; this block only covers what a bare class needs to
   look right with no configuration at all, plus the "collapse to one
   column on a small screen" default every multi-column layout here
   needs regardless of how many columns an admin configured. */
.pb-root { overflow-x: hidden; }
.pb-container { padding: 0; }
.pb-row { display: flex; flex-wrap: wrap; gap: 20px; }
.pb-column { flex: 1; min-width: 0; }
.pb-grid { display: grid; gap: 20px; }
.pb-flex { display: flex; }
.pb-grid-cols { display: grid; gap: 20px; margin: 20px 0; }
.pb-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.pb-callout { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; text-align: center; }
.pb-callout h3 { margin-top: 0; }
.pb-faq-item { border-bottom: 1px solid var(--line); padding: 14px 0; }
.pb-faq-item summary { cursor: pointer; font-weight: 600; }
.pb-faq-item > div { margin-top: 10px; color: var(--ink-soft); }
.pb-tabs .pb-tab-nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; flex-wrap: wrap; }
.pb-tab-btn { border: none; background: none; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--ink-soft); border-bottom: 2px solid transparent; }
.pb-tab-btn.active { color: var(--navy); border-color: var(--blue); }
.pb-tab-panel { display: none; }
.pb-tab-panel.active { display: block; }
.pb-gallery { display: grid; gap: 12px; }
.pb-gallery img { width: 100%; height: 100%; min-height: 140px; object-fit: cover; border-radius: var(--radius); }
.pb-carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.pb-carousel-track { display: flex; height: 100%; transition: transform .4s ease; }
.pb-carousel-slide { flex: 0 0 100%; height: 100%; }
.pb-carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.pb-carousel-prev, .pb-carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(11,31,58,.6); color: #fff; border: none; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 1rem; }
.pb-carousel-prev { left: 12px; }
.pb-carousel-next { right: 12px; }
.pb-social-links { display: flex; gap: 12px; }
.pb-social-link { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); border: 1px solid var(--line); }
.pb-logo-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 30px; opacity: .85; }
.pb-nav-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.pb-nav-links { display: flex; gap: 18px; flex-wrap: wrap; }
.pb-contact-info { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pb-contact-info li { display: flex; align-items: center; gap: 10px; }
.pb-newsletter { text-align: center; }
.pb-newsletter-form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 12px; }
.pb-newsletter-form input { padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); min-width: 240px; }
.pb-video-wrap { position: relative; }
.pb-video-wrap iframe { display: block; }
.pb-feature-list { list-style: none; margin: 8px 0; padding: 0; font-size: .85rem; color: var(--ink-soft); }
.pb-feature-list li { padding: 2px 0; }
.pb-pricing-card { text-align: center; }
.pb-pricing-card .price { font-size: 1.8rem; font-weight: 700; color: var(--navy); margin: 10px 0; }
.pb-pricing-card ul { list-style: none; padding: 0; margin: 16px 0; text-align: left; }
.pb-pricing-card ul li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.pb-category-card { display: block; text-align: center; color: inherit; }
.pb-category-card:hover { text-decoration: none; }
.pb-category-card h4 { margin: 10px 0 0; }
.pb-btn.pb-btn-sm { padding: 8px 16px; font-size: .82rem; }
.pb-btn.pb-btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.pb-form input, .pb-form textarea, .pb-form select { width: 100%; }

@media (max-width: 900px) {
    .pb-grid-cols { grid-template-columns: 1fr !important; }
    .pb-row { flex-direction: column; }
    .pb-column { flex-basis: 100% !important; max-width: 100% !important; }
}
