/* ============================================================
   Tufankjian Auto Group — Main Stylesheet
   ============================================================ */

/* ── Reset & Globals ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:     #1a2236;
    --red:      #e31837;
    --red-dark: #b71430;
    --gray-50:  #f4f5f7;
    --gray-100: #e8eaed;
    --gray-200: #d0d5de;
    --gray-400: #888;
    --gray-600: #555;
    --gray-800: #333;
    --white:    #fff;
    --font-display: 'Barlow Condensed', sans-serif;
    --font-body:    'Lato', sans-serif;
    --max-w: 1200px;
    --radius: 8px;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--gray-50);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── Utility ─────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    font-family: var(--font-body); font-weight: 700; font-size: 13px;
    padding: 8px 18px; border-radius: 4px; border: none; cursor: pointer;
    transition: all .15s ease;
}
.btn-red   { background: var(--red);  color: var(--white); }
.btn-red:hover { background: var(--red-dark); }
.btn-navy  { background: var(--navy); color: var(--white); }
.btn-navy:hover { opacity: .9; }
.btn-outline { border: 1.5px solid var(--navy); background: transparent; color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-white { border: 1.5px solid var(--white); background: transparent; color: var(--white); }
.btn-outline-white:hover { background: rgba(255,255,255,.15); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tag-toyota { background: var(--red); color: var(--white); }
.tag-honda  { background: #cc0000;   color: var(--white); }
.tag-cpo    { background: #0d6efd;   color: var(--white); }
.tag-new    { background: var(--navy);color: var(--white); }

/* ── Top Bar ─────────────────────────────────────────────── */
.topbar {
    background: var(--navy); color: var(--white); font-size: 12px;
    padding: 6px 0;
}
.topbar-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.topbar span { opacity: .7; }
.topbar-links a { color: #7ec8f5; margin-left: 16px; font-size: 12px; }

/* ── Header ──────────────────────────────────────────────── */
.header {
    background: var(--white); border-bottom: 2.5px solid var(--red);
    position: sticky; top: 0; z-index: 100;
}
.header-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
    height: 64px;
}
.logo-area { display: flex; flex-direction: column; gap: 1px; }
.logo-name {
    font-family: var(--font-display); font-size: 24px; font-weight: 700;
    color: var(--navy); letter-spacing: .5px; line-height: 1;
}
.logo-name span { color: var(--red); }
.logo-sub { font-size: 10px; color: var(--gray-400); text-transform: uppercase; letter-spacing: 1.5px; }
.header-nav { display: flex; gap: 22px; }
.header-nav a {
    font-size: 13px; font-weight: 600; color: var(--navy);
    letter-spacing: .3px; transition: color .15s;
}
.header-nav a:hover { color: var(--red); }
.header-cta { display: flex; gap: 8px; }

