/**
 * Agency Fleet — Front-end Styles
 *
 * Design philosophy:
 *   - Airbnb-inspired single vehicle page
 *   - BEM class names throughout
 *   - Minimal opinions — theme inherits via get_header()/get_footer()
 *   - Override anything in your theme's client.css without touching this file
 *
 * Breakpoints: mobile-first, primary breakpoint at 768px
 */

/* ═══════════════════════════════════════════════════════════════════════════
   FLEET GRID
   ═══════════════════════════════════════════════════════════════════════════ */

.fleet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.fleet-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.fleet-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }

.fleet-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    opacity: 0.5;
}

/* ── Fleet Card ──────────────────────────────────────────────────────────── */

.fleet-card {
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden;
    background: var(--fleet-card-bg, #fff);
    box-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
    transition: box-shadow .2s, transform .2s;
}

.fleet-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,.12), 0 12px 32px rgba(0,0,0,.08);
    transform: translateY(-2px);
}

/* Image */
.fleet-card__image-wrap {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #f0f0f0;
}

.fleet-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}

.fleet-card__image-wrap:hover .fleet-card__image {
    transform: scale(1.04);
}

.fleet-card__no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
}

.fleet-card__badge {
    position: absolute;
    top: .75rem;
    left: .75rem;
    font-size: .75rem;
    font-weight: 700;
    padding: .3em .75em;
    border-radius: 50px;
    line-height: 1;
}

.fleet-card__badge--unavailable { background: #1a1a1a; color: #fff; }
.fleet-card__badge--contact      { background: #fff;    color: #1a1a1a; border: 1px solid rgba(0,0,0,.15); }

/* Body */
.fleet-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1rem 1.25rem 1.25rem;
    gap: .4rem;
}

.fleet-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .5rem;
}

.fleet-card__title {
    font-size: 1.05rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.fleet-card__title a {
    text-decoration: none;
    color: inherit;
}

.fleet-card__title a:hover { text-decoration: underline; }

.fleet-card__price {
    font-size: .9rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: .85;
}

.fleet-card__subtitle {
    font-size: .8rem;
    opacity: .55;
    margin: 0;
}

.fleet-card__tagline {
    font-size: .875rem;
    opacity: .75;
    margin: 0;
    flex: 1;
}

/* Highlights strip (small icons) */
.fleet-card__highlights {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
    list-style: none;
    padding: .5rem 0 0;
    margin: 0;
    border-top: 1px solid rgba(0,0,0,.06);
}

.fleet-card__highlight {
    display: flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    opacity: .7;
}

.fleet-card__highlight-icon { font-size: .9rem; }

/* CTA */
.fleet-card__cta {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-top: auto;
    padding-top: .75rem;
    font-size: .85rem;
    font-weight: 600;
    text-decoration: none;
    color: inherit;
    opacity: .7;
    transition: opacity .2s;
}

.fleet-card__cta:hover { opacity: 1; text-decoration: underline; }

/* ── Pagination ──────────────────────────────────────────────────────────── */

.fleet-pagination {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.fleet-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.fleet-pagination .page-numbers li { display: contents; }

.fleet-pagination .page-numbers a,
.fleet-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 .6rem;
    border-radius: 6px;
    border: 1px solid rgba(0,0,0,.15);
    text-decoration: none;
    font-size: .875rem;
    color: inherit;
    transition: background .15s;
}

.fleet-pagination .page-numbers a:hover        { background: rgba(0,0,0,.05); }
.fleet-pagination .page-numbers .current       { font-weight: 700; background: rgba(0,0,0,.07); border-color: transparent; }
.fleet-pagination .page-numbers .dots          { border: none; }


/* ═══════════════════════════════════════════════════════════════════════════
   SINGLE VEHICLE PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

.sv-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

/* ── Hero: full-width image + horizontal thumbnail strip ─────────────────── */

.sv-hero { width: 100%; }

.sv-hero__main {
    display: block;
    width: 100%;
    height: 520px;
    position: relative;
    overflow: hidden;
    background: #111;
}

.sv-hero__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}

.sv-hero__main:hover img { transform: scale(1.02); }

