/* Rubicars - Gestor de Coches v3 */

/* ---------- Buscador destacado (hero) ---------- */
.rgc-hero {
    background-color: #000;
    background-size: cover;
    background-position: right center;
    border-radius: 16px;
    padding: 60px 40px;
    margin-bottom: 30px;
}
.rgc-hero-inner { max-width: 640px; }
.rgc-hero-titulo {
    color: #fff;
    font-size: 34px;
    font-weight: 800;
    margin: 0 0 24px;
    line-height: 1.2;
}
.rgc-hero-form {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.rgc-hero-campo { flex: 1; min-width: 160px; }
.rgc-hero-campo label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.rgc-hero-campo select {
    width: 100%;
    padding: 12px 10px;
    border-radius: 8px;
    border: 1px solid #ccd3d9;
    font-size: 14px;
    background: #fff;
}
.rgc-hero-boton {
    width: 100%;
    padding: 14px 24px;
    background: #e63946;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.rgc-hero-boton:hover { background: #c62e3a; }
@media (min-width: 640px) {
    .rgc-hero-boton { width: auto; }
}
@media (max-width: 600px) {
    .rgc-hero { padding: 40px 20px; }
    .rgc-hero-titulo { font-size: 26px; }
}

.rgc-catalogo-wrap, .rgc-ficha-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Filtros del catálogo ---------- */
.rgc-filtros {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: #f4f6f8;
    padding: 16px;
    border-radius: 10px;
    margin-bottom: 20px;
}
.rgc-filtros select {
    padding: 10px 12px;
    border-radius: 6px;
    border: 1px solid #ccd3d9;
    font-size: 14px;
    background: #fff;
}
.rgc-filtros button {
    padding: 10px 20px;
    background: #0b2545;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
}
.rgc-filtros button:hover { background: #123a6b; }
.rgc-limpiar { font-size: 13px; color: #666; text-decoration: underline; }
.rgc-contador { font-size: 14px; color: #555; margin-bottom: 14px; }

/* ---------- Grid de tarjetas ---------- */
.rgc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.rgc-tarjeta {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.rgc-tarjeta:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.rgc-tarjeta-img { aspect-ratio: 4 / 3; background: #eef1f4; overflow: hidden; position: relative; }
.rgc-tarjeta-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rgc-sin-foto { display: flex; align-items: center; justify-content: center; height: 100%; color: #999; font-size: 13px; }
.rgc-badge-estado {
    position: absolute; top: 10px; right: 10px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; color: #fff;
}
.rgc-badge-reservado { background: #e67e22; }
.rgc-badge-garantia {
    display: inline-block;
    background: #eaf4ee; color: #1e824c;
    font-size: 11px; font-weight: 700;
    padding: 3px 9px; border-radius: 20px;
    margin-bottom: 8px;
}
.rgc-tarjeta-info { padding: 14px; }
.rgc-tarjeta-info h3 { margin: 0 0 8px; font-size: 16px; color: #0b2545; }
.rgc-tarjeta-precio { margin: 0 0 8px; }
.rgc-precio-contado { display: block; font-size: 22px; font-weight: 800; color: #e63946; }
.rgc-precio-financiado { display: block; font-size: 13px; color: #555; font-weight: 600; }
.rgc-tarjeta-specs { margin: 0; font-size: 12.5px; color: #666; }

/* ---------- Ficha individual del coche ---------- */
.rgc-ficha-wrap {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 30px;
}
@media (max-width: 768px) {
    .rgc-ficha-wrap { grid-template-columns: 1fr; }
}

.rgc-foto-principal img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    max-height: 480px;
}
.rgc-miniaturas {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.rgc-miniaturas img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
}

.rgc-ficha-titulo { color: #0b2545; margin: 0 0 10px; font-size: 28px; }

.rgc-ficha-precio { margin-bottom: 16px; }
.rgc-ficha-precio-contado { display: block; font-size: 30px; font-weight: 800; color: #0b2545; }
.rgc-ficha-precio-financiado { display: block; font-size: 15px; color: #1e824c; font-weight: 600; margin-top: 4px; }

.rgc-ficha-botones { display: flex; gap: 10px; margin-bottom: 24px; }
.rgc-btn {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
    font-size: 15px;
}
.rgc-btn-llamar { background: #0b2545; color: #fff; }
.rgc-btn-llamar:hover { background: #123a6b; color: #fff; }
.rgc-btn-whatsapp { background: #25d366; color: #fff; }
.rgc-btn-whatsapp:hover { background: #1ebe5b; color: #fff; }

.rgc-ficha-specs { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.rgc-ficha-specs tr { border-bottom: 1px solid #eee; }
.rgc-ficha-specs th, .rgc-ficha-specs td { text-align: left; padding: 10px 4px; font-size: 14px; }
.rgc-ficha-specs th { color: #666; font-weight: 600; width: 45%; }
.rgc-ficha-specs td { color: #0b2545; font-weight: 600; }

.rgc-ficha-notas { background: #f4f6f8; border-radius: 10px; padding: 20px 24px; margin-top: 30px; }
.rgc-ficha-notas h2 { font-size: 16px; color: #0b2545; margin: 0 0 10px; }
.rgc-ficha-notas p { margin: 0; font-size: 14px; color: #333; line-height: 1.7; max-width: 900px; }

/* ---------- Lightbox de fotos en la ficha ---------- */
.rgc-lightbox-trigger { cursor: zoom-in; }
.rgc-lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11,37,69,0.92);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.rgc-lightbox-overlay.rgc-lightbox-abierto { display: flex; }
.rgc-lightbox-overlay img {
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.rgc-lightbox-cerrar {
    position: absolute;
    top: 20px; right: 30px;
    color: #fff;
    font-size: 40px;
    line-height: 1;
    cursor: pointer;
    font-weight: 300;
}
.rgc-lightbox-cerrar:hover { color: #e63946; }

.rgc-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 0;
    width: 52px; height: 52px;
    border-radius: 50%;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.rgc-lightbox-nav:hover { background: #e63946; }
.rgc-lightbox-prev { left: 20px; }
.rgc-lightbox-next { right: 20px; }
.rgc-lightbox-contador {
    position: absolute;
    bottom: 18px; left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    letter-spacing: 1px;
}
@media (max-width: 640px) {
    .rgc-lightbox-nav { width: 42px; height: 42px; font-size: 18px; }
    .rgc-lightbox-prev { left: 8px; }
    .rgc-lightbox-next { right: 8px; }
}
/* H1 SEO del buscador + subtitulo */
.rgc-hero-h1 { color: #fff; font-size: 32px; font-weight: 800; line-height: 1.2; margin: 0 0 8px; }
.rgc-hero-h1 + .rgc-hero-titulo { font-size: 20px; font-weight: 600; color: #e9edf2; margin: 0 0 22px; }
@media (max-width: 640px) { .rgc-hero-h1 { font-size: 24px; } .rgc-hero-h1 + .rgc-hero-titulo { font-size: 17px; } }