/**
 * Estilos: Listado/grid de coches.
 * @since 2.0.0
 */

/* Grid base */
.welow-coches-grid {
    display: grid;
    grid-template-columns: repeat(var(--welow-cols, 3), 1fr);
    gap: 24px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 980px) {
    .welow-coches-grid { grid-template-columns: repeat(var(--welow-cols-tablet, 2), 1fr); gap: 18px; }
}
@media (max-width: 767px) {
    .welow-coches-grid { grid-template-columns: repeat(var(--welow-cols-movil, 1), 1fr); gap: 16px; }
}

/* Card */
.welow-coche-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.welow-coche-card:hover {
    border-color: #2563eb;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
}

.welow-coche-card__imagen {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #f1f5f9;
    overflow: hidden;
}
.welow-coche-card__imagen img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.4s ease;
}
.welow-coche-card:hover .welow-coche-card__imagen img { transform: scale(1.04); }

.welow-coche-card__placeholder {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 64px !important; width: auto !important; height: auto !important;
    color: #cbd5e1;
}

/* Tipo badge (sobre imagen)
   v2.93.3 — Igual que en el catálogo: píldora con el color principal de la web
   (antes azul, verde o naranja según el tipo, en mayúsculas y con esquinas) */
.welow-coche-tipo {
    position: absolute;
    top: 12px; left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--welow-btn-bg, #2563eb);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    letter-spacing: .02em;
    color: var(--welow-btn-color, #fff);
    z-index: 2;
}

/* Body */
.welow-coche-card__body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}
.welow-coche-card__titulo {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
}
.welow-coche-card__titulo a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.2s;
}
.welow-coche-card__titulo a:hover { color: #2563eb; }
.welow-coche-card__version {
    margin: 0 0 12px;
    font-size: 13px;
    color: #64748b;
}

/* Lista de datos */
.welow-coche-card__datos {
    list-style: none;
    margin: 0 0 14px;
    padding: 12px 0;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    font-size: 13px;
    color: #475569;
}
.welow-coche-card__datos li {
    position: relative;
    padding-right: 14px;
}
.welow-coche-card__datos li:not(:last-child)::after {
    content: '·';
    position: absolute;
    right: 0;
    color: #cbd5e1;
}

/* v2.11.0 — Bloque "Destacados" en la card de coches NUEVOS */
.welow-coche-card__destacados {
    margin: 6px 0 16px;
    padding: 14px 0 4px;
    border-top: 1px solid #f1f5f9;
}
.welow-coche-card__rotulo {
    margin: 0 0 10px;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
    letter-spacing: -0.01em;
}
/* v2.55.0 — Mismo tamaño/interlineado que las cards de modelo (consistencia)
   y sin viñeta por defecto (se activan en Configuraciones → Estilos generales) */
.welow-coche-card__caracteristicas {
    list-style: none;
    margin: 0;
    padding: 0 0 0 14px;
    border-left: 2px solid #e2e8f0;
    font-size: 15px;
    color: #3f4a5a;
    line-height: 1.6;
}
.welow-coche-card__caracteristicas li {
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
}
.welow-coche-card__caracteristicas li:last-child { margin-bottom: 0; }

/* Footer */
.welow-coche-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
}
.welow-coche-card__precio {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}
.welow-coche-card__precio strong {
    font-size: 22px;
    font-weight: 800;
    color: #1f2937;
}
.welow-coche-card__precio em {
    color: #94a3b8;
    font-style: italic;
}
.welow-coche-card__precio-anterior {
    text-decoration: line-through;
    color: #94a3b8;
    font-size: 12px;
}

.welow-coche-card__footer .welow-btn {
    width: auto;
    padding: 8px 16px;
    font-size: 13px;
}

@media (max-width: 480px) {
    .welow-coche-card__footer {
        flex-direction: column;
        align-items: stretch;
    }
    .welow-coche-card__footer .welow-btn { width: 100%; }
}

/* v2.71.1 — Etiqueta medioambiental a la derecha del nombre */
.welow-coche-card__cab { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.welow-coche-card__cab .welow-coche-card__titulo { min-width: 0; }
.welow-coche-card__dgt { flex: none; width: 32px; height: 32px; margin-top: -2px; }
.welow-coche-card__dgt .welow-dgt { display: block; width: 32px; height: 32px; }

/* v2.89.0 — Cartel "Reservado" / "Vendido" sobre la foto */
.welow-cartel-estado {
    position: absolute; top: 12px; right: 12px; z-index: 3;
    padding: 5px 12px; border-radius: 999px;
    background: #dc2626; color: #fff;
    font-size: 12px; font-weight: 700; line-height: 1.2; letter-spacing: .06em; text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,.18); pointer-events: none;
}
.welow-cartel-estado--reservado { background: #d97706; }
.welow-es-vendido img { filter: grayscale(.55); }