/* ── Hero / Search ───────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--navy) 60%, #2e3f5c 100%);
    padding: 40px 0 36px;
}
.hero-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.hero-label {
    font-size: 11px; color: #7ec8f5; text-transform: uppercase;
    letter-spacing: 2.5px; font-weight: 700; margin-bottom: 6px;
}
.hero-title {
    font-family: var(--font-display); font-size: 36px; font-weight: 700;
    color: var(--white); line-height: 1.15; margin-bottom: 6px;
}
.hero-title span { color: var(--red); }
.hero-sub { color: #a8b5cc; font-size: 14px; margin-bottom: 24px; }

/* Search Box */
.search-box {
    background: var(--white); border-radius: var(--radius);
    padding: 16px 20px; box-shadow: 0 4px 20px rgba(0,0,0,.18);
}
.search-tabs {
    display: flex; gap: 0; margin-bottom: 14px;
    border-bottom: 1.5px solid var(--gray-100);
}
.search-tab {
    font-size: 13px; font-weight: 700; padding: 8px 16px;
    color: var(--gray-400); border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px; cursor: pointer; background: none; border-top: 0;
    border-left: 0; border-right: 0; font-family: var(--font-body);
}
.search-tab.active,
.search-tab:hover { color: var(--red); border-bottom-color: var(--red); }
.search-row { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.search-field { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 120px; }
.search-field.wide { flex: 2; }
.search-field label {
    font-size: 11px; font-weight: 700; color: var(--gray-400);
    text-transform: uppercase; letter-spacing: .8px;
}
.search-field select,
.search-field input[type="text"] {
    border: 1px solid var(--gray-200); border-radius: 4px;
    padding: 8px 10px; font-size: 13px; color: var(--navy);
    background: #f9fafb; font-family: var(--font-body);
}
.search-btn {
    background: var(--red); color: var(--white); border: none;
    border-radius: 4px; padding: 10px 24px; font-size: 14px;
    font-weight: 700; cursor: pointer; white-space: nowrap;
    font-family: var(--font-body);
}
.search-btn:hover { background: var(--red-dark); }
.search-quick { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.search-quick a {
    background: var(--gray-50); color: var(--navy); font-size: 11px;
    font-weight: 600; padding: 4px 12px; border-radius: 20px;
    border: 1px solid var(--gray-100);
}
.search-quick a:hover { border-color: var(--red); color: var(--red); }

/* ── Dealer Strip ────────────────────────────────────────── */
.dealer-strip {
    display: flex; gap: 0; background: var(--white);
    border-bottom: 1px solid var(--gray-100);
}
.dealer-badge {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 10px; padding: 12px 16px; border-right: 1px solid var(--gray-100);
}
.dealer-badge:last-child { border-right: none; }
.dealer-dot { width: 10px; height: 10px; border-radius: 50%; }
.dot-toyota { background: var(--red); }
.dot-honda  { background: #cc0000; }
.dealer-name-sm { font-size: 13px; font-weight: 700; color: var(--navy); }
.dealer-loc  { font-size: 11px; color: var(--gray-400); }

/* ── Section Headers ─────────────────────────────────────── */
.section { padding: 28px 0; }
.section-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.section-head {
    display: flex; justify-content: space-between; align-items: baseline;
    margin-bottom: 18px;
}
.section-title {
    font-family: var(--font-display); font-size: 22px; font-weight: 700;
    color: var(--navy); letter-spacing: .3px;
}
.section-link { font-size: 12px; color: var(--red); font-weight: 700; }

/* ── Vehicle Card Grid ───────────────────────────────────── */
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 16px;
}
.vehicle-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-100); overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.vehicle-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); transform: translateY(-2px); }
.vehicle-card a { display: block; }
.vehicle-card-img {
    width: 100%; height: 190px; object-fit: cover;
    background: #dde2ea;
}
.vehicle-card-badges {
    position: absolute; top: 8px; left: 8px; right: 8px;
    display: flex; justify-content: space-between;
}
.vehicle-card-img-wrap { position: relative; }
.vehicle-card-body { padding: 14px; }
.vehicle-card .year-make { font-size: 11px; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.vehicle-card .model-name { font-size: 16px; font-weight: 700; color: var(--navy); margin: 2px 0; }
.vehicle-card .trim-line { font-size: 12px; color: var(--gray-600); margin-bottom: 8px; }
.vehicle-card .price { font-size: 20px; font-weight: 700; color: var(--red); }
.vehicle-card .msrp-strike { font-size: 12px; color: #aaa; text-decoration: line-through; margin-left: 6px; }
.vehicle-card .card-meta { display: flex; gap: 10px; margin-top: 6px; font-size: 11px; color: var(--gray-400); }

/* ── VDP (Vehicle Detail Page) ───────────────────────────── */
.vdp { max-width: var(--max-w); margin: 0 auto; padding: 24px; }
.vdp-top { display: grid; grid-template-columns: minmax(0, 720px) 380px; gap: 24px; margin-bottom: 32px; }
.vdp-gallery { position: relative; max-width: 720px; }
.vdp-main-img {
    width: 100%; height: 400px; object-fit: contain; object-position: center;
    border-radius: var(--radius); background: #f0f1f3;
}
.vdp-thumbs {
    display: flex; gap: 6px; margin-top: 8px; overflow-x: auto;
    padding-bottom: 4px;
}
.vdp-thumb {
    width: 80px; height: 60px; object-fit: cover;
    border-radius: 4px; cursor: pointer; opacity: .6;
    border: 2px solid transparent; flex-shrink: 0;
}
.vdp-thumb.active, .vdp-thumb:hover { opacity: 1; border-color: var(--red); }
.vdp-sidebar {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-100); padding: 20px;
}
.vdp-price-big { font-size: 30px; font-weight: 700; color: var(--red); margin-bottom: 4px; }
.vdp-msrp { font-size: 13px; color: var(--gray-400); margin-bottom: 16px; }
.vdp-specs { border-top: 1px solid var(--gray-100); padding-top: 14px; }
.vdp-spec-row {
    display: flex; justify-content: space-between;
    padding: 6px 0; font-size: 13px; border-bottom: 1px solid #f0f2f5;
}
.vdp-spec-row .label { color: var(--gray-400); }
.vdp-spec-row .value { font-weight: 600; }
.vdp-dealer-box {
    margin-top: 16px; padding: 14px; background: var(--gray-50);
    border-radius: 6px;
}
.vdp-dealer-box .dealer-name-link { font-weight: 700; color: var(--navy); font-size: 14px; }
.vdp-dealer-box .dealer-site { font-size: 12px; color: var(--red); }

.vdp-desc { margin-bottom: 24px; }
.vdp-features { margin-bottom: 24px; }
.vdp-features ul { column-count: 2; list-style: disc; padding-left: 18px; font-size: 13px; color: var(--gray-600); }
.vdp-features li { padding: 2px 0; break-inside: avoid; }

/* ── Inquiry Form ────────────────────────────────────────── */
.inquiry-form { margin-top: 16px; }
.inquiry-form h3 { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.form-row { display: flex; gap: 10px; margin-bottom: 10px; }
.form-row .form-group { flex: 1; }
.form-group label { display: block; font-size: 11px; font-weight: 700; color: var(--gray-400); text-transform: uppercase; margin-bottom: 4px; }
.form-group input,
.form-group textarea,
.form-group select {
    width: 100%; border: 1px solid var(--gray-200); border-radius: 4px;
    padding: 8px 10px; font-size: 13px; font-family: var(--font-body);
}
.form-group textarea { resize: vertical; min-height: 80px; }

/* ── Inventory List Controls ─────────────────────────────── */
.inv-toolbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 16px; flex-wrap: wrap; gap: 10px;
}
.inv-count { font-size: 14px; color: var(--gray-600); }
.inv-sort select {
    border: 1px solid var(--gray-200); border-radius: 4px;
    padding: 6px 10px; font-size: 13px;
}

/* ── Pagination ──────────────────────────────────────────── */
.pagination {
    display: flex; justify-content: center; gap: 4px;
    margin-top: 28px;
}
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 36px; height: 36px; border-radius: 4px;
    font-size: 13px; font-weight: 600; border: 1px solid var(--gray-100);
    background: var(--white); color: var(--navy);
}
.pagination .current { background: var(--red); color: var(--white); border-color: var(--red); }
.pagination a:hover { border-color: var(--red); color: var(--red); }

