/* ==========================================================================
   ALVA RENT CARS — Design System
   Black + White + Yellow. Kuning hanya sebagai aksen.
   ========================================================================== */

:root {
  /* Warna */
  --yellow:        #FFD400;
  --yellow-dark:   #E6BE00;
  --yellow-soft:   #FFF9DB;

  --dark:          #0B0B0B;
  --dark-2:        #151515;
  --dark-3:        #1F1F1F;
  --dark-border:   #2A2A2A;

  --white:         #FFFFFF;
  --gray-50:       #FAFAFA;
  --gray-100:      #F5F5F5;
  --gray-200:      #EFEFEF;
  --border:        #E5E5E5;

  --text:          #111111;
  --text-muted:    #6B6B6B;
  --text-light:    #9A9A9A;
  --text-on-dark:  #E8E8E8;
  --text-on-dark-muted: #9A9A9A;

  --success:       #16A34A;
  --danger:        #DC2626;

  /* Bentuk */
  --r-sm:  8px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  24px;

  /* Bayangan — lembut & minimal */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow:    0 2px 8px rgba(0,0,0,.06);
  --shadow-md: 0 6px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,.12);

  /* Layout */
  --container: 1200px;
  --gutter: 20px;
  --nav-h: 72px;

  /* Transisi ringan */
  --t: .18s ease;
}

/* ==========================================================================
   RESET
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
  margin: 0;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.02em;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea { font: inherit; color: inherit; }

button { cursor: pointer; border: 0; background: none; }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 80px; }
.section-sm { padding-block: 56px; }

.section-dark {
  background: var(--dark);
  color: var(--text-on-dark);
}

.section-light { background: var(--gray-50); }

/* Header section */
.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow-dark);
  margin-bottom: 14px;
}

.section-dark .eyebrow { color: var(--yellow); }

.eyebrow::before {
  content: '';
  width: 24px;
  height: 2px;
  background: var(--yellow);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 12px;
}

.section-sub {
  color: var(--text-muted);
  font-size: 16px;
}

.section-dark .section-sub { color: var(--text-on-dark-muted); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 26px;
  border-radius: var(--r);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  text-align: center;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary {
  background: var(--yellow);
  color: var(--dark);
}
.btn-primary:hover { background: var(--yellow-dark); }

.btn-dark {
  background: var(--dark);
  color: var(--white);
}
.btn-dark:hover { background: var(--dark-3); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover { border-color: var(--dark); background: var(--gray-100); }

.btn-ghost-light {
  background: rgba(255,255,255,.08);
  color: var(--white);
  border: 1.5px solid rgba(255,255,255,.22);
  backdrop-filter: blur(4px);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.4); }

.btn-wa {
  background: #25D366;
  color: #fff;
}
.btn-wa:hover { background: #1eb857; }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 14px; border-radius: var(--r-sm); }
.btn-lg { padding: 16px 32px; font-size: 16px; }

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--dark);
  border-bottom: 1px solid var(--dark-border);
}

.nav-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  height: var(--nav-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  flex: none;
  margin-right: auto;
}

.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

/* Logo teks fallback bila admin belum upload logo */
.logo-text {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--white);
  line-height: 1.1;
}
.logo-text span { color: var(--yellow); }
.logo-text small {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--text-on-dark-muted);
  text-transform: uppercase;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-on-dark);
  transition: color var(--t), background var(--t);
}

.nav-menu a:hover { color: var(--white); background: var(--dark-3); }

.nav-menu a.active {
  color: var(--yellow);
}

.nav-actions { display: flex; align-items: center; gap: 12px; flex: none; }

/* Toggle hamburger */
/* Tombol menu: diberi garis tepi kuning agar jelas terlihat di latar hitam.
   Tanpa ini kontrasnya terlalu tipis dan pengunjung tidak menyadarinya. */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--r-sm);
  align-items: center;
  justify-content: center;
  color: var(--yellow);
  background: rgba(255, 212, 0, .12);
  border: 1.5px solid rgba(255, 212, 0, .45);
  transition: background var(--t), border-color var(--t);
}

.nav-toggle:hover,
.nav-toggle[aria-expanded="true"] {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--dark);
}