/* Gradient overlay — strong enough to read text over any photo */
.sv-hero__overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 100px 36px 32px;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.78) 0%,
        rgba(0,0,0,.35) 45%,
        transparent 100%
    );
    pointer-events: none;
}

/* Badge pills */
.sv-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.sv-hero__badge {
    display: inline-block;
    padding: 4px 13px;
    border-radius: 50px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.3);
    color: #fff;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
}

/* Title */
.sv-hero__title {
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    margin: 0 0 6px;
    line-height: 1.15;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,.4);
}

/* Subtitle */
.sv-hero__subtitle {
    color: rgba(255,255,255,.82);
    font-size: .95rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* Thumbnail strip */
.sv-hero__thumbs {
    display: flex;
    gap: 3px;
    height: 88px;
    overflow-x: auto;
    background: #0d0d0d;
    scrollbar-width: none;
}

.sv-hero__thumbs::-webkit-scrollbar { display: none; }

.sv-hero__thumb {
    flex: 0 0 130px;
    height: 88px;
    overflow: hidden;
    display: block;
    opacity: .6;
    transition: opacity .2s;
}

.sv-hero__thumb:hover { opacity: 1; }

.sv-hero__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s ease;
}

.sv-hero__thumb:hover img { transform: scale(1.06); }

/* ── Page body: 2-col layout ─────────────────────────────────────────────── */

.sv-body {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
    padding: 32px 24px 4rem;
}

/* ── Left column ─────────────────────────────────────────────────────────── */

/* Specs bar */
.sv-specs-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    width: 100%;
    border: 0.5px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.sv-specs-bar__cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 18px;
    flex: 1;
    min-width: 0;
    border-right: 0.5px solid #e0e0e0;
}

.sv-specs-bar__cell:last-child { border-right: none; }

.sv-specs-bar__label {
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #999;
    font-weight: 500;
}

.sv-specs-bar__value {
    font-size: .9rem;
    font-weight: 600;
    color: #111;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sv-specs-bar__color-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,.12);
}

/* Description */
.sv-description {
    font-size: 15px;
    line-height: 1.7;
    color: #333;
    padding: 0 0 24px;
    border-bottom: 1px solid #ebebeb;
    margin-bottom: 24px;
}

.sv-description p { margin: 0 0 1em; }
.sv-description p:last-child { margin-bottom: 0; }

/* Specs table */
.sv-specs { padding: 0; }

.sv-specs__title {
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #999;
    margin: 0 0 12px;
}

.sv-specs table {
    width: 100%;
    border-collapse: collapse;
}

.sv-specs tr { border-bottom: 1px solid #f0f0f0; }
.sv-specs tr:last-child { border-bottom: none; }

.sv-specs th {
    text-align: left;
    padding: 10px 12px 10px 0;
    font-size: .8rem;
    font-weight: 400;
    color: #888;
    width: 42%;
    vertical-align: top;
}

.sv-specs td {
    padding: 10px 0;
    font-size: .875rem;
    font-weight: 500;
    color: #111;
}

/* ── Right column: sticky price card ─────────────────────────────────────── */

.sv-sidebar { position: relative; }

.sv-price-card {
    border: 0.5px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sv-price-card__price {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111;
    line-height: 1.1;
    margin: 0;
}

.sv-price-card__price--muted {
    font-size: 1.1rem;
    color: #888;
    font-weight: 500;
}

.sv-price-card__price-note {
    font-size: .78rem;
    color: #aaa;
    display: block;
    margin-top: 2px;
}

.sv-price-card__cta {
    display: block;
    width: 100%;
    text-align: center;
    padding: 13px 1rem;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    background: #111;
    color: #fff;
    border: 1.5px solid #111;
    transition: opacity .2s, transform .1s;
    box-sizing: border-box;
}

.sv-price-card__cta:hover  { opacity: .85; }
.sv-price-card__cta:active { transform: scale(.98); }

.sv-price-card__cta--outline {
    background: transparent;
    color: #111;
}

.sv-price-card__cta--outline:hover { background: #f5f5f5; opacity: 1; }

.sv-price-card__unavailable {
    text-align: center;
    font-size: .875rem;
    color: #888;
    margin: 0;
}

/* Availability indicator */
.sv-price-card__avail {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: .78rem;
    color: #888;
    padding-top: 4px;
    border-top: 0.5px solid #f0f0f0;
}

.sv-price-card__avail-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #22c55e;
}

.sv-price-card__avail-dot--red { background: #ef4444; }

/* Inquiry panel (inline reveal) */
button.sv-price-card__cta {
    cursor: pointer;
    font-family: inherit;
}

.sv-inquiry-panel {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.35s ease;
    overflow: hidden;
    margin-top: -12px; /* collapse gap when hidden */
}

.sv-inquiry-panel__inner {
    min-height: 0;
    overflow: hidden;
    padding-top: 12px;
}

.sv-inquiry-panel.is-open {
    grid-template-rows: 1fr;
    margin-top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════════════════════════════════════ */

.af-lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.af-lightbox[hidden] { display: none; }

.af-lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.95);
}

.af-lightbox__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 1;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    padding: .5rem;
    opacity: .7;
    transition: opacity .2s;
}

.af-lightbox__close:hover { opacity: 1; }

.af-lightbox__stage {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 100vw;
    max-height: 80vh;
    width: 100%;
    padding: 0 4rem;
}

.af-lightbox__img-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 80vh;
    overflow: hidden;
}

