/* =========================================================
   LiveAutoParts — PRODUCTION STYLES (CLEAN)
   Matched to index.php — Jan 2026
   ========================================================= */

/* ================= VARIABLES ================= */
:root{
  --bg:#f6f8fa;
  --card:#ffffff;
  --text:#0f1724;
  --muted:#6b7280;
  --accent:#2f6ef2;
  --accent-dark:#1f4ed8;
  --radius:14px;
  --shadow:0 10px 30px rgba(15,23,42,.08);
  --border:#e6e9ef;
  --max:1180px;
}

/* ================= RESET ================= */
*{box-sizing:border-box}
html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  line-height:1.45;
}
img{max-width:100%;display:block}
a{text-decoration:none;color:inherit}

/* ================= LAYOUT ================= */
.wrap{
  max-width:var(--max);
  margin:0 auto;
  padding:32px 18px;
}
.wrap-small{
  max-width:980px;
  margin:0 auto;
  padding:28px 18px;
}
.page{margin-top:22px}

/* ================= CARD ================= */
.card{
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  padding:18px;
}

/* ================= TEXT ================= */
h1,h2,h3,h4{margin:0 0 10px}
p{margin:6px 0}
.small{font-size:14px}
.muted{color:var(--muted)}
.lead{font-size:15.5px;line-height:1.55}

/* ================= BUTTONS ================= */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:12px 18px;
  border-radius:12px;
  font-weight:700;
  border:1px solid transparent;
  cursor:pointer;
}
.btn.primary{
  background:var(--accent);
  color:#fff;
}
.btn.primary:hover{background:var(--accent-dark)}
.btn.outline{
  background:#fff;
  border-color:var(--border);
  color:var(--accent);
}

/* ================= HERO GRID ================= */
.hero-grid{
  display:grid;
  grid-template-columns:1fr 420px;
  gap:26px;
}

/* ================= HERO LEFT ================= */
.hero-card{
  display:flex;
  flex-direction:column;
  gap:14px;
  padding:26px;
}

/* Badge */
.badge{
  display:inline-flex;
  align-items:center;
  gap:10px;
  background:#eef3ff;
  color:var(--accent);
  padding:8px 14px;
  border-radius:999px;
  font-weight:700;
  font-size:14px;
}

/* Headline */
.hero-card h1{
  font-size:30px;
  line-height:1.12;
}

/* Hero image (controlled & balanced) */
.hero-card > .card:first-of-type{
  padding:0;
  overflow:hidden;
  border-radius:14px;
  max-height:180px;
}
.hero-card > .card:first-of-type img{
  width:100%;
  height:180px;
  object-fit:cover;
}

/* How it works */
.hero-card > .card:nth-of-type(2){
  padding:14px 16px;
}
.hero-card ol{
  margin:0;
  padding-left:18px;
}
.hero-card li{
  font-size:14px;
  margin-bottom:4px;
}

/* Mini info cards */
.listings-row{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  margin-top:auto;
}
.listings-row .card{
  padding:12px;
}
.listings-row strong{font-size:14px}
.listings-row .small{font-size:13px}

/* ================= ASIDE / FORM ================= */
.lead-form-card{
  position:sticky;
  top:96px;
  padding:18px;
  height:100%;
}

.lead-form{
  display:flex;
  flex-direction:column;
}

.lead-form .field-label{
  font-size:13px;
  font-weight:700;
  margin-bottom:6px;
}

.lead-form input,
.lead-form select{
  width:100%;
  padding:12px 14px;
  border-radius:10px;
  border:1px solid var(--border);
  font-size:15px;
}

.vin-row{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
}

.row-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.form-actions{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
  margin-top:auto;
}
.form-actions .btn{height:48px}

/* ================= PRIORITY CTA ================= */
.priority-cta{
  display:grid;
  grid-template-columns:1fr auto;
  gap:18px;
  align-items:center;
}