.nav-toggle svg { width: 22px; height: 22px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  /* nav pembungkus tidak boleh memakan ruang saat menu tertutup */
  .nav-inner > nav { position: static; }

  .nav-menu {
    position: absolute;
    top: var(--nav-h);
    left: calc(var(--gutter) * -1);
    right: calc(var(--gutter) * -1);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--dark);
    border-bottom: 1px solid var(--dark-border);
    padding: 8px var(--gutter) 20px;
    display: none;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }

  .nav-menu.open { display: flex; }

  .nav-menu a {
    padding: 14px 12px;
    border-radius: var(--r-sm);
    font-size: 16px;
  }

  .nav-menu li + li { border-top: 1px solid var(--dark-border); }

  .nav-actions .btn { padding: 10px 18px; font-size: 14px; }
}

@media (max-width: 420px) {
  .nav-actions .btn-nav-cta { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  position: relative;
  background: var(--dark);
  color: var(--white);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .5;
}

/* Overlay agar teks selalu terbaca di atas foto apa pun */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(100deg, rgba(11,11,11,.96) 0%, rgba(11,11,11,.82) 42%, rgba(11,11,11,.5) 100%),
    linear-gradient(to top, rgba(11,11,11,.9) 0%, transparent 45%);
}

/* Pola halus saat belum ada foto hero */
.hero-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 60% at 78% 30%, rgba(255,212,0,.13), transparent 65%),
    radial-gradient(ellipse 50% 50% at 12% 85%, rgba(255,212,0,.05), transparent 60%),
    var(--dark);
}

.hero-inner {
  position: relative;
  z-index: 2;
  padding-block: clamp(56px, 9vw, 96px);
}

.hero-content { max-width: 620px; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 15px 7px 11px;
  border-radius: 999px;
  background: rgba(255,212,0,.13);
  border: 1px solid rgba(255,212,0,.3);
  color: var(--yellow);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
}

.hero-badge svg { width: 15px; height: 15px; }

.hero h1 {
  font-size: clamp(34px, 6.2vw, 60px);
  line-height: 1.08;
  margin-bottom: 20px;
  letter-spacing: -.03em;
}

.hero h1 .accent { color: var(--yellow); }

.hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,.8);
  max-width: 520px;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  list-style: none;
}

.hero-highlights li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
}

.hero-highlights svg {
  width: 17px;
  height: 17px;
  color: var(--yellow);
  flex: none;
}

@media (max-width: 600px) {
  .hero-actions .btn { flex: 1 1 100%; }
  .hero-highlights { gap: 8px 18px; }
  .hero-highlights li { font-size: 13px; }
}

/* ==========================================================================
   BOOKING / SEARCH FORM
   ========================================================================== */

.booking {
  position: relative;
  z-index: 3;
  margin-top: -46px;
  margin-bottom: 0;
}

.booking-card {
  background: var(--white);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  border: 1px solid var(--border);
}

.booking-form {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }

/* Atribut hidden harus selalu menang atas display:flex di atas. */
[hidden] { display: none !important; }

.field label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.field label svg { width: 14px; height: 14px; color: var(--yellow-dark); }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--white);
  font-size: 14.5px;
  color: var(--text);
  transition: border-color var(--t);
  min-width: 0;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--yellow);
}

.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  padding-right: 34px;
}

.booking-form .btn { height: 44px; }

@media (max-width: 980px) {
  .booking-form { grid-template-columns: repeat(2, 1fr); }
  .booking-form .btn { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .booking { margin-top: -30px; }
  .booking-card { padding: 18px; }
  .booking-form { grid-template-columns: 1fr; gap: 12px; }
}

/* ==========================================================================
   CATEGORY CARDS
   ========================================================================== */

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 18px;
}

.category-card {
  position: relative;
  display: block;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--dark-2);
  border: 1px solid var(--dark-border);
  transition: border-color var(--t), transform var(--t);
  min-height: 180px;
}

.category-card:hover {
  border-color: var(--yellow);
  transform: translateY(-3px);
}

.category-media {
  position: absolute;
  inset: 0;
}

.category-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .45;
  transition: opacity var(--t);
}

.category-card:hover .category-media img { opacity: .6; }

.category-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,11,11,.95) 12%, rgba(11,11,11,.35) 100%);
}

.category-body {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 180px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--white);
}

.category-body h3 { font-size: 19px; margin-bottom: 4px; }

