*{box-sizing:border-box}body{margin:0;font-family:Arial,sans-serif;color:#17202a;line-height:1.6}a{color:#d9362b}.container{width:min(1100px,92%);margin:auto}header{background:#fff;border-bottom:1px solid #ddd;position:sticky;top:0;z-index:20}.nav{height:70px;display:flex;align-items:center;justify-content:space-between}.logo{font-size:20px;font-weight:900;text-decoration:none;color:#17202a}.logo span{color:#e43d30}.logo b{font-size:inherit;color:#19a95b}.nav nav{display:flex;gap:24px}.nav nav a{text-decoration:none;color:#17202a;font-weight:700}#menu{display:none}.hero{min-height:540px;display:flex;align-items:center;color:#fff;background:linear-gradient(90deg,#07101eee,#07101e66),url("https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?auto=format&fit=crop&w=1800&q=80") center/cover}.hero h1{font-size:clamp(45px,7vw,75px);line-height:1.02}.hero h1 span{color:#ff6258}.eyebrow{font-size:11px;letter-spacing:2px;font-weight:900;color:#e43d30}.btn{display:inline-block;border:0;border-radius:8px;padding:11px 18px;margin:5px 3px;text-decoration:none;font-weight:800;cursor:pointer}.primary{background:#e43d30;color:#fff}.whatsapp{background:#19a95b;color:#fff}.danger{background:#7b2830;color:#fff}.search{margin-top:-35px;position:relative}.searchbox{background:#fff;padding:20px;border-radius:12px;box-shadow:0 10px 30px #0002;display:grid;grid-template-columns:2fr 1fr 1fr;gap:12px}.searchbox input,.searchbox select,.card input,.card textarea,.form input,.form textarea{padding:12px;border:1px solid #d9dee3;border-radius:7px;width:100%;font:inherit;margin:5px 0}.section{padding:80px 0}.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}.car{border:1px solid #e3e6e9;border-radius:12px;overflow:hidden;background:#fff}.car img{width:100%;height:200px;object-fit:cover}.car>div{padding:17px}.car h3{margin:0;font-size:21px}.car strong{display:block;font-size:22px;margin:10px 0}.light{background:#f7f8fa}.two{display:grid;grid-template-columns:1.2fr .8fr;gap:50px;align-items:center}.card{background:#fff;border-radius:12px;padding:25px;box-shadow:0 8px 25px #0001}.modal{display:none;position:fixed;inset:0;background:#000b;z-index:100;align-items:center;justify-content:center;padding:20px}.modal.show{display:flex}.modalbox{background:#fff;width:min(800px,100%);border-radius:12px;overflow:hidden;position:relative}.modalbox>img{width:100%;height:330px;object-fit:cover}.pad{padding:25px}.modalbox #close{position:absolute;right:12px;top:10px;border:0;border-radius:50%;font-size:28px;width:40px;height:40px}.price{font-size:28px;font-weight:900}.admin{background:#f5f6f8;min-height:100vh}.narrow{max-width:900px}.heading{display:flex;justify-content:space-between;align-items:center}.form{display:grid;grid-template-columns:1fr 1fr;gap:5px 10px}.form textarea,.form button,.form p{grid-column:1/-1}.adminrow{background:#fff;border:1px solid #ddd;border-radius:10px;margin-top:12px;padding:10px;display:grid;grid-template-columns:65px 1fr auto auto;gap:12px;align-items:center}.adminrow img{width:65px;height:55px;object-fit:cover;border-radius:6px}footer{background:#111820;color:#fff;padding:25px 0}@media(max-width:750px){.nav nav{display:none;position:absolute;top:70px;left:0;right:0;background:#fff;padding:15px;flex-direction:column}.nav nav.open{display:flex}#menu{display:block;border:0;background:none;font-size:26px}.grid{grid-template-columns:1fr 1fr}.two,.searchbox,.form{grid-template-columns:1fr}.form textarea,.form button,.form p{grid-column:auto}.adminrow{grid-template-columns:55px 1fr}.adminrow .btn{grid-column:auto}}@media(max-width:500px){.grid{grid-template-columns:1fr}.hero h1{font-size:48px}.hero{min-height:500px}}
/* ===== Vehicle Details Gallery ===== */

.modalbox {
  width: min(1100px, 94vw);
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 18px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
  gap: 28px;
  padding: 28px;
}

.detail-gallery {
  min-width: 0;
}

.main-photo {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 14px;
  background: #eee;
}

.main-photo #mi {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block !important;
}

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 32px;
  line-height: 40px;
  cursor: pointer;
}

