/* E1 Connect Inventory — Shared Vehicle Card + Carousel
   One source of truth for the vehicle card so the archive grid, search grid,
   and the single-page "Similar vehicles" swiper stay in visual sync. */

:root {
    --e1cv-blue:       #2563eb;
    --e1cv-gray-50:    #f9fafb;
    --e1cv-gray-100:   #f3f4f6;
    --e1cv-gray-200:   #e5e7eb;
    --e1cv-gray-500:   #6b7280;
    --e1cv-gray-700:   #374151;
    --e1cv-gray-900:   #111827;
    --e1cv-green:      #059669;
    --e1cv-amber:      #d97706;
    --e1cv-red:        #dc2626;
    --e1cv-card-radius: 12px;
    --e1cv-card-shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
    --e1cv-card-shadow-lg: 0 10px 25px rgba(0,0,0,.10), 0 4px 10px rgba(0,0,0,.05);
}

/* ── Card ─────────────────────────────────────── */
.e1cv-card {
    position: relative;
    background: #fff;
    border: 1px solid var(--e1cv-gray-200);
    border-radius: var(--e1cv-card-radius);
    overflow: hidden;
    box-shadow: var(--e1cv-card-shadow);
    transition: box-shadow .18s ease, transform .18s ease;
}

/* ── Favorite heart ───────────────────────────── */
.e1cv-card-fav { position: absolute; top: 12px; right: 12px; z-index: 2; }
.e1cv-fav-btn {
    -webkit-appearance: none; appearance: none;
    width: 34px; height: 34px; border-radius: 999px; padding: 0; margin: 0; border: 0;
    background: rgba(255,255,255,.92);
    -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
    box-shadow: 0 1px 3px rgba(0,0,0,.18);
    display: grid; place-items: center; cursor: pointer;
    transition: transform .15s ease, background .15s ease;
}
.e1cv-fav-btn:hover { background: #fff; transform: scale(1.08); }
.e1cv-fav-ic { fill: none; stroke: #374151; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: fill .15s, stroke .15s; }
.e1cv-fav-btn.is-on .e1cv-fav-ic { fill: #dc2626; stroke: #dc2626; }
.e1cv-card:hover {
    box-shadow: var(--e1cv-card-shadow-lg);
    transform: translateY(-2px);
}
.e1cv-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Media */
.e1cv-card-media {
    position: relative;
    aspect-ratio: 4 / 3;
    background: var(--e1cv-gray-100);
}
.e1cv-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.e1cv-card-placeholder {
    width: 100%;
    height: 100%;
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--e1cv-gray-500);
    font-size: 14px;
}

/* Status badge */
.e1cv-card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: #fff;
    background: var(--e1cv-gray-700);
}
.e1cv-card-badge--available { background: var(--e1cv-green); }
.e1cv-card-badge--reserved  { background: var(--e1cv-amber); }
.e1cv-card-badge--sold      { background: var(--e1cv-red); }

/* Sold cards read as muted */
.e1cv-card--sold .e1cv-card-img { opacity: .6; }

/* Body */
.e1cv-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
    flex: 1;
}
.e1cv-card-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
}
.e1cv-card-specs {
    font-size: 13px;
    color: var(--e1cv-gray-500);
    margin: 0;
}
.e1cv-card-price {
    margin-top: auto;
    padding-top: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--e1cv-gray-900);
}
.e1cv-card-price--ask {
    font-size: 14px;
    font-weight: 500;
    color: var(--e1cv-blue);
}

@media (max-width: 600px) {
    .e1cv-card-title { font-size: 15px; }
    .e1cv-card-price { font-size: 18px; }
}

/* ── Carousel (Swiper) ────────────────────────── */
.e1cv-carousel { position: relative; }
.e1cv-carousel-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
    margin-bottom: 18px;
}
.e1cv-carousel-title {
    font-family: 'KoHo', 'Inter', ui-sans-serif, system-ui, sans-serif;
    font-weight: 700; font-size: 28px; letter-spacing: -.01em; margin: 0;
    color: var(--e1cv-gray-900);
}
.e1cv-carousel-subtitle { font-size: 14px; color: var(--e1cv-gray-500); margin: 4px 0 0; }

/* The Swiper viewport — overflow hidden so neighbouring slides clip cleanly */
.e1cv-swiper { overflow: hidden; }
/* Let the lift-on-hover transform show instead of being clipped vertically */
.e1cv-swiper .swiper-wrapper { align-items: stretch; }
.e1cv-swiper .swiper-slide { height: auto; display: flex; }
.e1cv-swiper .swiper-slide > .e1cv-card { width: 100%; }

/* Nav arrows */
.e1cv-carousel-nav {
    position: absolute; top: calc(50% + 14px); transform: translateY(-50%);
    width: 42px; height: 42px; border-radius: 999px;
    background: #fff; border: 1px solid var(--e1cv-gray-200);
    box-shadow: var(--e1cv-card-shadow); color: var(--e1cv-gray-900);
    display: grid; place-items: center; cursor: pointer; z-index: 3;
    font-size: 22px; line-height: 1;
    transition: background .15s, transform .15s, opacity .15s, box-shadow .15s;
}
.e1cv-carousel-nav:hover { background: var(--e1cv-gray-50); box-shadow: var(--e1cv-card-shadow-lg); transform: translateY(-50%) scale(1.06); }
.e1cv-carousel-nav.prev { left: -10px; }
.e1cv-carousel-nav.next { right: -10px; }
.e1cv-carousel-nav.swiper-button-disabled { opacity: 0; pointer-events: none; }

/* Pagination dots */
.e1cv-carousel-dots { display: flex; justify-content: center; gap: 6px; margin-top: 18px; }
.e1cv-carousel-dots .swiper-pagination-bullet {
    width: 7px; height: 7px; border-radius: 999px;
    background: var(--e1cv-gray-200); opacity: 1; transition: width .2s, background .2s; cursor: pointer;
}
.e1cv-carousel-dots .swiper-pagination-bullet-active { width: 20px; background: var(--e1cv-blue); }

@media (max-width: 1024px) {
    .e1cv-carousel-nav { display: none; }
}
@media (max-width: 600px) {
    .e1cv-carousel-title { font-size: 22px; }
}
