:root {
    --azul-profundo: #0B2E4F;
    --azul-primario: #1568C4;
    --azul-cielo: #57ABE8;
    --azul-hielo: #EAF3FB;
    --blanco: #FFFFFF;
    --texto: #0B2338;
    --texto-suave: #52708C;
    --borde: #D7E6F5;
    --whatsapp: #25D366;

    --font-display: 'Barlow Condensed', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--texto);
    background: var(--azul-hielo);
    line-height: 1.5;
}

a { color: inherit; }

/* Header */
.site-header {
    background: var(--azul-profundo);
    padding: 0.6rem 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-ubicacion {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--azul-cielo);
    font-size: 0.85rem;
    font-weight: 600;
    justify-self: start;
}

.marca {
    display: flex;
    align-items: center;
    text-decoration: none;
    justify-self: center;
}

.marca-placa {
    background: var(--blanco);
    border-radius: 12px;
    padding: 0.4rem 0.7rem;
    display: flex;
    align-items: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

.marca-logo {
    height: 88px;
    width: auto;
    display: block;
}

.link-instagram {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--blanco);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    justify-self: end;
}

.link-instagram:hover { color: var(--azul-cielo); }

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 3rem;
    min-height: 70vh;
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2.5rem;
    padding: 2.5rem 1rem 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.hero-texto {
    text-align: left;
    flex: 1;
    max-width: 480px;
}

.hero-mascota {
    height: 260px;
    width: auto;
    flex-shrink: 0;
    filter: drop-shadow(0 10px 20px rgba(11, 46, 79, 0.18));
}

.hero-eyebrow {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--azul-primario);
    font-size: 0.8rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.hero h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.9rem;
    letter-spacing: -0.01em;
    color: var(--azul-profundo);
    margin: 0 0 0.6rem;
    line-height: 1;
}

.hero-sub {
    color: var(--texto-suave);
    font-size: 1.05rem;
    margin: 0;
}

@media (max-width: 700px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 1.5rem;
    }
    .hero-texto { text-align: center; max-width: 100%; }
    .hero-mascota { height: 175px; order: -1; }
}

/* Filtros */
.filtros {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.1rem 1rem;
    align-items: end;
    margin-bottom: 2rem;
    padding: 1.4rem 1.5rem;
    background: var(--blanco);
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(11, 46, 79, 0.08);
    border: 1px solid var(--borde);
}

.filtro-campo {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.filtro-label {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--azul-primario);
}

.filtros select,
.filtros input {
    padding: 0.6rem 0.7rem;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    background: var(--azul-hielo);
    color: var(--texto);
    width: 100%;
    min-width: 0;
    transition: border-color 0.15s ease;
}

.filtros select:focus,
.filtros input:focus {
    outline: none;
    border-color: var(--azul-primario);
}

.filtro-campo-rango {
    grid-column: span 2;
}

.filtro-rango {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    background: var(--azul-hielo);
    padding: 0 0.5rem;
}

.filtro-rango input {
    border: none;
    background: transparent;
    padding: 0.6rem 0.2rem;
    text-align: center;
}

.filtro-rango input:focus { outline: none; }

.filtro-rango-guion {
    color: var(--texto-suave);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.filtro-acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
    grid-column: 1 / -1;
}

.btn-filtrar {
    padding: 0.65rem 1.6rem;
    border: none;
    border-radius: 8px;
    background: var(--azul-primario);
    color: var(--blanco);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: var(--font-body);
}

.btn-filtrar:hover { background: var(--azul-profundo); }

.limpiar-filtros {
    font-size: 0.82rem;
    color: var(--texto-suave);
    text-decoration: underline;
    white-space: nowrap;
}

@media (max-width: 700px) {
    .filtros { grid-template-columns: repeat(2, 1fr); padding: 1.2rem; }
    .filtro-campo-rango { grid-column: span 2; }
    .filtro-acciones { justify-content: space-between; }
    .btn-filtrar { flex: 1; }
}

/* Grilla / tarjetas */
.grilla {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.tarjeta {
    text-decoration: none;
    color: inherit;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.tarjeta:hover {
    box-shadow: 0 8px 24px rgba(11, 46, 79, 0.14);
    transform: translateY(-3px);
}

.tarjeta-foto { position: relative; }

.tarjeta img {
    width: 100%;
    height: 180px;
    object-fit: contain;
    display: block;
    background: var(--azul-hielo);
}

.sin-foto {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--azul-hielo);
    color: var(--texto-suave);
    font-size: 0.85rem;
}

.sin-foto.grande { height: 380px; border-radius: 12px; }

.tarjeta-info { padding: 1rem 1.1rem 1.2rem; }

.tarjeta-info h2 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    margin: 0 0 0.15rem;
    color: var(--azul-profundo);
}

.anio {
    color: var(--texto-suave);
    font-size: 0.88rem;
    margin: 0.1rem 0 0.5rem;
}