/* ================= POPULAR PARTS ================= */
.gallery-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
  margin-top:18px;
}
.gallery-item{
  display:flex;
  gap:16px;
  align-items:center;
  background:#fff;
  padding:18px;
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.gallery-item img{
  width:64px;
  height:64px;
  padding:12px;
  background:#f3f6fb;
  border-radius:14px;
}

/* ================= IMAGE COLLAGE ================= */
.collage-4{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:10px;
  border-radius:16px;
  overflow:hidden;
}
.collage-4 img{
  height:200px;
  object-fit:cover;
}

/* ================= TRUST ================= */
.trust-card{
  display:flex;
  gap:18px;
  flex-wrap:wrap;
}
.trust-logos{
  display:flex;
  gap:12px;
}
.trust-logo{
  background:#f8fafc;
  padding:10px 14px;
  border-radius:12px;
}
.trust-logo img{height:20px}

/* ================= EQUAL HEIGHT DESKTOP ================= */
@media (min-width:1024px){
  .hero-grid{
    align-items:flex-start; /* IMPORTANT */
  }

  .hero-card{
    height:auto;
  }

  .lead-form-card{
    height:auto; /* IMPORTANT */
  }
}

/* ================= RESPONSIVE ================= */
@media (max-width:900px){
  .hero-grid{grid-template-columns:1fr}
  .lead-form-card{position:static;margin-top:24px}
  .listings-row{grid-template-columns:1fr}
}

@media (max-width:700px){
  .priority-cta{grid-template-columns:1fr}
  .gallery-row{grid-template-columns:1fr}
  .collage-4{grid-template-columns:1fr 1fr}
}

@media (max-width:480px){
  .wrap,.wrap-small{padding:22px 14px}
  .collage-4{grid-template-columns:1fr}
}
/* =========================================================
   HERO BALANCE — FINAL POLISH
   ========================================================= */

/* Slightly tighten hero spacing */
.hero-card{
  gap:12px;
}

/* Badge takes less vertical space */
.hero-card .badge{
  padding:6px 12px;
  font-size:13px;
}

/* Headline a touch tighter */
.hero-card h1{
  margin-bottom:6px;
}

/* Lead paragraph tighter */
.hero-card .lead{
  margin-bottom:8px;
}

/* HERO IMAGE — FINAL OPTICAL SIZE */
.hero-card > .card:first-of-type{
  max-height:160px;
}

.hero-card > .card:first-of-type img{
  height:160px;
}

/* Reduce spacing below image */
.hero-card > .card:first-of-type + .card{
  margin-top:10px;
}

/* Mini cards slightly shorter */
.listings-row .card{
  padding:10px 12px;
}

/* Form gets a little more presence */
.lead-form-card{
  padding:20px;
}
/* =========================================================
   HERO IMAGE — FINAL VISUAL BALANCE (AUTHORITATIVE FIX)
   ========================================================= */

/* Give image breathing room */
.hero-card > .card:first-of-type{
  margin:8px 0 6px;
  padding:0;
  max-height:170px;
}

/* Image framed, not dominant */
.hero-card > .card:first-of-type img{
  height:170px;
  border-radius:12px;
  object-fit:cover;

  /* VISUAL DE-EMPHASIS */
  filter: saturate(0.92) contrast(0.96) brightness(0.97);
}

/* Slight inset look (matches form density) */
.hero-card > .card:first-of-type{
  background:#f3f6fb;
  padding:6px;
  border-radius:16px;
}

/* Restore clarity on mobile */
@media (max-width: 900px){
  .hero-card > .card:first-of-type img{
    filter:none;
    height:200px;
  }
}

/* =========================================================
   IMAGE COLLAGE — CLEAN, BALANCED, PROFESSIONAL
   ========================================================= */

.network-banner{
  margin:32px auto 24px;
}

/* Visual container */
.collage-4{
  max-width:1100px;
  margin:0 auto;
  padding:12px;

  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:14px;

  background:#ffffff;
  border-radius:18px;
  box-shadow:0 10px 30px rgba(15,23,42,.06);
}

/* Images */
.collage-4 img{
  width:100%;
  height:180px;
  object-fit:cover;
  border-radius:14px;
  display:block;
}

/* ================= TABLET ================= */
@media (max-width: 900px){
  .collage-4{
    grid-template-columns:repeat(2, 1fr);
    gap:12px;
  }

  .collage-4 img{
    height:170px;
  }
}

/* ================= MOBILE ================= */
@media (max-width: 480px){
  .network-banner{
    margin:26px auto 18px;
  }

  .collage-4{
    grid-template-columns:1fr;
    padding:10px;
  }

  .collage-4 img{
    height:180px;
  }
}
/* =========================================================
   BENEFITS GRID — BALANCED & RESPONSIVE
   ========================================================= */

.wrap-small .listings-row{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:16px;
  margin-top:20px;
}

/* Benefit cards */
.wrap-small .listings-row .card{
  padding:18px;
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}

/* Titles */
.wrap-small .listings-row strong{
  display:block;
  font-size:16px;
  margin-bottom:6px;
}

/* Text */
.wrap-small .listings-row .small{
  font-size:14px;
  line-height:1.5;
}

/* ================= LAPTOP ================= */
@media (max-width: 1100px){
  .wrap-small .listings-row{
    grid-template-columns:repeat(2, 1fr);
  }
}

/* ================= MOBILE ================= */
@media (max-width: 600px){
  .wrap-small .listings-row{
    grid-template-columns:1fr;
    gap:14px;
  }
}
/* =========================================================
   CUSTOMER STORIES — MATCH GLOBAL CARD SIZE
   ========================================================= */

.testimonials-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin-top:16px;
}