.gallery-arrow.left {
  left: 12px;
}

.gallery-arrow.right {
  right: 12px;
}

.gallery-arrow:active {
  transform: translateY(-50%) scale(0.94);
}

.photo-counter {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 11px;
  border-radius: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 14px;
}

.thumbnails {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  padding: 2px 2px 8px;
}

.thumbnail {
  flex: 0 0 82px;
  width: 82px;
  height: 64px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 9px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

.thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumbnail.active {
  border-color: #1677ff;
}

.detail-info {
  padding: 8px 4px;
}

.detail-info h2 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.1;
  margin: 6px 0 12px;
}

.detail-info .price {
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 18px;
}

.detail-info #ms {
  font-size: 16px;
  line-height: 1.7;
}

.detail-info #md {
  line-height: 1.7;
  margin: 18px 0;
}

.detail-info #mw {
  display: inline-block;
  margin-top: 10px;
}

.modal-close {
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 10;
  border: 0;
  background: transparent;
  font-size: 32px;
  cursor: pointer;
}

/* Mobile */
@media (max-width: 760px) {
  .detail-layout {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px;
  }

  .main-photo {
    aspect-ratio: 4 / 3;
  }

  .thumbnail {
    flex-basis: 72px;
    width: 72px;
    height: 56px;
  }

  .detail-info h2 {
    font-size: 26px;
  }
}


/* ===== Lock background when vehicle details are open ===== */

.modal {
  position: fixed;
  inset: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modalbox {
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.detail-layout {
  overscroll-behavior: contain;
}


body.modal-open {
  overflow: hidden;
  touch-action: none;
}

body.modal-open .modal {
  touch-action: pan-y;
}


/* ==================================================
   PREMIUM MOBILE DESIGN
   ================================================== */

@media (max-width: 760px) {

  /* Prevent horizontal overflow */
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 15px;
  }

  /* Header */
  header {
    padding: 14px 18px;
    min-height: 64px;
  }

  header .logo,
  header h1 {
    font-size: 24px;
    line-height: 1;
  }

  /* Hamburger */
  #menu {
    width: 46px;
    height: 46px;
    font-size: 30px;
    border-radius: 12px;
  }

  /* Navigation */
  #nav {
    width: 100%;
    left: 0;
    right: 0;
    border-radius: 0 0 16px 16px;
  }

  #nav a {
    display: block;
    padding: 14px 20px;
    font-size: 16px;
  }

  /* Main content */
  main,
  .container {
    width: 100%;
    max-width: 100%;
    padding-left: 14px;
    padding-right: 14px;
    box-sizing: border-box;
  }

  h1 {
    font-size: 30px;
    line-height: 1.15;
  }

  h2 {
    font-size: 25px;
  }

  h3 {
    font-size: 21px;
  }

  /* Vehicle cards */
  #cars {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .car {
    width: 100%;
    box-sizing: border-box;
    padding: 0;
    overflow: hidden;
    border-radius: 16px;
  }

  .car > img {
    width: 100% !important;
    height: 220px !important;
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .car > div {
    padding: 16px;
  }

  .car h3 {
    margin: 5px 0 8px;
    font-size: 22px;
  }

  .car strong {
    display: block;
    font-size: 26px;
    margin: 10px 0 14px;
  }

  /* Buttons */
  .car .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 10px 17px;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
  }

  /* Details modal */
  .modal {
    padding: 8px;
    align-items: flex-start;
  }

  .modalbox {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    margin-top: 3vh;
    border-radius: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .detail-layout {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 12px;
  }

  /* Gallery */
  .detail-gallery {
    width: 100%;
  }

  .main-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 15px;
    touch-action: pan-y;
  }

  .main-photo #mi {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Gallery arrows */
  .gallery-arrow {
    width: 42px;
    height: 42px;
    font-size: 29px;
    background: rgba(0,0,0,.68);
  }

  .gallery-arrow.left {
    left: 8px;
  }

  .gallery-arrow.right {
    right: 8px;
  }

  /* Photo counter */
  .photo-counter {
    right: 9px;
    bottom: 9px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 18px;
  }

  /* Thumbnails */
  .thumbnails {
    display: flex;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 2px 9px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .thumbnails::-webkit-scrollbar {
    display: none;
  }

  .thumbnail {
    flex: 0 0 72px;
    width: 72px;
    height: 56px;
    border-radius: 9px;
  }

  /* Details information */
  .detail-info {
    width: 100%;
    box-sizing: border-box;
    padding: 5px 3px 15px;
  }

  .detail-info h2 {
    font-size: 27px;
    line-height: 1.15;
    margin: 5px 0 10px;
  }

  .detail-info .price {
    font-size: 30px;
    margin: 8px 0 15px;
  }

  .detail-info #ms {
    font-size: 15px;
    line-height: 1.7;
  }

  .detail-info #md {
    font-size: 15px;
    line-height: 1.65;
  }

  /* WhatsApp button */
  .detail-info #mw {
    display: flex;
    width: 100%;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 13px;
    font-size: 16px;
    font-weight: 700;
  }

  /* Close button */
  .modal-close {
    position: sticky;
    float: right;
    top: 5px;
    right: 5px;
    width: 42px;
    height: 42px;
    font-size: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
  }

  /* Search/filter controls */
  input,
  select,
  textarea {
    width: 100%;
    min-height: 46px;
    box-sizing: border-box;
    font-size: 16px;
    border-radius: 10px;
  }

  /* Make vehicle status easier to read */
  #status {
    font-size: 15px;
    margin: 8px 0 16px;
  }
}