/* ── News / Blog Cards ───────────────────────────────────── */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.news-card {
    background: var(--white); border-radius: var(--radius);
    border: 1px solid var(--gray-100); overflow: hidden;
    display: flex;
}
.news-card-img {
    width: 130px; min-width: 130px; object-fit: cover;
    background: #d0d5de;
}
.news-card-body { padding: 14px 16px; flex: 1; }
.news-card .tag-label { font-size: 10px; font-weight: 700; color: var(--red); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px; }
.news-card .headline { font-size: 14px; font-weight: 700; color: var(--navy); line-height: 1.35; margin-bottom: 6px; }
.news-card .meta { font-size: 11px; color: #aaa; }

/* ── About Page ──────────────────────────────────────────── */
.page-content { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.page-content h1 { font-family: var(--font-display); font-size: 32px; color: var(--navy); margin-bottom: 16px; }
.page-content p  { margin-bottom: 16px; line-height: 1.7; color: var(--gray-600); }

/* ── Promo Banner ────────────────────────────────────────── */
.promo {
    background: var(--red); color: var(--white);
    padding: 14px 0;
}
.promo-inner {
    max-width: var(--max-w); margin: 0 auto; padding: 0 24px;
    display: flex; align-items: center; justify-content: space-between;
}
.promo-text { font-size: 15px; font-weight: 700; }
.promo-sub  { font-size: 12px; opacity: .85; margin-top: 2px; }

/* ── Footer ──────────────────────────────────────────────── */
.footer { background: var(--navy); color: #a8b5cc; padding: 28px 0 16px; }
.footer-inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; margin-bottom: 20px; }
.footer-logo { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.footer-logo span { color: var(--red); }
.footer-brand p { font-size: 12px; line-height: 1.6; color: #7a8a9e; }
.footer-col h4 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.5px; color: var(--white); margin-bottom: 10px; }
.footer-col a { display: block; font-size: 12px; color: #7a8a9e; margin-bottom: 6px; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid #2e3f5c; padding-top: 14px;
    display: flex; justify-content: space-between; font-size: 11px; color: #4a5a6e;
}
.footer-bottom a { color: #4a5a6e; }
.footer-bottom a:hover { color: #7ec8f5; }

/* ── Flash Messages ──────────────────────────────────────── */
.flash { padding: 12px 20px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #d4edda; color: #155724; }
.flash-error   { background: #f8d7da; color: #721c24; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .header-nav { display: none; }
    .hero-title { font-size: 26px; }
    .search-row { flex-direction: column; }
    .search-field { min-width: 100%; }
    .vdp-top { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .dealer-strip { flex-direction: column; }
    .vehicle-grid { grid-template-columns: 1fr; }
}