.category-body p {
  font-size: 13px;
  color: rgba(255,255,255,.68);
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.category-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow);
}

.category-price small { font-weight: 600; color: rgba(255,255,255,.55); }

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

.vehicle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 22px;
}

.vehicle-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}

.vehicle-card:hover {
  box-shadow: var(--shadow-md);
  border-color: #D8D8D8;
  transform: translateY(-3px);
}

.vehicle-media {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--gray-100);
  overflow: hidden;
}

.vehicle-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Placeholder saat foto mobil belum diunggah */
.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
  color: #C4C4C4;
}

.img-placeholder svg { width: 44px; height: 44px; }

.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  z-index: 1;
}

.badge-dark { background: var(--dark); color: var(--white); }

.badge-unavailable {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(11,11,11,.65);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  z-index: 1;
}

.vehicle-body {
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.vehicle-cat {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 5px;
}

.vehicle-name {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 12px;
  line-height: 1.3;
}

.vehicle-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin-bottom: 14px;
}

.vehicle-specs li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 6px;
  background: var(--gray-100);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.vehicle-specs svg { width: 13px; height: 13px; color: var(--text-light); }

.vehicle-foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.price small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-light);
}

/* ==========================================================================
   FEATURES
   ========================================================================== */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 26px 22px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--border);
  transition: border-color var(--t), box-shadow var(--t);
}

.feature-card:hover {
  border-color: var(--yellow);
  box-shadow: var(--shadow);
}

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--r);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--yellow-soft);
  color: var(--dark);
  margin-bottom: 16px;
}

.feature-icon svg { width: 23px; height: 23px; }

.feature-card h3 { font-size: 17px; margin-bottom: 7px; }

.feature-card p { font-size: 14.5px; color: var(--text-muted); }

/* ==========================================================================
   CTA
   ========================================================================== */

.cta {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--white);
}

.cta-bg { position: absolute; inset: 0; z-index: 0; }

.cta-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .3;
}

.cta-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11,11,11,.94), rgba(11,11,11,.7));
}

.cta-pattern {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: radial-gradient(ellipse 60% 100% at 85% 50%, rgba(255,212,0,.15), transparent 70%);
}

.cta-inner {
  position: relative;
  z-index: 1;
  padding-block: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-text { max-width: 560px; }

.cta-text h2 {
  font-size: clamp(25px, 3.6vw, 36px);
  margin-bottom: 12px;
}

.cta-text p { color: rgba(255,255,255,.78); font-size: 16px; }

@media (max-width: 700px) {
  .cta-inner { padding-block: 52px; }
  .cta-actions { width: 100%; }
  .cta-actions .btn { width: 100%; }
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.testimonial-card {
  padding: 26px 24px;
  border-radius: var(--r-lg);
  background: var(--white);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.stars { display: flex; gap: 2px; margin-bottom: 14px; }
.stars svg { width: 16px; height: 16px; color: var(--yellow); }
.stars svg.empty { color: var(--border); }

.testimonial-text {
  font-size: 15px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  flex: none;
  background: var(--gray-100);
}

.avatar-initial {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  color: var(--yellow);
  font-weight: 800;
  font-size: 16px;
}

.testimonial-author strong { display: block; font-size: 14.5px; font-weight: 700; }
.testimonial-author span { font-size: 12.5px; color: var(--text-light); }

/* ==========================================================================
   PAGE HEADER (halaman dalam)
   ========================================================================== */

.page-head {
  background: var(--dark);
  color: var(--white);
  padding-block: 52px;
  position: relative;
  overflow: hidden;
}

.page-head::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 100% at 80% 50%, rgba(255,212,0,.1), transparent 70%);
}

.page-head .container { position: relative; z-index: 1; }

.page-head h1 { font-size: clamp(27px, 4.4vw, 40px); margin-bottom: 10px; }
.page-head p { color: rgba(255,255,255,.72); max-width: 620px; }

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  font-size: 13px;
  color: rgba(255,255,255,.55);
  margin-bottom: 14px;
}

.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: var(--yellow); }
.breadcrumb li:not(:last-child)::after { content: '/'; margin-left: 8px; opacity: .5; }

/* ==========================================================================
   VEHICLE LIST PAGE
   ========================================================================== */

