/* ========================================================
   Public van-rental flow (listing / detail / booking / success)
   Reuses design tokens from assets/style.css (:root vars, .btn, .section,
   .page-header, .page-gallery + lightbox) — this file only adds the
   rental-specific components.
   ======================================================== */

/* ── Vehicle grid (listing) ── */
.rental-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin-top: 2rem;
}
.rental-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .25s var(--ease-out), transform .25s var(--ease-out);
}
.rental-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.rental-card-img { aspect-ratio: 4/3; overflow: hidden; background: var(--bg); position: relative; }
.rental-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rental-card-inactive-badge {
  position: absolute; top: .7rem; left: .7rem;
  background: rgba(15,15,17,.75); color: var(--white);
  font-size: .7rem; font-weight: 700; padding: .25rem .6rem; border-radius: 100px;
}
.rental-card-body { padding: 1.35rem 1.4rem 1.5rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.rental-card-brand { font-size: .78rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.rental-card-name { font-size: 1.2rem; font-weight: 800; color: var(--blue); }
.rental-card-desc { font-size: .9rem; color: var(--muted); line-height: 1.55; flex: 1; }
.rental-card-specs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .2rem; }
.rental-chip {
  font-size: .76rem; font-weight: 600; color: var(--text);
  background: var(--blue-light); border-radius: 100px; padding: .3rem .7rem;
}
.rental-card-price { font-size: .95rem; color: var(--text); margin-top: .3rem; }
.rental-card-price strong { color: var(--orange); font-size: 1.2rem; }
.rental-card-actions { display: flex; gap: .6rem; margin-top: .6rem; }
.rental-card-actions .btn { flex: 1; justify-content: center; }
.rental-empty { text-align: center; padding: 4rem 1rem; color: var(--muted); }
.rental-empty i { font-size: 2.5rem; margin-bottom: 1rem; display: block; }

@media (max-width: 1000px) { .rental-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .rental-grid { grid-template-columns: 1fr; } }

/* ── How it works / benefits (listing intro) ── */
.rental-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2.5rem 0;
}
.rental-step { text-align: center; padding: 1.5rem 1rem; }
.rental-step-num {
  width: 44px; height: 44px; margin: 0 auto .9rem;
  background: var(--blue); color: var(--white);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.1rem;
}
.rental-step h3 { font-size: 1rem; color: var(--blue); margin-bottom: .4rem; }
.rental-step p { font-size: .87rem; color: var(--muted); line-height: 1.5; }

.rental-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 2.5rem;
}
.rental-benefit { display: flex; gap: .8rem; align-items: flex-start; }
.rental-benefit i { color: var(--orange); font-size: 1.3rem; margin-top: .1rem; flex-shrink: 0; }
.rental-benefit h4 { font-size: .95rem; color: var(--blue); margin-bottom: .2rem; }
.rental-benefit p { font-size: .84rem; color: var(--muted); line-height: 1.5; }

@media (max-width: 900px) {
  .rental-steps, .rental-benefits { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .rental-steps, .rental-benefits { grid-template-columns: 1fr; }
}

/* ── Vehicle detail ── */
.rental-detail {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 3rem;
  align-items: start;
}
.rental-gallery-main {
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg);
  margin-bottom: .75rem;
}
.rental-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rental-gallery-thumbs { display: flex; gap: .6rem; flex-wrap: wrap; }
.rental-gallery-thumbs .page-gallery-item {
  width: 84px; height: 64px; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid transparent; cursor: pointer; margin: 0;
}
.rental-gallery-thumbs .page-gallery-item.active { border-color: var(--orange); }
.rental-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.rental-detail-title { font-size: 1.9rem; font-weight: 800; color: var(--blue); margin: 1.75rem 0 .5rem; }
.rental-detail-meta { color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; }
.rental-detail-desc { font-size: .97rem; line-height: 1.7; color: var(--text); margin-bottom: 2rem; }

.rental-section-h { font-size: 1.15rem; font-weight: 700; color: var(--blue); margin: 2rem 0 1rem; padding-bottom: .6rem; border-bottom: 1px solid var(--border); }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table tr:last-child { border-bottom: none; }
.specs-table th, .specs-table td { text-align: left; padding: .65rem 0; font-size: .92rem; font-weight: 400; }
.specs-table th { color: var(--muted); font-weight: 600; width: 45%; }
.specs-table td { color: var(--text); font-weight: 600; }