.precio {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--azul-primario);
    margin: 0;
}

.vacio {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--texto-suave);
}

.vacio p { margin: 0.3rem 0; }
.vacio-sub { font-size: 0.9rem; }
.vacio-sub a { color: var(--azul-primario); font-weight: 600; }

.resultados-contador {
    color: var(--texto-suave);
    font-size: 0.88rem;
    margin: 0 0 1rem;
}

/* Página 404 */
.error-404 {
    text-align: center;
    padding: 3rem 1rem 5rem;
}

.error-404-mascota {
    height: 260px;
    width: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 10px 20px rgba(11, 46, 79, 0.18));
}

.error-404-codigo {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--azul-cielo);
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem;
}

.error-404 h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--azul-profundo);
    margin: 0 0 0.6rem;
}

.error-404-texto {
    color: var(--texto-suave);
    margin: 0 0 1.75rem;
}

.error-404-btn {
    display: inline-block;
    width: auto;
    padding: 0.85rem 2rem;
}

/* Patente (elemento de marca reutilizable) */
.patente {
    display: inline-flex;
    align-items: stretch;
    border: 2px solid var(--azul-profundo);
    border-radius: 5px;
    overflow: hidden;
    background: var(--blanco);
    box-shadow: 0 2px 6px rgba(11, 46, 79, 0.15);
}

.patente-texto {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--azul-profundo);
    padding: 0.3rem 0.6rem;
    font-size: 1rem;
    letter-spacing: 0.06em;
}

.patente-chica {
    position: absolute;
    top: 0.6rem;
    left: 0.6rem;
    transform: scale(0.85);
    transform-origin: top left;
}

/* Detalle */
.volver {
    display: inline-block;
    margin: 1.5rem 0;
    color: var(--texto-suave);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.detalle {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
}

@media (max-width: 800px) {
    .detalle { grid-template-columns: 1fr; }
    .marca-logo { height: 60px; }
    .site-header { padding: 0.5rem 1rem; }
    .header-ubicacion span { display: none; }
    .link-instagram span { display: none; }
}

@media (max-width: 480px) {
    .header-ubicacion { display: none; }
}

#foto-principal {
    width: 100%;
    height: 380px;
    object-fit: contain;
    border-radius: 12px;
    background: var(--azul-hielo);
    display: block;
}

.foto-principal-wrap {
    position: relative;
}

.foto-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: rgba(11, 46, 79, 0.75);
    color: var(--blanco);
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.foto-flecha:hover { background: var(--azul-profundo); }
.foto-flecha-izq { left: 0.7rem; }
.foto-flecha-der { right: 0.7rem; }

.miniaturas {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.miniatura {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid var(--borde);
    opacity: 0.75;
}

.miniatura:hover { opacity: 1; border-color: var(--azul-cielo); }

.miniatura-activa {
    opacity: 1;
    border-color: var(--azul-primario);
}

.detalle-info h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--azul-profundo);
    margin: 0.7rem 0 0.2rem;
    letter-spacing: -0.01em;
}

.precio-grande {
    font-family: var(--font-mono);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--azul-primario);
    margin: 0 0 1.2rem;
}

.specs {
    list-style: none;
    padding: 0;
    margin: 0 0 1.2rem;
    border-top: 1px solid var(--borde);
}

.specs li {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--borde);
    font-size: 0.92rem;
}

.specs li span { color: var(--texto-suave); }

.descripcion {
    color: #2A4863;
    margin-bottom: 1.5rem;
}

.contacto {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin-top: 1.5rem;
}

.btn {
    display: block;
    text-align: center;
    padding: 0.9rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    border: none;
    cursor: pointer;
    width: 100%;
    font-family: var(--font-body);
}

.btn-whatsapp {
    background: var(--whatsapp);
    color: var(--blanco);
}

.btn-whatsapp:hover { filter: brightness(0.94); }

.btn-instagram {
    background: var(--blanco);
    color: var(--azul-profundo);
    border: 2px solid var(--azul-profundo);
}

.btn-instagram:hover { background: var(--azul-hielo); }

.btn-compartir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: transparent;
    color: var(--texto-suave);
    border: none;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 0.5rem;
}

.btn-compartir:hover { color: var(--azul-primario); }

/* Footer */
.site-footer {
    text-align: center;
    padding: 1.75rem;
    color: var(--blanco);
    background: var(--azul-profundo);
    font-size: 0.85rem;
}

.site-footer p { margin: 0.25rem 0; }

.site-footer-copy {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.78rem;
}

/* WhatsApp flotante */
.whatsapp-flotante {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 58px;
    height: 58px;
    background: var(--whatsapp);
    color: var(--blanco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    z-index: 20;
    transition: transform 0.15s ease;
}

.whatsapp-flotante:hover { transform: scale(1.08); }