/* Cards */
.testimonials-grid .card{
  padding:18px;
  border-radius:16px;
  background:#ffffff;
  box-shadow:0 10px 26px rgba(15,23,42,.06);
}

/* Names */
.testimonials-grid strong{
  display:block;
  font-size:16px;
  margin-bottom:8px;
}

/* Quote text */
.testimonials-grid p{
  font-size:14.5px;
  line-height:1.55;
}

/* ================= TABLET ================= */
@media (max-width: 1100px){
  .testimonials-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}

/* ================= MOBILE ================= */
@media (max-width: 640px){
  .testimonials-grid{
    grid-template-columns:1fr;
  }
}
/* =========================================================
   WHY CHOOSE US — CLEAN GRID FIX
   ========================================================= */

/* Grid layout */
.listings-row{
  display:grid;
  grid-template-columns:repeat(2,1fr);
  gap:18px;
  align-items:stretch;
}

/* Force heading to span full row */
.listings-row > h3{
  grid-column:1 / -1;
  text-align:center;
  margin:0 0 14px;
}

/* Card consistency */
.listings-row .card{
  padding:18px;
  border-radius:14px;
  box-shadow:var(--shadow);
}

/* Title inside cards */
.listings-row .card strong{
  display:block;
  font-size:16px;
  margin-bottom:6px;
}

/* Text inside cards */
.listings-row .card .small{
  font-size:14px;
  line-height:1.5;
}

/* ================= MOBILE ================= */
@media (max-width: 768px){
  .listings-row{
    grid-template-columns:1fr;
  }

  .listings-row > h3{
    text-align:left;
  }
}
/* =========================================================
   FOOTER — CLEAN HEIGHT & SPACING FIX
   ========================================================= */

.site-footer{
  padding:40px 18px 24px;
  margin-top:40px;
}

.site-footer .wrap,
.site-footer .wrap-small{
  padding-bottom:0;
}

/* Remove accidental extra spacing */
.site-footer::after{
  content:none !important;
}

/* Footer bottom line */
.footer-bottom{
  margin-top:24px;
  padding-top:16px;
  border-top:1px dashed #e6e9ef;
  text-align:center;
  font-size:14px;
  color:#6b7280;
}

/* =========================================================
   MOBILE CALL BAR — FIXED & CONTROLLED
   ========================================================= */

.mobile-call-popup{
  position:fixed;
  left:12px;
  right:12px;
  bottom:12px;
  z-index:120000;

  background:#fff;
  border-radius:16px;
  box-shadow:0 14px 40px rgba(15,23,42,.18);
  padding:14px 16px;

  display:flex;
  align-items:center;
  gap:12px;
}

/* Text inside bar */
.mobile-call-popup .text{
  flex:1;
  font-size:14px;
  line-height:1.4;
}

/* Close button */
.mobile-call-popup .close{
  width:28px;
  height:28px;
  border-radius:50%;
  background:#f1f3f8;
  border:0;
  cursor:pointer;
}

/* =========================================================
   PREVENT FOOTER OVERLAP ON MOBILE
   ========================================================= */

@media (max-width: 768px){
  body{
    padding-bottom:96px; /* space for call bar */
  }
}

/* =========================================================
   DESKTOP — HIDE MOBILE CALL BAR
   ========================================================= */

@media (min-width: 769px){
  .mobile-call-popup{
    display:none !important;
  }
}
/* ================= LEAD FORM MODAL — VISIBILITY CONTROL ================= */

/* Hidden by default */
.asz-modal[aria-hidden="true"] {
  display: none !important;
}

/* Visible state */
.asz-modal[aria-hidden="false"] {
  display: flex !important;
}
/* ================= LEAD FORM MODAL — VISIBILITY CONTROL ================= */

/* Hidden by default */
.asz-modal[aria-hidden="true"] {
  display: none !important;
}

/* Visible state */
.asz-modal[aria-hidden="false"] {
  display: flex !important;
}

@media (max-width: 600px) {
  .asz-modal {
    align-items: flex-end;
  }

  .asz-modal-panel {
    width: 100%;
    max-width: 100%;
    height: 92vh;
    border-radius: 16px 16px 0 0;
  }
}
/* =========================================================
   GLOBAL LEAD FORM MODAL — FINAL PRODUCTION VERSION
   ========================================================= */

.asz-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Hidden state */
.asz-modal[aria-hidden="true"] {
  display: none;
}

/* Backdrop */
.asz-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(2px);
}

/* Modal panel */
.asz-modal-panel {
  position: relative;
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25);
  overflow: hidden;
  z-index: 1;

  display: flex;
  flex-direction: column;
}