.listing {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .listing { grid-template-columns: 1fr; gap: 0; }
}

.filter-panel {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

.filter-panel h3 {
  font-size: 15px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-panel h3 svg { width: 17px; height: 17px; color: var(--yellow-dark); }

/* Tombol pembuka filter — hanya tampil di layar kecil. */
.filter-trigger { display: none; }

/* Judul & tombol tutup di dalam panel — hanya relevan di mode geser. */
.filter-head { display: none; }

/* Tombol "Terapkan" di dasar panel — hanya untuk mode geser. */
.filter-apply { display: none; }

.filter-backdrop { display: none; }

/* ---------------------------------------------------------------------------
   MOBILE: filter menjadi panel yang muncul dari bawah layar.
   Pengunjung langsung melihat daftar mobil, bukan daftar filter.
   --------------------------------------------------------------------------- */
@media (max-width: 900px) {

  .filter-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    background: var(--white);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
  }

  .filter-trigger svg { width: 16px; height: 16px; color: var(--text-muted); }

  /* Penanda jumlah filter aktif */
  .filter-trigger .count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--yellow);
    color: var(--dark);
    font-size: 11.5px;
    font-weight: 800;
  }

  .filter-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(11, 11, 11, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s ease, visibility .22s ease;
  }

  .filter-backdrop.show { opacity: 1; visibility: visible; }

  .filter-panel {
    position: fixed;
    z-index: 120;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-height: 82vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    border: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, .22);
    transform: translateY(100%);
    transition: transform .26s cubic-bezier(.32, .72, 0, 1);
  }

  .filter-panel.open { transform: none; }

  /* Sembunyikan judul versi desktop.
     Spesifisitas disamakan dengan aturan .filter-panel h3 di atas. */
  .filter-panel h3.filter-title-desktop { display: none; }

  .filter-head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 20px 20px 14px;
    border-bottom: 1px solid var(--border);
    flex: none;
  }

  .filter-head h3 { font-size: 16px; margin: 0; }

  /* Garis kecil penanda panel bisa digeser */
  .filter-head::before {
    content: '';
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 38px;
    height: 4px;
    border-radius: 999px;
    background: var(--border);
  }

  .filter-close {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    color: var(--text-muted);
    flex: none;
  }

  .filter-close svg { width: 17px; height: 17px; }

  /* Isi filter bisa di-scroll bila kategorinya banyak */
  .filter-panel form {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 16px 20px;
  }

  .filter-panel > a {
    margin: 0 20px 12px;
    width: calc(100% - 40px);
  }

  .filter-apply {
    display: block;
    flex: none;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border);
    background: var(--white);
  }

  /* Kunci scroll halaman saat panel terbuka */
  body.filter-open { overflow: hidden; }

  /* Target sentuh dilonggarkan agar nyaman ditekan jempol (minimal 44px) */
  .filter-panel .radio-item { padding: 12px 10px; min-height: 44px; }
  .filter-panel .radio-item input { width: 18px; height: 18px; }
  .filter-panel .filter-group > label { font-size: 13px; margin-bottom: 6px; }

  .filter-close { width: 38px; height: 38px; }

  .filter-trigger,
  .listing-bar .sort-select { min-height: 44px; }

  .filter-panel > a { min-height: 44px; }
}

/* Tombol "Sewa Sekarang" di kartu mobil — lebih mudah ditekan di ponsel */
@media (max-width: 640px) {
  .vehicle-foot .btn { min-height: 40px; padding-inline: 14px; }
}

.filter-group { margin-bottom: 18px; }

.filter-group > label {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.radio-list { list-style: none; display: flex; flex-direction: column; gap: 2px; }

.radio-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 14px;
  transition: background var(--t);
}

.radio-item:hover { background: var(--gray-100); }

.radio-item input { accent-color: var(--yellow); width: 15px; height: 15px; flex: none; margin: 0; }

.radio-item.checked { background: var(--yellow-soft); font-weight: 600; }

.listing-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.listing-count { font-size: 14.5px; color: var(--text-muted); }
.listing-count strong { color: var(--text); }

