/* ===================================
   Vehicle list + vehicle detail — redesign layer
   BLUE  (#0174CD) = information & selection: filters, prices, feature
                     icons, rental-mode toggle, focus
   GREEN (#019524) = action & positive: Apply, Book, WhatsApp, "ready"
                     badges, included items
   Loaded by core/vehicle_list.html and core/vehicle_detail.html — remove
   their <link> (or run the revert script) to undo.
   =================================== */
:root {
    --vh-blue: var(--secondary-color, #0174CD);
    --vh-blue-dark: var(--secondary-dark, #045A9E);
    --vh-blue-soft: #E8F2FC;
    --vh-green: var(--primary-color, #019524);
    --vh-green-dark: var(--primary-dark, #017A1D);
    --vh-ink: #1E2F4D;
    --vh-line: #E6E9EE;
}

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

/* ----- Hero: navy → green like the other list pages, with a contour
   edge and three quick facts ----- */
.vehicle-hero {
    position: relative;
    background: linear-gradient(135deg, #101A34 0%, #1E2F4D 55%, #0F5132 130%);
    padding-bottom: 72px;
    overflow: hidden;
}
.vehicle-hero .page-hero-content { position: relative; z-index: 2; }
.vh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'JetBrains Mono', 'Poppins', monospace;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #9CCBF2;
    margin-bottom: 10px;
}
.vh-eyebrow::before,
.vh-eyebrow::after { content: ''; width: 24px; height: 1px; background: rgba(156, 203, 242, 0.5); }
.vh-facts {
    list-style: none;
    padding: 0;
    margin: 22px 0 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}
.vh-facts li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
}
.vh-facts i { color: #9CCBF2; }
.vehicle-hero .tour-hero-contour-edge { z-index: 1; }

/* ----- Filter panel ----- */
.vf {
    background: #fff;
    border: 1px solid var(--vh-line);
    border-radius: 18px;
    padding: 20px 22px;
    margin-top: -48px;               /* overlaps the hero's contour edge */
    position: relative;
    z-index: 3;
    box-shadow: 0 14px 34px rgba(16, 26, 52, 0.10);
    margin-bottom: 24px;
}
.vf-section + .vf-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--vh-line);
}
.vf-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6B7280;
}
.vf-label i { color: var(--vh-blue); font-size: 0.8rem; }
.vf-label small { text-transform: none; letter-spacing: 0; font-weight: 500; color: #9CA3AF; }

/* Type tabs: icon + name + count, one horizontal row (scrolls on phones) */
.vf-types {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 2px;
}
.vf-types::-webkit-scrollbar { display: none; }
.vf-type {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 8px 0 14px;
    border: 1.5px solid var(--vh-line);
    border-radius: 12px;
    background: #F8FAFC;
    color: var(--vh-ink);
    font-size: 0.86rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}
.vf-type i { color: var(--vh-blue); font-size: 0.9rem; width: 18px; text-align: center; transition: color 0.18s ease; }
.vf-type b {
    min-width: 24px;
    height: 24px;
    padding: 0 7px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--vh-line);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    color: #6B7280;
}
.vf-type:hover { border-color: var(--vh-blue); color: var(--vh-blue); background: var(--vh-blue-soft); }
.vf-type.active {
    background: var(--vh-blue);
    border-color: var(--vh-blue);
    color: #fff;
    box-shadow: 0 6px 16px rgba(1, 116, 205, 0.25);
}
.vf-type.active i { color: #fff; }
.vf-type.active b { background: rgba(255, 255, 255, 0.2); border-color: transparent; color: #fff; }
.vf-type.is-empty:not(.active) { opacity: 0.55; }
.vf-type:focus-visible { outline: 2px solid var(--vh-blue); outline-offset: 2px; }

/* Budget: presets + custom range */
.vf-budget-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vf-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.vf-preset {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1.5px solid var(--vh-line);
    background: #fff;
    color: var(--vh-ink);
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.vf-preset:hover { border-color: var(--vh-blue); color: var(--vh-blue); }
.vf-preset.active { background: var(--vh-blue-soft); border-color: var(--vh-blue); color: var(--vh-blue-dark); }
.vf-custom { display: flex; align-items: center; gap: 8px; }
.vf-field {
    display: inline-flex;
    align-items: center;
    height: 40px;
    border: 1.5px solid var(--vh-line);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
    margin: 0;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.vf-field:focus-within { border-color: var(--vh-blue); box-shadow: 0 0 0 3px rgba(1, 116, 205, 0.15); }
.vf-field span { padding: 0 2px 0 11px; color: #9CA3AF; font-weight: 600; font-size: 0.85rem; }
.vf-field input {
    width: 76px;
    border: 0;
    outline: none;
    padding: 0 10px 0 4px;
    font-size: 0.88rem;
    color: var(--vh-ink);
    background: transparent;
    -moz-appearance: textfield;
}
.vf-field input::-webkit-outer-spin-button,
.vf-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vf-dash { color: #9CA3AF; }
.vf-apply {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    height: 40px;
    padding: 0 18px;
    border: 0;
    border-radius: 10px;
    background: var(--vh-green);
    color: #fff;
    font-weight: 600;
    font-size: 0.86rem;
    cursor: pointer;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.vf-apply:hover { background: var(--vh-green-dark); box-shadow: 0 6px 16px rgba(1, 149, 36, 0.25); }
.vf-apply:focus-visible { outline: 2px solid var(--vh-green); outline-offset: 2px; }

/* Active filters */
.vf-active {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #F8FAFC;
}
.vf-active-label { font-size: 0.82rem; color: #6B7280; margin-right: 2px; }
.vf-active-label strong { color: var(--vh-ink); }
.vf-chip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 6px 4px 12px;
    border-radius: 999px;
    background: var(--vh-blue);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
}
.vf-chip i {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    transition: background-color 0.15s ease;
}
.vf-chip:hover { color: #fff; }
.vf-chip:hover i { background: rgba(255, 255, 255, 0.4); }
.vf-clear { margin-left: auto; font-size: 0.8rem; font-weight: 600; color: var(--vh-blue); text-decoration: none; }
.vf-clear:hover { text-decoration: underline; }

@media (max-width: 767.98px) {
    .vf { padding: 16px; margin-top: -36px; border-radius: 16px; }
    .vf-budget-row { flex-direction: column; align-items: stretch; }
    .vf-custom { flex-wrap: wrap; }
    .vf-field { flex: 1; }
    .vf-field input { width: 100%; }
    .vf-apply { flex-basis: 100%; justify-content: center; }
    .vf-clear { margin-left: 0; }
}

/* ----- Cards ----- */
.vehicle-card {
    border-color: var(--vh-line);
    border-radius: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.vehicle-card:hover {
    transform: translateY(-4px);
    border-color: #C9E0F5;
    box-shadow: 0 16px 34px rgba(16, 26, 52, 0.12);
}
.vehicle-img-wrap { overflow: hidden; }
.vehicle-img-wrap img { transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1); }
.vehicle-card:hover .vehicle-img-wrap img { transform: scale(1.06); }
.vehicle-img-wrap::after { background: linear-gradient(180deg, rgba(16, 26, 52, 0) 40%, rgba(16, 26, 52, 0.82) 100%); }
.type-badge { background: rgba(16, 26, 52, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vehicle-meta span { background: var(--vh-blue-soft); color: var(--vh-ink); }
.vehicle-meta span i { color: var(--vh-blue); }
.rental-mode-btn { cursor: pointer; }
.rental-mode-btn.active { color: var(--vh-blue); }
.v-price { color: var(--vh-blue); }
.btn-view-vehicle { transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease; }
.btn-view-vehicle:hover { border-color: var(--vh-blue); color: var(--vh-blue); background: var(--vh-blue-soft); }
.btn-whatsapp-vehicle { background: var(--vh-green); }
.btn-whatsapp-vehicle:hover { background: var(--vh-green-dark); }
.pagination .page-link { color: var(--vh-blue); }
.pagination .page-item.active .page-link { background: var(--vh-blue); border-color: var(--vh-blue); color: #fff; }

/* ----- Rental mode toggle: same on every card; driver-only vehicles
   show Self-Drive locked rather than hiding the toggle ----- */
.rental-mode-btn.is-unavailable,
.rental-mode-btn.is-unavailable:hover {
    cursor: not-allowed;
    color: #9CA3AF;
    background: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
}
.rental-mode-btn.is-unavailable i { font-size: 0.68rem; }
.rental-mode-btn.is-unavailable small {
    font-size: 0.64rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #B6BFCB;
}
/* On the detail page's blue booking header */
.booking-card-head .rental-mode-btn.is-unavailable { color: rgba(255, 255, 255, 0.45); }
.booking-card-head .rental-mode-btn.is-unavailable small { color: rgba(255, 255, 255, 0.4); }

/* Equal-height cards: price + buttons pinned to the bottom so they line
   up across a row whatever the description/highlights length */
.vehicle-card { display: flex; flex-direction: column; height: 100%; }
.vehicle-body { flex: 1; display: flex; flex-direction: column; }
.vehicle-price-row { margin-top: auto; }

/* ----- Vehicle card (pro layout) ----- */
.vc { border-radius: 18px; overflow: hidden; }
.vc-media {
    display: block;
    position: relative;
    aspect-ratio: 16 / 10;
    height: auto !important;
    overflow: hidden;
    background: #E9EEF4;
}
.vc-media .vehicle-img { width: 100%; height: 100% !important; object-fit: cover; display: block; }
.vc-media::after { background: linear-gradient(180deg, rgba(16, 26, 52, 0.28) 0%, rgba(16, 26, 52, 0) 38%) !important; }
.vc-media .vehicle-img-placeholder { height: 100%; display: flex; align-items: center; justify-content: center; color: #C3CCD8; }
.vc-media .type-badge,
.vc-media .vehicle-tag-badge,
.vc-media .avail-badge { z-index: 2; }
.vc-media:focus-visible { outline: 3px solid var(--vh-blue); outline-offset: -3px; }

.vc-body { padding: 18px 20px 20px; gap: 0; }
.vc-name { font-size: 1.12rem; font-weight: 700; line-height: 1.3; margin: 0 0 6px; }
.vc-name a { color: var(--vh-ink); text-decoration: none; transition: color 0.18s ease; }
.vc:hover .vc-name a, .vc-name a:hover { color: var(--vh-blue-dark); }
.vc-desc {
    font-size: 0.86rem;
    line-height: 1.55;
    color: #5B6676;
    margin: 0 0 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: calc(1.55em * 2);
}

/* Specs: three equal cells with dividers */
.vc-specs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0 0 14px;
    border: 1px solid var(--vh-line);
    border-radius: 12px;
    background: #F8FAFC;
}
.vc-specs > div { padding: 9px 10px; text-align: center; min-width: 0; }
.vc-specs > div + div { border-left: 1px solid var(--vh-line); }
.vc-specs dt {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8A96A6;
    margin-bottom: 2px;
}
.vc-specs dt i { color: var(--vh-blue); font-size: 0.7rem; }
.vc-specs dd {
    margin: 0;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--vh-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc .rental-mode-toggle { margin-bottom: 14px; }
.vc .rental-mode-btn { min-height: 38px; }

.vc-highlights { gap: 7px; margin-bottom: 16px; }
.vc-highlights li { font-size: 0.84rem; color: #374151; line-height: 1.4; }
.vc-highlights li i {
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #E7F6EA;
    color: var(--vh-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    margin-top: 1px;
}

/* Footer: price left, actions right */
.vc-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 14px;
    border-top: 1px solid var(--vh-line);
}
.vc-price .v-price-label { display: block; font-size: 0.64rem; letter-spacing: 0.07em; color: #8A96A6; margin-bottom: 1px; }
.vc-price .v-price { font-size: 1.45rem; font-weight: 800; letter-spacing: -0.01em; }
.vc-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.vc-book {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    padding: 0 18px;
    border-radius: 12px;
    background: var(--vh-green);
    color: #fff;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background-color 0.18s ease, box-shadow 0.18s ease;
}
.vc-book i { font-size: 0.75rem; transition: transform 0.2s ease; }
.vc-book:hover { background: var(--vh-green-dark); color: #fff; box-shadow: 0 8px 18px rgba(1, 149, 36, 0.25); }
.vc-book:hover i { transform: translateX(3px); }
.vc-wa {
    width: 44px; height: 44px;
    border-radius: 12px;
    border: 1.5px solid #BFE6C8;
    background: #F2FAF4;
    color: var(--vh-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.vc-wa:hover { background: var(--vh-green); border-color: var(--vh-green); color: #fff; }
.vc-book:focus-visible, .vc-wa:focus-visible { outline: 2px solid var(--vh-blue); outline-offset: 2px; }

@media (max-width: 380px) {
    .vc-footer { flex-direction: column; align-items: stretch; }
    .vc-actions .vc-book { flex: 1; justify-content: center; }
}

/* ----- How renting works ----- */
.vh-steps { padding: 64px 0 72px; background: #fff; }
.vh-step {
    position: relative;
    height: 100%;
    padding: 30px 26px 26px;
    border: 1px solid var(--vh-line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.vh-step:hover { transform: translateY(-4px); border-color: #C9E0F5; box-shadow: 0 14px 30px rgba(16, 26, 52, 0.1); }
.vh-step > i {
    width: 56px; height: 56px;
    margin: 0 auto 14px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #fff;
    background: linear-gradient(135deg, var(--vh-blue), var(--vh-blue-dark));
}
.col-md-4:nth-child(3) .vh-step > i { background: linear-gradient(135deg, var(--vh-green), var(--vh-green-dark)); }
.vh-step-num {
    position: absolute;
    top: 14px; right: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: #B6C2D2;
}
.vh-step h5 { font-size: 1rem; font-weight: 700; color: var(--vh-ink); margin-bottom: 6px; }
.vh-step p { font-size: 0.88rem; color: #6B7280; margin: 0; line-height: 1.6; }

/* =========== DETAIL PAGE =========== */

/* ----- Hero gallery: shorter, with a brand-tinted fade so any photo
   reads well under the title ----- */
.gallery-slide { height: 460px; }
.hero-overlay { background: linear-gradient(180deg, rgba(16, 26, 52, 0) 0%, rgba(16, 26, 52, 0.55) 45%, rgba(16, 26, 52, 0.88) 100%); }
.v-hero-badge.avail { background: rgba(1, 149, 36, 0.28); border-color: rgba(122, 214, 147, 0.55); }
.gallery-thumb.active { border-color: var(--vh-blue); }
@media (max-width: 767.98px) {
    .gallery-slide { height: 300px; }
}

/* ----- Info cards ----- */
.info-card { border-color: var(--vh-line); border-radius: 16px; }
.info-card h4 i { color: var(--vh-blue); }
.feat-item { border-color: var(--vh-line); border-radius: 12px; transition: border-color 0.2s ease, background-color 0.2s ease; }
.feat-item:hover { border-color: #C9E0F5; background: #fff; }
.feat-icon { background: var(--vh-blue-soft); color: var(--vh-blue); }
/* Availability keeps its status colours (green = available, red = not) */
.feat-icon.feat-icon-avail { background: #E7F6EA; color: var(--vh-green); }
.feat-icon.feat-icon-unavail { background: #FEE2E2; color: #dc2626; }
.included-item i { color: var(--vh-green); }

/* ----- Booking card: blue price header with a green underline, like the
   tour booking card; blue focus, green confirm button ----- */
.booking-card { border-radius: 16px; overflow: hidden; }
.booking-card-head {
    background: linear-gradient(135deg, var(--vh-blue) 0%, var(--vh-blue-dark) 100%);
    border-bottom: 3px solid var(--vh-green);
}
.booking-card-head .rental-mode-btn.active { color: var(--vh-blue-dark); }
.bf-input:focus { border-color: var(--vh-blue); box-shadow: 0 0 0 3px rgba(1, 116, 205, 0.15); }
.price-preview { background: var(--vh-blue-soft); border-color: #C9E0F5; }
.btn-book-now {
    background: var(--vh-green);
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.18s ease;
}
.btn-book-now:hover { background: var(--vh-green-dark); box-shadow: 0 8px 20px rgba(1, 149, 36, 0.25); }
.contact-strip a { color: var(--vh-blue); }
.related-card:hover { border-color: #C9E0F5; }

@media (prefers-reduced-motion: reduce) {
    .vehicle-card, .vehicle-img-wrap img, .vh-step, .btn-book-now { transition: none; }
    .vehicle-card:hover, .vh-step:hover { transform: none; }
}

/* ----- Detail page content sections ----- */
.vd-about { font-size: 0.95rem; color: #4B5563; line-height: 1.75; margin: 0; text-align: justify; hyphens: auto; }
.vd-features {
    list-style: none;
    padding: 0;
    margin: 16px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 20px;
}
.vd-features li { display: flex; align-items: flex-start; gap: 9px; font-size: 0.88rem; color: #374151; line-height: 1.45; }
.vd-features li i {
    flex-shrink: 0;
    width: 18px; height: 18px;
    margin-top: 1px;
    border-radius: 50%;
    background: #E7F6EA;
    color: var(--vh-green);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
}
.vd-ideal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px dashed var(--vh-line);
}
.vd-ideal-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #8A96A6; margin-right: 4px; }
.vd-tag {
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--vh-blue-soft);
    color: var(--vh-blue-dark);
    font-size: 0.8rem;
    font-weight: 600;
}
.vd-routes { list-style: none; padding: 0; margin: 0; }
.vd-routes li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px dashed var(--vh-line);
    font-size: 0.9rem;
}
.vd-routes li:first-child { padding-top: 2px; }
.vd-route-name { display: flex; align-items: center; gap: 10px; color: var(--vh-ink); font-weight: 600; }
.vd-route-name i { color: var(--vh-blue); font-size: 0.85rem; }
.vd-route-time {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #F8FAFC;
    border: 1px solid var(--vh-line);
    font-size: 0.78rem;
    font-weight: 600;
    color: #5B6676;
}
.vd-note { font-size: 0.75rem; color: #9CA3AF; margin: 10px 0 0; }