/* Very small phones */
@media (max-width: 390px) {

  header {
    padding-left: 12px;
    padding-right: 12px;
  }

  header .logo,
  header h1 {
    font-size: 21px;
  }

  .car > img {
    height: 195px !important;
  }

  .car > div {
    padding: 14px;
  }

  .car .btn {
    min-height: 46px;
    padding: 9px 13px;
    font-size: 15px;
  }

  .detail-layout {
    padding: 9px;
  }

  .main-photo {
    aspect-ratio: 4 / 3;
  }

  .thumbnail {
    flex-basis: 65px;
    width: 65px;
    height: 51px;
  }
}


/* ===== PREMIUM VEHICLE CARDS ===== */

.car {
  position: relative;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.car:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,.12);
}

.car > div {
  padding: 18px;
}

.car .eyebrow {
  color: #667085;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.car h3 {
  margin: 3px 0 8px;
  font-size: 23px;
  line-height: 1.2;
}

.car strong {
  display: block;
  font-size: 28px;
  margin: 10px 0;
  font-weight: 800;
}

.car .btn {
  border: 0;
  text-decoration: none;
  cursor: pointer;
  margin-right: 7px;
  margin-top: 4px;
}

.car .primary {
  min-width: 110px;
}

.car .whatsapp {
  min-width: 110px;
}

/* Vehicle information row */
.car-info-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0 14px;
}

.car-info-item {
  background: #f5f7fa;
  border-radius: 8px;
  padding: 7px 9px;
  font-size: 13px;
  color: #475467;
}

/* Status badges */
.car-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.car-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  background: #eef4ff;
  color: #175cd3;
}

.car-badge.financing {
  background: #ecfdf3;
  color: #027a48;
}

/* Mobile card polish */
@media (max-width: 760px) {

  .car {
    border-radius: 17px;
  }

  .car > div {
    padding: 16px;
  }

  .car h3 {
    font-size: 21px;
  }

  .car strong {
    font-size: 27px;
  }

  .car-info-row {
    gap: 6px;
  }

  .car-info-item {
    font-size: 12px;
    padding: 6px 8px;
  }

  .car-badge {
    font-size: 11px;
  }

  .car .btn {
    flex: 1;
    min-width: 0;
    margin-right: 5px;
  }
}


/* ===== VEHICLE PHOTO CARD ===== */

.car-photo-wrap {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #eee;
}

.car-photo-wrap img {
  display: block;
  width: 100%;
  height: 240px;
  object-fit: cover;
}