.af-lightbox__img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    transition: opacity .2s;
}

.af-lightbox__img.is-loading { opacity: 0; }

.af-lightbox__prev,
.af-lightbox__next {
    flex-shrink: 0;
    background: rgba(255,255,255,.12);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}

.af-lightbox__prev:hover,
.af-lightbox__next:hover { background: rgba(255,255,255,.22); }

.af-lightbox__counter {
    position: relative;
    z-index: 1;
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    text-align: center;
    margin-top: .75rem;
}

/* Thumbnail strip */
.af-lightbox__thumbs {
    position: relative;
    z-index: 1;
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    max-width: 100%;
    padding: .75rem 1rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.3) transparent;
}

.af-lightbox__thumb {
    flex-shrink: 0;
    width: 60px;
    height: 45px;
    overflow: hidden;
    border-radius: 4px;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    background: none;
    opacity: .55;
    transition: opacity .2s, border-color .2s;
}

.af-lightbox__thumb.is-active { border-color: #fff; opacity: 1; }
.af-lightbox__thumb:hover     { opacity: .85; }

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

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
    .sv-body { grid-template-columns: 1fr; gap: 0; padding: 24px 20px 3rem; }
    .sv-sidebar { order: -1; margin-bottom: 24px; }
    .sv-price-card { position: static; }
    .sv-specs-bar { flex-wrap: wrap; }
    .sv-specs-bar__cell { flex: 0 0 50%; border-bottom: 0.5px solid #e0e0e0; }
    .sv-specs-bar__cell:nth-last-child(-n+2) { border-bottom: none; }
}

@media (max-width: 768px) {
    .sv-hero__main { height: 320px; }
    .sv-hero__overlay { padding: 60px 20px 20px; }
    .sv-hero__thumbs { height: 72px; }
    .sv-hero__thumb  { flex: 0 0 100px; height: 72px; }

    .fleet-grid,
    .fleet-grid--cols-3 { grid-template-columns: 1fr 1fr; }
    .fleet-grid--cols-2 { grid-template-columns: 1fr; }

    .af-lightbox__stage { padding: 0 .5rem; }
    .af-lightbox__prev,
    .af-lightbox__next  { width: 2.25rem; height: 2.25rem; font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .fleet-grid,
    .fleet-grid--cols-2,
    .fleet-grid--cols-3 { grid-template-columns: 1fr; }

    .sv-hero__main  { height: 260px; }
    .sv-hero__title { font-size: 1.3rem; }
    .sv-specs-bar__cell { flex: 0 0 100%; border-right: none; border-bottom: 0.5px solid #e0e0e0; }
    .sv-specs-bar__cell:last-child { border-bottom: none; }
}