/* Mobile: tombol Filter di kiri, Urutkan di kanan, jumlah hasil di bawahnya. */
@media (max-width: 900px) {
  .listing-bar {
    gap: 10px;
    margin-top: 0;
    margin-bottom: 16px;
  }

  /* Rapatkan daftar ke header agar mobil terlihat lebih cepat. */
  .listing-section { padding-top: 20px; }

  .listing-bar .filter-trigger { order: 1; flex: 1 1 auto; justify-content: center; }
  .listing-bar form { order: 2; flex: 1 1 auto; }
  .listing-bar .sort-select { width: 100%; }

  .listing-count {
    order: 3;
    flex: 1 1 100%;
    font-size: 13.5px;
  }
}

.sort-select {
  padding: 9px 34px 9px 13px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  appearance: none;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236B6B6B' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gray-100);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}

.chip svg { width: 13px; height: 13px; }
.chip a:hover { color: var(--danger); }

/* ==========================================================================
   VEHICLE DETAIL
   ========================================================================== */

.detail-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 36px;
  align-items: start;
}

@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; gap: 26px; }
}

.detail-media {
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--border);
  aspect-ratio: 4 / 3;
  position: relative;
}

.detail-media img { width: 100%; height: 100%; object-fit: cover; }

.detail-panel {
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  background: var(--white);
  position: sticky;
  top: calc(var(--nav-h) + 20px);
}

@media (max-width: 900px) {
  .detail-panel { position: static; }
}

.detail-price {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 14px 16px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r);
  margin-bottom: 20px;
}

.detail-price strong { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.detail-price span { font-size: 14px; color: var(--text-muted); font-weight: 600; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.spec-item {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  text-align: center;
}

.spec-item svg { width: 19px; height: 19px; color: var(--yellow-dark); margin: 0 auto 7px; }
.spec-item strong { display: block; font-size: 14.5px; font-weight: 700; }
.spec-item span { font-size: 11.5px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

.prose h2 { font-size: 21px; margin: 28px 0 12px; }
.prose h3 { font-size: 17px; margin: 22px 0 8px; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose p { margin-bottom: 14px; color: var(--text-muted); }
.prose ul { padding-left: 20px; margin-bottom: 16px; color: var(--text-muted); }
.prose li { margin-bottom: 6px; }
.prose strong { color: var(--text); }

.facility-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 9px;
  list-style: none;
}

.facility-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  font-size: 14px;
  font-weight: 600;
}

.facility-list svg { width: 15px; height: 15px; color: var(--success); flex: none; }

/* Form booking di halaman detail */
.detail-booking {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.detail-booking .field-full { grid-column: 1 / -1; }

/* --- Pilihan cara pengambilan --- */
.field-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.field-legend svg { width: 14px; height: 14px; color: var(--yellow-dark); }

.pickup-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

@media (max-width: 480px) {
  .pickup-choice { grid-template-columns: 1fr; }
}

.pickup-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  cursor: pointer;
  background: var(--white);
  transition: border-color var(--t), background var(--t);
  min-height: 44px;
}

.pickup-option:hover { border-color: var(--text-light); }

.pickup-option.selected {
  border-color: var(--yellow);
  background: var(--yellow-soft);
}

.pickup-option input {
  accent-color: var(--yellow-dark);
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: none;
}

.pickup-option strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
}

.pickup-option small {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}

.field-hint {
  font-size: 12.5px;
  color: var(--text-light);
  margin-top: 5px;
  display: block;
}

/* --- Kotak alamat garasi --- */
.garage-box {
  display: flex;
  gap: 11px;
  padding: 13px 14px;
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
}

.garage-box > svg {
  width: 17px;
  height: 17px;
  color: var(--yellow-dark);
  flex: none;
  margin-top: 2px;
}

.garage-box strong { display: block; font-size: 13.5px; font-weight: 700; }

.garage-box p {
  font-size: 13.5px;
  color: var(--text-muted);
  margin: 3px 0 0;
  line-height: 1.5;
}

.garage-box a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--yellow-dark);
}

.garage-box a:hover { text-decoration: underline; }
.garage-box a svg { width: 12px; height: 12px; }

