/* ==========================================================================
   NewMississippi — site styles
   Colors come from the New Magnolia flag: navy field, gold star, white bloom.
   Change a value in :root and it changes everywhere.
   ========================================================================== */
:root{
  --navy:#102040; --navy-deep:#0A1630; --navy-soft:#1B3057;
  --gold:#E0A81C; --gold-deep:#B9860B;
  --brick:#9C2B22;
  --paper:#FFFFFF; --wash:#E9ECE7; --line:#CDD2CC;
  --text:#16202E; --muted:#5A6675;
  --on-navy:#EEF1F6; --on-navy-muted:#9AA9C2;
  --price:#102040;
  --radius:3px;
  color-scheme:light dark;
  box-sizing:border-box;
  padding-top:env(safe-area-inset-top,0px);
  padding-bottom:env(safe-area-inset-bottom,0px);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --paper:#151C27; --wash:#0E141C; --line:#2B3542;
    --text:#E6EBF2; --muted:#94A2B4;
    --navy:#0D1B36; --navy-deep:#080F1F; --navy-soft:#1A2C4E;
    --price:#E0A81C;
  }
}
:root[data-theme="dark"]{
  --paper:#151C27; --wash:#0E141C; --line:#2B3542;
  --text:#E6EBF2; --muted:#94A2B4;
  --navy:#0D1B36; --navy-deep:#080F1F; --navy-soft:#1A2C4E;
  --price:#E0A81C;
}
html{scroll-padding-top:calc(76px + env(safe-area-inset-top,0px));}
*,*::before,*::after{box-sizing:border-box;}
body{
  margin:0; background:var(--wash); color:var(--text);
  font-family:"Source Sans 3", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size:17px; line-height:1.55; -webkit-text-size-adjust:100%;
  font-variant-numeric:tabular-nums;
  display:flex; flex-direction:column; min-height:100vh;
}
main{flex:1;}
h1,h2,h3{font-family:"Bricolage Grotesque","Source Sans 3",system-ui,sans-serif; font-weight:800; line-height:1.03; letter-spacing:-0.02em; margin:0;}
p{margin:0 0 .85em;}
a{color:inherit;}
img{max-width:100%; display:block;}
button{font:inherit; color:inherit;}
:focus-visible{outline:3px solid var(--gold); outline-offset:2px;}
@media (prefers-reduced-motion: reduce){*{animation:none !important; transition:none !important;}}
.wrap{width:100%; max-width:1120px; margin:0 auto; padding:0 20px;}
.narrow{max-width:940px;}
.sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap;}

/* ---------- header ---------- */
.topbar{position:sticky; top:env(safe-area-inset-top,0px); z-index:60; background:var(--navy-deep); color:var(--on-navy); border-bottom:2px solid var(--gold);}
.topbar .wrap{display:flex; align-items:center; gap:18px; min-height:68px; flex-wrap:wrap;}
.brand{display:flex; align-items:center; gap:11px; text-decoration:none; margin-right:auto; padding:8px 0;}
.brand svg{width:34px; height:34px; display:block; flex:none;}
.brand b{font-family:"Bricolage Grotesque",sans-serif; font-weight:800; font-size:23px; letter-spacing:-.025em; line-height:1;}
.brand small{display:block; font-size:11.5px; letter-spacing:.09em; color:var(--gold); font-weight:600; line-height:1.4;}
.navlinks{display:flex; gap:20px; align-items:center;}
.navlinks a{text-decoration:none; font-weight:600; font-size:15.5px; color:var(--on-navy); padding:6px 0; border-bottom:2px solid transparent;}
.navlinks a:hover{border-bottom-color:var(--gold);}
.navlinks a[aria-current="page"]{border-bottom-color:var(--gold); color:#fff;}
.callnum{font-weight:700; color:var(--gold); text-decoration:none; white-space:nowrap;}
@media (max-width:880px){
  .topbar .wrap{min-height:60px; gap:10px;}
  .navlinks{order:3; width:100%; overflow-x:auto; padding:8px 0; gap:16px; border-top:1px solid var(--navy-soft);}
  .brand b{font-size:20px;}
}

/* ---------- buttons ---------- */
.btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:12px 20px;
  border-radius:var(--radius); border:2px solid transparent; font-weight:700; font-size:16px;
  text-decoration:none; cursor:pointer; background:none;}
