/*
 * EV Vehicle Card Styles
 * ──────────────────────────────────────────────────────────────────────────────
 * Adjust the custom properties below to match your site's design.
 * Everything else cascades from these values.
 */

:root {
    --ev-card-radius:       12px;
    --ev-card-bg:           #ffffff;
    --ev-card-shadow:       0 2px 12px rgba(0, 0, 0, 0.07);
    --ev-card-shadow-hover: 0 6px 24px rgba(0, 0, 0, 0.12);
    --ev-card-border:       #f0f0f0;

    --ev-color-text:        #1a1a1a;
    --ev-color-muted:       #6b7280;
    --ev-color-accent:      #2563eb;   /* change to match your brand */
    --ev-color-accent-hover:#1d4ed8;

    --ev-badge-bg:          #f3f4f6;
    --ev-badge-text:        #374151;

    --ev-spec-bg:           #f9fafb;

    --ev-font-base:         inherit;
    --ev-transition:        0.2s ease;
}

/* ── Card wrapper ────────────────────────────────────────────────────────────── */

.ev-card-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--ev-card-bg);
    border-radius: var(--ev-card-radius);
    border: 1px solid var(--ev-card-border);
    box-shadow: var(--ev-card-shadow);
    overflow: hidden;
    transition: box-shadow var(--ev-transition), transform var(--ev-transition);
    font-family: var(--ev-font-base);
}

.wpgb-card:hover .ev-card-inner {
    box-shadow: var(--ev-card-shadow-hover);
    transform: translateY(-2px);
}

/* ── Media / image ───────────────────────────────────────────────────────────── */

.ev-card-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}

.ev-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.wpgb-card:hover .ev-card-img {
    transform: scale(1.03);
}

.ev-card-media--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ev-card-placeholder-icon {
    font-size: 3rem;
    opacity: 0.25;
}

/* ── Content area ────────────────────────────────────────────────────────────── */

.ev-card-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
    gap: 16px;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */

.ev-card-header {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ev-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    background: var(--ev-badge-bg);
    color: var(--ev-badge-text);
    width: fit-content;
    margin-bottom: 4px;
}

.ev-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--ev-color-text);
}

.ev-card-title a {
    color: inherit;
    text-decoration: none;
}

.ev-card-title a:hover {
    color: var(--ev-color-accent);
}

.ev-card-variant {
    margin: 0;
    font-size: 0.85rem;
    color: var(--ev-color-muted);
    font-weight: 400;
}

/* ── Specs row ───────────────────────────────────────────────────────────────── */

.ev-card-specs {
    display: flex;
    gap: 2px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--ev-card-border);
}

.ev-spec {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    background: var(--ev-spec-bg);
    gap: 2px;
}

.ev-spec-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.ev-spec-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ev-color-text);
    line-height: 1.1;
    white-space: nowrap;
}

.ev-spec-unit {
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--ev-color-muted);
}

.ev-spec-label {
    font-size: 0.68rem;
    color: var(--ev-color-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* ── Footer ──────────────────────────────────────────────────────────────────── */

.ev-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.ev-card-price-wrap {
    flex: 1;
    min-width: 0;
}

.ev-card-price {
    margin: 0;
    font-size: 0.9rem;
    color: var(--ev-color-text);
    white-space: nowrap;
}

.ev-card-price strong {
    font-size: 1rem;
    font-weight: 700;
}

.ev-card-price-note {
    display: block;
    font-size: 0.72rem;
    color: var(--ev-color-muted);
    font-weight: 400;
}

.ev-card-price--unknown {
    color: var(--ev-color-muted);
    font-style: italic;
}

/* ── CTA button ──────────────────────────────────────────────────────────────── */

.ev-card-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 9px 16px;
    background: var(--ev-color-accent);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    white-space: nowrap;
    transition: background var(--ev-transition);
    flex-shrink: 0;
}

.ev-card-btn:hover {
    background: var(--ev-color-accent-hover);
    color: #fff;
}

/* ── Responsive ──────────────────────────────────────────────────────────────── */

@media ( max-width: 480px ) {

    .ev-card-content {
        padding: 16px;
        gap: 12px;
    }

    .ev-spec-label {
        display: none;
    }

    .ev-spec-value {
        font-size: 0.9rem;
    }

    .ev-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .ev-card-btn {
        justify-content: center;
    }
}