.photo-count {
  position: absolute;
  right: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 20px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.card-actions .btn {
  flex: 1;
  margin: 0 !important;
  text-align: center;
}

@media (max-width: 760px) {

  .car-photo-wrap img {
    height: 220px;
  }

  .card-actions {
    gap: 7px;
  }

}

@media (max-width: 390px) {

  .car-photo-wrap img {
    height: 195px;
  }

}


/* ===== PREMIUM VEHICLE DETAILS ===== */

.detail-info {
  position: relative;
}

.detail-info .eyebrow {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.detail-info h2 {
  font-size: 32px;
  line-height: 1.15;
  margin: 6px 0 12px;
}

.detail-info .price {
  font-size: 34px;
  font-weight: 900;
  margin: 8px 0 18px;
}

.detail-info #ms {
  background: #f5f7fa;
  padding: 12px 14px;
  border-radius: 10px;
  font-weight: 600;
  line-height: 1.5;
}

.detail-info #md {
  margin-top: 14px;
  line-height: 1.7;
  color: #475467;
}

.detail-info #mw {
  margin-top: 22px;
  min-height: 54px;
  font-size: 17px;
  font-weight: 800;
}

@media (max-width: 760px) {

  .detail-info h2 {
    font-size: 27px;
  }

  .detail-info .price {
    font-size: 31px;
  }

}


/* ===== PROFESSIONAL VEHICLE DETAILS ===== */

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 18px;
}

.detail-badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 20px;
  background: #eef4ff;
  color: #175cd3;
  font-size: 13px;
  font-weight: 800;
}

.detail-badge.success {
  background: #ecfdf3;
  color: #027a48;
}

.detail-specs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 20px;
}

.detail-spec {
  padding: 13px;
  background: #f7f8fa;
  border: 1px solid #eaecf0;
  border-radius: 12px;
}

.detail-spec-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #667085;
  margin-bottom: 4px;
}

.detail-spec-value {
  display: block;
  font-size: 15px;
  font-weight: 800;
  color: #101828;
}

.detail-description {
  margin-top: 8px;
}

.detail-description h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.detail-description p {
  margin: 0;
  line-height: 1.7;
  color: #475467;
}

@media (max-width: 760px) {

  .detail-specs {
    gap: 8px;
  }

  .detail-spec {
    padding: 11px;
  }

  .detail-spec-value {
    font-size: 14px;
  }

  .detail-badge {
    font-size: 12px;
    padding: 7px 10px;
  }

}


/* ===== PAYMENT INFORMATION ON VEHICLE CARDS ===== */

.payment-info {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0 4px;
}

.payment-info > div {
  padding: 10px 11px;
  background: #f8fafc;
  border: 1px solid #eaecf0;
  border-radius: 10px;
}

.payment-info span {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #667085;
  margin-bottom: 4px;
}

.payment-info b {
  display: block;
  font-size: 16px;
  font-weight: 800;
}

@media (max-width: 390px) {

  .payment-info {
    grid-template-columns: 1fr;
  }

}
.contact-buttons {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.contact-buttons .btn {
  flex: 1;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  border-radius: 13px;
  font-weight: 700;
  text-decoration: none;
}

.email-btn {
  background: #344054;
  color: #fff;
}

.email-btn:hover {
  opacity: .9;
}

@media (max-width: 600px) {
  .contact-buttons {
    flex-direction: column;
  }

  .contact-buttons .btn {
    width: 100%;
  }
}
.card-actions .email-btn {
  background: #344054;
  color: #fff;
}

.card-actions .email-btn:hover {
  opacity: .9;
}

@media (max-width: 600px) {
  .card-actions {
    flex-wrap: wrap;
  }

  .card-actions .btn {
    min-width: 0;
  }
}

.reserve-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #2563eb !important;
  color: #fff !important;
  min-height: 52px;
  text-decoration: none;
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
}

.finance-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: #16a34a !important;
  color: #fff !important;
  min-height: 52px;
  text-decoration: none;
  border-radius: 13px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 600px) {
  .contact-buttons {
    flex-direction: column !important;
  }

  .contact-buttons .btn {
    width: 100% !important;
  }
}


/* Inquiry form must appear above vehicle details */
#inquiryModal {
  z-index: 9999 !important;
}

#inquiryModal .inquiry-box {
  position: relative;
  z-index: 10000;
  max-height: 90vh;
  overflow-y: auto;
}

#inquiryModal input,
#inquiryModal textarea {
  width: 100%;
  box-sizing: border-box;
  margin-top: 6px;
  margin-bottom: 14px;
}

#inquiryModal label {
  display: block;
  font-weight: 600;
}