/* ==========================================================================
   CONTACT
   ========================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.contact-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  background: var(--white);
  transition: border-color var(--t);
}

.contact-card:hover { border-color: var(--yellow); }

.contact-card .feature-icon { margin-bottom: 14px; }
.contact-card h3 { font-size: 16px; margin-bottom: 6px; }
.contact-card p { font-size: 14.5px; color: var(--text-muted); word-break: break-word; }
.contact-card a { color: var(--text-muted); }
.contact-card a:hover { color: var(--yellow-dark); }

.map-embed {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 7;
  background: var(--gray-100);
}

.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

@media (max-width: 700px) { .map-embed { aspect-ratio: 4 / 3; } }

/* ==========================================================================
   EMPTY / ERROR STATES
   ========================================================================== */

.empty {
  text-align: center;
  padding: 64px 24px;
  border: 1px dashed var(--border);
  border-radius: var(--r-lg);
  background: var(--gray-50);
}

.empty-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text-light);
}

.empty-icon svg { width: 26px; height: 26px; }
.empty h3 { font-size: 18px; margin-bottom: 7px; }
.empty p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }

.error-page {
  min-height: 62vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 64px;
}

.error-code {
  font-size: clamp(72px, 15vw, 130px);
  font-weight: 800;
  line-height: 1;
  color: var(--dark);
  letter-spacing: -.04em;
}

.error-code span { color: var(--yellow); }

/* ==========================================================================
   FOOTER
   ========================================================================== */

.footer {
  background: var(--dark);
  color: var(--text-on-dark-muted);
  padding-block: 56px 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.3fr;
  gap: 36px;
  padding-bottom: 40px;
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}

@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
}

.footer-brand img { height: 40px; width: auto; margin-bottom: 16px; }
.footer-brand .logo-text { margin-bottom: 16px; }
.footer-brand p { font-size: 14.5px; max-width: 320px; margin-bottom: 20px; }

.footer h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-links a {
  font-size: 14.5px;
  color: var(--text-on-dark-muted);
  transition: color var(--t);
}

.footer-links a:hover { color: var(--yellow); }

.footer-contact { list-style: none; display: flex; flex-direction: column; gap: 13px; }

.footer-contact li {
  display: flex;
  gap: 11px;
  font-size: 14.5px;
  align-items: flex-start;
}

.footer-contact svg { width: 16px; height: 16px; color: var(--yellow); flex: none; margin-top: 3px; }
.footer-contact a:hover { color: var(--yellow); }

.socials { display: flex; gap: 10px; }

.social-link {
  width: 38px;
  height: 38px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-3);
  border: 1px solid var(--dark-border);
  color: var(--text-on-dark);
  transition: background var(--t), color var(--t), border-color var(--t);
}

.social-link:hover { background: var(--yellow); color: var(--dark); border-color: var(--yellow); }
.social-link svg { width: 17px; height: 17px; }

.footer-bottom {
  border-top: 1px solid var(--dark-border);
  padding-block: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13.5px;
}

.footer-bottom a:hover { color: var(--yellow); }

/* ==========================================================================
   FLOATING WHATSAPP
   ========================================================================== */

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 16px rgba(37,211,102,.4);
  transition: transform var(--t);
}

.wa-float:hover { transform: scale(1.06); }
.wa-float svg { width: 27px; height: 27px; }

@media (max-width: 560px) {
  .wa-float { width: 50px; height: 50px; right: 14px; bottom: 14px; }
  .wa-float svg { width: 25px; height: 25px; }
}

/* ==========================================================================
   ALERTS
   ========================================================================== */

.alert {
  padding: 13px 16px;
  border-radius: var(--r);
  font-size: 14.5px;
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.alert-success { background: #F0FDF4; border: 1px solid #BBF7D0; color: #166534; }
.alert-error   { background: #FEF2F2; border: 1px solid #FECACA; color: #991B1B; }
.alert-info    { background: var(--yellow-soft); border: 1px solid #FDE68A; color: #854D0E; }

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 12px 20px;
  background: var(--yellow);
  color: var(--dark);
  font-weight: 700;
  border-radius: 0 0 var(--r) 0;
}

.skip-link:focus { left: 0; top: 0; }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-3 { margin-top: 24px; }
.mb-3 { margin-bottom: 24px; }

@media (max-width: 640px) {
  .section { padding-block: 56px; }
  .section-sm { padding-block: 40px; }
  .section-head { margin-bottom: 32px; }
}

/* Hormati preferensi pengguna yang mengurangi animasi */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* Print: sembunyikan elemen interaktif */
@media print {
  .nav, .footer, .wa-float, .booking, .cta { display: none !important; }
}