.btn-gold{background:var(--gold); color:#221806; border-color:var(--gold);}
.btn-gold:hover{background:var(--gold-deep); border-color:var(--gold-deep); color:#fff;}
.btn-navy{background:var(--navy); color:#fff; border-color:var(--navy);}
.btn-navy:hover{background:var(--navy-soft); border-color:var(--navy-soft);}
.btn-ghost{border-color:currentColor;}
.btn-ghost:hover{background:rgba(224,168,28,.16);}
.btn-line{border-color:var(--line); background:var(--paper);}
.btn-line:hover{border-color:var(--navy);}
.btn-sm{padding:8px 14px; font-size:14.5px;}
.btn[disabled]{opacity:.5; cursor:not-allowed;}

/* ---------- hero ---------- */
.hero{background:var(--navy); color:var(--on-navy); position:relative; overflow:hidden;}
.hero .petalwash{position:absolute; right:-90px; top:-70px; width:520px; opacity:.07; pointer-events:none;}
.hero .petalwash svg{width:100%; height:auto;}
.hero .wrap{position:relative; display:grid; grid-template-columns:1.35fr .9fr; gap:48px; padding:64px 20px; align-items:start;}
.hero h1{font-size:clamp(40px,6.4vw,70px); color:#fff; max-width:15ch;}
.hero .lede{font-size:19.5px; color:var(--on-navy-muted); max-width:46ch; margin-top:18px;}
.hero .cta{display:flex; gap:12px; flex-wrap:wrap; margin-top:28px;}
.lotcard{background:var(--navy-deep); border:1px solid var(--navy-soft); border-top:4px solid var(--gold); padding:22px;}
.lotcard h2{font-size:20px; color:#fff; margin-bottom:12px;}
.lotcard .addr{font-size:17px; color:var(--on-navy); margin-bottom:14px; white-space:pre-line;}
.hours{width:100%; border-collapse:collapse; font-size:15px; color:var(--on-navy-muted);}
.hours td{padding:3px 0; border-bottom:1px dotted var(--navy-soft);}
.hours td:last-child{text-align:right; color:var(--on-navy);}
.hours tr.today td{color:var(--gold); font-weight:700;}
@media (max-width:880px){ .hero .wrap{grid-template-columns:1fr; gap:32px; padding:44px 20px;} }

/* ---------- page banner (inner pages) ---------- */
.banner{background:var(--navy); color:#fff; padding:44px 0 40px; position:relative; overflow:hidden;}
.banner h1{font-size:clamp(34px,5vw,54px); color:#fff;}
.banner p{color:var(--on-navy-muted); margin:12px 0 0; max-width:58ch; font-size:18px;}

/* ---------- sections ---------- */
.section{padding:56px 0;}
.section.alt{background:var(--paper); border-top:1px solid var(--line); border-bottom:1px solid var(--line);}
.sechead{display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; flex-wrap:wrap;}
.sechead h2{font-size:clamp(28px,3.6vw,40px);}
.sechead p{color:var(--muted); margin:6px 0 0; max-width:60ch;}

/* ---------- news ---------- */
.newslist{border-top:2px solid var(--navy);}
.newsitem{display:grid; grid-template-columns:150px 1fr; gap:24px; padding:20px 0; border-bottom:1px solid var(--line);}
.newsitem .when{color:var(--brick); font-weight:700; font-size:15px;}
.newsitem h3{font-size:22px; margin-bottom:5px;}
.newsitem p{margin:0; color:var(--muted);}
@media (max-width:640px){ .newsitem{grid-template-columns:1fr; gap:4px;} }

/* ---------- inventory ---------- */
.invbar{display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin-bottom:24px;}
.invbar input,.invbar select{padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--paper); color:var(--text); font:inherit;}
.invbar input{min-width:220px; flex:1;}
.grid{display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:22px;}
.card{background:var(--paper); border:1px solid var(--line); display:flex; flex-direction:column;}
.card .shot{aspect-ratio:4/3; background:var(--wash); position:relative; overflow:hidden;}
.card .shot img{width:100%; height:100%; object-fit:cover;}
.card .shot .nophoto{display:flex; height:100%; align-items:center; justify-content:center; color:var(--muted); font-size:14px;}
.card .shot .count{position:absolute; right:8px; bottom:8px; background:rgba(8,15,31,.82); color:#fff; font-size:12.5px; font-weight:600; padding:3px 8px; border-radius:2px;}
.tag{position:absolute; left:0; top:12px; background:var(--brick); color:#fff; font-size:12.5px; font-weight:700; padding:4px 10px; letter-spacing:.04em;}
.tag.sold{background:var(--navy);}
.card .body{padding:16px 16px 18px; display:flex; flex-direction:column; flex:1;}
.card h3{font-size:21px; margin-bottom:2px;}
.card h3 a{text-decoration:none;}
.card h3 a:hover{color:var(--brick);}
.card .sub{color:var(--muted); font-size:15px; margin-bottom:12px;}
.price{font-family:"Bricolage Grotesque",sans-serif; font-weight:800; font-size:34px; letter-spacing:-.03em; color:var(--price); line-height:1;}
.price small{font-family:"Source Sans 3",sans-serif; font-size:14px; font-weight:600; color:var(--muted); display:block; letter-spacing:0;}
.specs{margin:14px 0 16px; font-size:14.5px; color:var(--muted); display:grid; grid-template-columns:auto 1fr; gap:3px 12px;}
.specs dt{font-weight:600; color:var(--text);}
.specs dd{margin:0; overflow-wrap:anywhere;}
.card .actions{margin-top:auto; display:flex; gap:8px; flex-wrap:wrap;}
.empty{background:var(--paper); border:1px dashed var(--line); padding:40px 24px; text-align:center; color:var(--muted);}

/* ---------- vehicle detail ---------- */
.detail{display:grid; grid-template-columns:1.25fr .85fr; gap:40px; align-items:start;}
@media (max-width:880px){ .detail{grid-template-columns:1fr; gap:26px;} }
.gallery .main{aspect-ratio:16/10; background:var(--paper); border:1px solid var(--line); overflow:hidden;}
.gallery .main img{width:100%; height:100%; object-fit:cover;}
.gallery .main .nophoto{display:flex; height:100%; align-items:center; justify-content:center; color:var(--muted);}
.thumbs{display:flex; gap:8px; flex-wrap:wrap; margin-top:8px;}
.thumbs button{width:84px; height:63px; padding:0; border:2px solid var(--line); background:var(--wash); cursor:pointer; overflow:hidden;}
.thumbs button[aria-current="true"]{border-color:var(--gold);}
.thumbs img{width:100%; height:100%; object-fit:cover;}
.buybox{background:var(--paper); border:1px solid var(--line); border-top:4px solid var(--gold); padding:22px; position:sticky; top:96px;}
@media (max-width:880px){ .buybox{position:static;} }
.buybox .price{font-size:46px; margin-bottom:6px;}
.buybox .actions{display:grid; gap:10px; margin:18px 0 0;}
.crumbs{font-size:15px; color:var(--muted); margin-bottom:18px;}
.crumbs a{color:var(--muted);}

/* ---------- contact ---------- */
.cols{display:grid; grid-template-columns:repeat(auto-fit,minmax(250px,1fr)); gap:34px;}
.cols h3{font-size:20px; margin-bottom:10px;}
.contactline{display:block; text-decoration:none; font-size:18px; font-weight:600; margin-bottom:6px;}
.contactline:hover{color:var(--brick);}
.socials{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px;}
.socials a{display:inline-flex; align-items:center; gap:7px; text-decoration:none; font-weight:600; font-size:15px; border:1px solid var(--line); padding:8px 13px; border-radius:var(--radius); background:var(--paper);}
.socials a:hover{border-color:var(--navy); color:var(--brick);}

/* ---------- forms ---------- */
.form{background:var(--paper); border:1px solid var(--line);}
.fieldset{padding:26px 24px; border-bottom:1px solid var(--line);}
.fieldset:last-of-type{border-bottom:0;}
.fieldset > h2{font-size:24px; margin-bottom:4px;}
.fieldset > .note{color:var(--muted); font-size:15px; margin-bottom:20px;}
.fields{display:grid; grid-template-columns:repeat(12,1fr); gap:16px;}
.f{grid-column:span 4; display:flex; flex-direction:column; gap:5px; min-width:0;}
.f.w2{grid-column:span 2;} .f.w3{grid-column:span 3;} .f.w5{grid-column:span 5;}
.f.w6{grid-column:span 6;} .f.w8{grid-column:span 8;} .f.w9{grid-column:span 9;} .f.w12{grid-column:span 12;}
@media (max-width:760px){ .f,.f.w2,.f.w3,.f.w5,.f.w8,.f.w9{grid-column:span 6;} .f.w6,.f.w12{grid-column:span 12;} }
@media (max-width:460px){ .f,.f.w2,.f.w3,.f.w5,.f.w6,.f.w8,.f.w9{grid-column:span 12;} }
.f label{font-size:14.5px; font-weight:600;}
.f label .req{color:var(--brick);}
.f input,.f select,.f textarea{padding:11px 12px; border:1px solid var(--line); border-radius:var(--radius); background:var(--wash); color:var(--text); font:inherit; width:100%;}
.f textarea{min-height:92px; resize:vertical;}
.f .hint{font-size:13px; color:var(--muted);}
.f.bad input,.f.bad select{border-color:var(--brick); background:rgba(156,43,34,.07);}
.f .err{font-size:13.5px; color:var(--brick); font-weight:600;}
.formfoot{padding:24px; background:var(--wash); display:flex; gap:12px; align-items:center; flex-wrap:wrap;}
.notice{border-left:4px solid var(--gold); background:rgba(224,168,28,.1); padding:14px 16px; font-size:15px; margin-bottom:22px;}
.summary{white-space:pre-wrap; font:inherit; margin:0;}
.toast{position:fixed; left:50%; transform:translateX(-50%); bottom:calc(22px + env(safe-area-inset-bottom,0px)); background:var(--navy-deep); color:#fff; padding:13px 20px; border-left:4px solid var(--gold); z-index:200; max-width:90vw; font-weight:600;}

/* ---------- footer ---------- */
footer.site{background:var(--navy-deep); color:var(--on-navy-muted); padding:34px 0; font-size:15px;}
footer.site .wrap{display:flex; gap:26px; justify-content:space-between; flex-wrap:wrap;}
footer.site a{color:var(--on-navy); text-decoration:none;}
footer.site a:hover{color:var(--gold);}
footer.site nav{display:flex; gap:18px; flex-wrap:wrap;}

@media print{ .topbar,footer.site,.formfoot,.btn,.crumbs{display:none !important;} body{background:#fff;} }