/* Header */
.asz-modal-header {
  padding: 18px 22px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Body */
.asz-modal-body {
  padding: 18px 22px;
  overflow-y: auto;
}

/* Close button */
.asz-modal-close {
  border: 0;
  background: #f1f5f9;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
/* =========================================================
   SUPPLIERS PAGE — LAYOUT FIX
   ========================================================= */

/* Do NOT stretch map & content */
.hero-grid {
  align-items: flex-start;
}

/* Supplier cards grid */
.suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  margin-top: 18px;
}

/* Supplier card consistency */
.supplier-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Logo control */
.supplier-logo {
  max-width: 140px;
  max-height: 80px;
  object-fit: contain;
}

/* CTA always aligned */
.supplier-card .btn {
  margin-top: auto;
}
.supplier-map-card {
  max-width: 520px;
  width: 100%;
}

@media (max-width: 900px) {
  .supplier-map-card {
    max-width: 100%;
  }
}
/* =========================================================
   BROWSE PARTS — CATALOG LAYOUT FIX
   ========================================================= */

/* Grid specifically for parts catalog */
[data-category].suppliers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

/* Part card (NOT supplier card visually anymore) */
[data-category] .supplier-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border-radius: 16px;
  height: 100%;
}

/* Image wrapper */
.part-thumb {
  position: relative;
  background: #f3f6fb;
  border-radius: 14px;
  padding: 12px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Image itself */
.part-thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Price badge */
.price-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #ffffff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(0,0,0,.08);
}

/* Part title */
[data-category] .supplier-card h4 {
  font-size: 16px;
  margin: 12px 0 4px;
}

/* Description */
[data-category] .supplier-card .muted {
  font-size: 14px;
}

/* Push buttons to bottom */
[data-category] .supplier-card > div:last-child {
  margin-top: auto;
}

/* Buttons */
[data-category] .supplier-card .btn {
  flex: 1;
}

/* Desktop polish */
@media (min-width: 1100px) {
  [data-category].suppliers-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Tablet */
@media (max-width: 900px) {
  [data-category].suppliers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 520px) {
  [data-category].suppliers-grid {
    grid-template-columns: 1fr;
  }
}
h2[data-category] {
  margin-top: 42px;
  margin-bottom: 8px;
}
/* =========================================================
   PART CONFIG MODAL — FORM POLISH
   ========================================================= */

/* Modal width balance */
.modal-card {
  max-width: 480px;
}

/* Inputs & selects consistency */
.modal-card input,
.modal-card select {
  height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 15px;
}

/* 3-column row (Year / Make / Model) */
.row-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

/* VIN row */
.vin-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 10px;
}

/* Decode button */
#vin-decode-btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font-weight: 700;
}

/* Modal actions */
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.modal-actions .btn {
  min-width: 120px;
}

/* Primary emphasis */
.modal-actions .btn.primary {
  box-shadow: 0 8px 20px rgba(47,110,242,.35);
}

/* Mobile optimization */
@media (max-width: 520px) {
  .row-3 {
    grid-template-columns: 1fr;
  }

  .vin-row {
    grid-template-columns: 1fr;
  }

  .modal-card {
    margin: 10vh 12px;
  }
}
/* =========================================================
   FIX SELECT OVERFLOW IN MODAL
   ========================================================= */

/* Allow grid children to shrink */
.row-3 > * {
  min-width: 0;
}

/* Force selects to stay inside cells */
.row-3 select {
  width: 100%;
  max-width: 100%;
}

/* Safety for all modal inputs */
.modal-card input,
.modal-card select {
  box-sizing: border-box;
}

/* Prevent any internal overflow */
.modal-card {
  overflow: hidden;
}
/* ================= CONTACT FORM — FINAL POLISH ================= */

.contact-card {
  padding: 22px;
}

.contact-form .row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 15px;
  background: #fff;
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(47,110,242,.08);
}

.contact-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.contact-actions .btn {
  height: 46px;
  padding: 0 20px;
}

/* ================= RIGHT COLUMN BALANCE ================= */

.hero-grid aside.card {
  padding: 22px;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
  .contact-form .row-2 {
    grid-template-columns: 1fr;
  }

  .contact-actions {
    flex-direction: column;
  }

  .contact-actions .btn {
    width: 100%;
  }
}
.badge {
  display:inline-block;
  padding:4px 10px;
  border-radius:999px;
  font-size:13px;
  font-weight:600;
}

.badge-used {
  background:#eef3ff;
  color:#1d4ed8;
}

.badge-warranty {
  background:#ecfdf5;
  color:#047857;
}
/* CONSENT UI FIX */
.consent-group {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.consent-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 14px 16px;
}

.consent-item.required {
  border-left: 4px solid #2563eb;
}

.consent-label {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  cursor: pointer;
}

.consent-label input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
}

.consent-text {
  font-size: 14px;
  line-height: 1.6;
}

.consent-text strong {
  display: block;
  margin-bottom: 4px;
}

.consent-text p {
  margin: 4px 0;
}

.fine-print {
  font-size: 12.5px;
  color: #6b7280;
}