.pricing-table { width: 100%; border-collapse: collapse; margin-bottom: .5rem; }
.pricing-table th, .pricing-table td { text-align: left; padding: .7rem .5rem; font-size: .9rem; border-bottom: 1px solid var(--border); }
.pricing-table th { color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.pricing-table td.price { font-weight: 700; color: var(--blue); text-align: right; }
.pricing-note { font-size: .85rem; color: var(--muted); margin-top: .5rem; }

/* Sticky sidebar CTA */
.rental-sidebar {
  position: sticky;
  top: calc(var(--header-h, 76px) + 1.5rem);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.rental-sidebar-price { font-size: .9rem; color: var(--muted); margin-bottom: .2rem; }
.rental-sidebar-price strong { display: block; font-size: 1.7rem; color: var(--orange); font-weight: 800; }
.rental-sidebar .btn { width: 100%; justify-content: center; margin-top: 1rem; }
.rental-sidebar-note { font-size: .8rem; color: var(--muted); margin-top: .8rem; text-align: center; }

@media (max-width: 960px) {
  .rental-detail { grid-template-columns: 1fr; }
  .rental-sidebar { position: static; }
}

/* ── Availability calendar (public, read-only-ish) ── */
.avail-cal { margin-top: 1rem; }
.avail-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .8rem; }
.avail-cal-head h4 { font-size: .95rem; color: var(--blue); }
.avail-cal-nav button {
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 30px; height: 30px; cursor: pointer; color: var(--text);
}
.avail-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.avail-cal-dow { font-size: .68rem; text-transform: uppercase; color: var(--muted); text-align: center; padding: .3rem 0; font-weight: 700; }
.avail-cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; border-radius: var(--radius-sm); background: var(--bg); color: var(--text);
}
.avail-cal-day.is-outside { visibility: hidden; }
.avail-cal-day.is-past { color: var(--border); }
.avail-cal-day.is-booked { background: #fee2e2; color: #991b1b; text-decoration: line-through; }
.avail-cal-day.is-today { box-shadow: inset 0 0 0 2px var(--orange); font-weight: 800; }
.avail-cal-legend { display: flex; gap: 1.25rem; margin-top: .8rem; font-size: .78rem; color: var(--muted); }
.avail-cal-legend span { display: inline-flex; align-items: center; gap: .35rem; }
.avail-cal-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.avail-cal-legend .free i { background: var(--bg); border: 1px solid var(--border); }
.avail-cal-legend .booked i { background: #fee2e2; }

/* ========================================================
   Booking wizard
   ======================================================== */
.book-steps { display: flex; gap: 0; margin-bottom: 2.5rem; }
.book-step-tab {
  flex: 1; text-align: center; padding: 0 0 1rem; position: relative;
  color: var(--muted); font-size: .88rem; font-weight: 700;
  border-bottom: 3px solid var(--border);
}
.book-step-tab .num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--border); color: var(--white);
  font-size: .82rem; margin-right: .5rem;
}
.book-step-tab.active { color: var(--blue); border-bottom-color: var(--orange); }
.book-step-tab.active .num { background: var(--orange); }
.book-step-tab.done .num { background: var(--blue); }

.book-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 2rem; margin-bottom: 1.5rem; }
.book-panel[hidden] { display: none; }
.book-panel h2 { font-size: 1.2rem; color: var(--blue); margin-bottom: 1.4rem; }

.book-vehicle-preview { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.book-vehicle-preview img { width: 96px; height: 72px; object-fit: cover; border-radius: var(--radius-sm); }
.book-vehicle-preview h3 { font-size: 1.05rem; color: var(--blue); }
.book-vehicle-preview p { font-size: .85rem; color: var(--muted); }

.book-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1.1rem; margin-bottom: 1.1rem; }
.book-form-row .form-group { margin: 0; }
.book-panel label { display: block; font-size: .85rem; font-weight: 700; color: var(--text); margin-bottom: .35rem; }
.book-panel label .req { color: var(--orange); }
.book-panel input, .book-panel select, .book-panel textarea {
  width: 100%; padding: .7rem .9rem; border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-family: inherit; font-size: .95rem; background: var(--white); color: var(--text);
}
.book-panel textarea { resize: vertical; min-height: 90px; }
.book-field-error { color: #b91c1c; font-size: .78rem; margin-top: .3rem; display: none; }
.book-field-error.show { display: block; }

.book-availability-msg {
  display: flex; align-items: center; gap: .6rem;
  padding: .9rem 1.1rem; border-radius: var(--radius); font-size: .92rem; font-weight: 600; margin: 1rem 0;
}
.book-availability-msg.ok { background: #dcfce7; color: #166534; }
.book-availability-msg.bad { background: #fee2e2; color: #991b1b; }
.book-availability-msg.checking { background: var(--bg); color: var(--muted); }
.book-availability-msg[hidden] { display: none; }

.book-quote { background: var(--bg); border-radius: var(--radius); padding: 1.1rem 1.3rem; margin-top: 1rem; }
.book-quote-row { display: flex; justify-content: space-between; font-size: .9rem; padding: .3rem 0; }
.book-quote-row.total { font-weight: 800; color: var(--blue); font-size: 1.1rem; border-top: 1px solid var(--border); margin-top: .4rem; padding-top: .6rem; }

.book-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.75rem; }
.book-actions .btn-outline-light { color: var(--blue); border-color: var(--border); }

.book-summary-section { margin-bottom: 1.5rem; }
.book-summary-section h4 { font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-bottom: .6rem; }
.book-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem 1.5rem; font-size: .92rem; }
.book-summary-grid dt { color: var(--muted); }
.book-summary-grid dd { font-weight: 600; color: var(--text); }
.book-edit-link { font-size: .8rem; color: var(--orange); text-decoration: none; font-weight: 700; }

.book-submit-error {
  background: #fee2e2; color: #991b1b; padding: .9rem 1.1rem; border-radius: var(--radius);
  font-size: .9rem; margin-bottom: 1.25rem;
}
.book-submit-error[hidden] { display: none; }

.honeypot-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ========================================================
   Success / confirmation page
   ======================================================== */
.success-box {
  max-width: 640px; margin: 0 auto; text-align: center;
  background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
}
.success-icon {
  width: 72px; height: 72px; margin: 0 auto 1.5rem;
  background: #dcfce7; color: #166534; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 2rem;
}
.success-box h1 { font-size: 1.6rem; color: var(--blue); margin-bottom: .6rem; }
.success-box > p { color: var(--muted); margin-bottom: 2rem; }
.success-summary { text-align: left; background: var(--bg); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.success-summary dl { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.25rem; font-size: .92rem; }
.success-summary dt { color: var(--muted); }
.success-summary dd { font-weight: 700; color: var(--text); text-align: right; }
