/* Car Rental layout safety + premium styling
   Loads after style.css, so it fixes horizontal scroll without touching the rest of the site. */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

* {
  box-sizing: border-box;
}

img,
svg,
video,
iframe {
  max-width: 100%;
}

.kg-nav,
.page-hero,
.section,
.footer,
.car-detail-page,
.car-detail-hero,
.car-rental-list,
.rental-grid,
.rental-card,
.car-gallery-section,
.car-gallery {
  max-width: 100%;
  overflow-x: clip;
}

.kg-nav {
  width: 100%;
}

.page-hero.car-rental-hero {
  width: 100%;
  min-height: 360px;
  padding: 90px min(6vw, 82px) 65px;
  background: linear-gradient(135deg, rgba(12, 18, 22, .94), rgba(18, 26, 31, .84)), url('/uploads/heroes/hero-coastal-overlook-premium.png');
  background-size: cover;
  background-position: center;
  color: #fff;
}

.page-hero.car-rental-hero > div {
  width: min(980px, 100%);
}

.page-hero .kicker,
.section .kicker,
.car-detail-copy .kicker {
  color: #caa35a;
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 900;
}

.car-rental-list {
  background: linear-gradient(180deg, #fbfaf7 0%, #f3eadc 100%);
}

.section-head {
  width: 100%;
  max-width: 1188px;
  margin-left: auto;
  margin-right: auto;
}

.rental-grid {
  width: min(1188px, 100%);
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
  align-items: stretch;
}

.rental-card {
  width: 100%;
  min-width: 0;
  background: #fff;
  border: 1px solid rgba(202, 163, 90, .28);
  box-shadow: 0 18px 45px rgba(17, 24, 32, .10);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.rental-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #8a6422, #caa35a, #d8b56a);
  z-index: 1;
}

.rental-photo {
  width: 100%;
  height: 280px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #fff 0%, #f5f1e9 100%);
  border-bottom: 1px solid rgba(202, 163, 90, .18);
  overflow: hidden;
}

.rental-photo img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
}

.rental-body {
  padding: 30px 26px 24px;
  flex: 1;
}

.rental-cat {
  color: #8a6422 !important;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 12px;
}

.rental-card h3 {
  font-size: 24px;
  line-height: 1.15;
  color: #111820;
  margin: 0 0 14px;
}

.rental-card p {
  font-size: 16px;
  line-height: 1.62;
  color: #3f3b34;
}

.continue-btn,
.btn,
.nav-cta {
  background: linear-gradient(135deg, #8a6422, #caa35a 55%, #d8b56a) !important;
  color: #111 !important;
  font-weight: 900;
  border: 0;
  box-shadow: 0 10px 24px rgba(202, 163, 90, .28);
}

.rental-features,
.car-feature-bar {
  gap: 10px 12px;
  background: #fffdf8;
  border-top: 1px solid rgba(202, 163, 90, .22);
}

.rental-features {
  padding: 16px 18px 18px;
  display: flex;
  flex-wrap: wrap;
}

.feature-item,
.rental-features span,
.car-feature-bar span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 28px;
  color: #141414;
  font-size: 14px;
  line-height: 1.2;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 50%;
  background: rgba(202, 163, 90, .13);
  color: #8a6422;
}

.rental-features span::before,
.car-feature-bar span::before {
  content: none !important;
}

.car-detail-hero {
  width: min(1220px, 100%);
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 42px;
  align-items: center;
  padding: 55px min(6vw, 82px) 42px;
}

.car-detail-media {
  min-width: 0;
  background: linear-gradient(180deg, #fff, #f6f0e6);
  border: 1px solid rgba(202, 163, 90, .2);
  box-shadow: 0 20px 60px rgba(17, 24, 32, .08);
  padding: 22px;
  overflow: hidden;
}

.car-main-image {
  width: 100%;
  height: 520px;
  max-height: 70vh;
  object-fit: contain;
  display: block;
}

.car-detail-copy,
.car-detail-media {
  min-width: 0;
}

.car-feature-bar {
  width: min(1120px, calc(100% - 12vw));
  margin-left: auto;
  margin-right: auto;
  padding: 17px 0;
  display: flex;
  flex-wrap: wrap;
}

.car-feature-bar .feature-item {
  padding: 7px 11px;
  background: #fff;
  border: 1px solid rgba(202, 163, 90, .22);
}

.car-gallery {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.gallery-thumb {
  width: 100%;
  height: 205px;
  border: 1px solid rgba(202, 163, 90, .28);
  background: #fff;
  overflow: hidden;
}

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

@media (max-width: 980px) {
  .rental-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .car-detail-hero {
    grid-template-columns: 1fr;
  }
  .car-main-image {
    height: auto;
    max-height: 470px;
  }
  .car-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .page-hero.car-rental-hero {
    padding: 70px 5vw 45px;
  }
  .rental-grid,
  .car-gallery {
    grid-template-columns: 1fr;
  }
  .rental-photo {
    height: 235px;
  }
  .section-head {
    display: block;
  }
  .section-head .btn {
    margin-top: 18px;
    display: inline-flex;
  }
  .car-feature-bar {
    width: calc(100% - 10vw);
  }
}
