/*
=========================================================
COINCOLINA - ESTILOS PARA DETALLE DE PROPIEDAD (REDISEÑO)
=========================================================
*/

:root {
    --cc-verde: #167d36;
    --cc-verde-oscuro: #0f5c27;
    --cc-verde-claro: #e8f7ee;
    --cc-verde-borde: #c7ead4;
    --cc-texto: #1a1a2e;
    --cc-texto-suave: #5c6672;
    --cc-fondo: #f4f6f8;
    --cc-borde: #eaecef;
    --cc-sombra: 0 4px 20px rgba(17, 40, 24, 0.06);
    --cc-sombra-hover: 0 10px 28px rgba(17, 40, 24, 0.10);
    --cc-radio: 16px;
}

body {
    background: var(--cc-fondo);
}

/* ========================================================= */
/* BREADCRUMB */
/* ========================================================= */

.detalle-breadcrumb {
    max-width: 1200px;
    margin: 18px auto 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--cc-texto-suave);
}

.detalle-breadcrumb a {
    color: var(--cc-texto-suave);
    text-decoration: none;
    transition: color 0.2s ease;
}

.detalle-breadcrumb a:hover {
    color: var(--cc-verde);
}

.detalle-breadcrumb .breadcrumb-actual {
    color: var(--cc-verde);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 260px;
}

/* ========================================================= */
/* GALERÍA — SIN CAMBIOS */
/* ========================================================= */

.detalle-galeria {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 0 20px;
}

.galeria-principal {
    width: 100%;
    height: 520px;
    overflow: hidden;
    border-radius: var(--cc-radio);
    background: #e8ecf1;
    box-shadow: var(--cc-sombra);
    position: relative;
}

.galeria-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galeria-principal:hover img {
    transform: scale(1.03);
}

/* Flechas de navegación adelante / atrás */
.galeria-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--cc-texto);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    transition: all 0.25s ease;
    z-index: 2;
}

.galeria-nav:hover {
    background: var(--cc-verde);
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.galeria-nav--prev {
    left: 16px;
}

.galeria-nav--next {
    right: 16px;
}

.galeria-miniaturas {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
}

.galeria-miniaturas img {
    width: 130px;
    height: 90px;
    object-fit: cover;
    border-radius: 12px;
    cursor: pointer;
    border: 3px solid transparent;
    opacity: 0.7;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.galeria-miniaturas img:hover {
    opacity: 1;
    transform: translateY(-3px);
}

.galeria-miniaturas img.activa {
    border-color: var(--cc-verde);
    opacity: 1;
    box-shadow: 0 4px 12px rgba(22, 125, 54, 0.25);
}

/* ========================================================= */
/* INFORMACIÓN PRINCIPAL */
/* ========================================================= */

.detalle-info {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 20px;
}

.detalle-contenedor {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    align-items: start;
}

.detalle-columna--principal {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.detalle-columna--agente {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 20px;
}

/* Tarjeta base reutilizable */
.detalle-tarjeta {
    background: #fff;
    border-radius: var(--cc-radio);
    padding: 28px;
    box-shadow: var(--cc-sombra);
    border: 1px solid var(--cc-borde);
    transition: box-shadow 0.25s ease;
}

.detalle-tarjeta:hover {
    box-shadow: var(--cc-sombra-hover);
}

/* ========================================================= */
/* ENCABEZADO */
/* ========================================================= */

.detalle-tipo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.badge-tipo {
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tipo-venta { background: var(--cc-verde); }
.tipo-arriendo { background: #e67e22; }
.tipo-permuta { background: #3498db; }

.badge-codigo {
    font-size: 12px;
    font-weight: 600;
    color: var(--cc-texto-suave);
    background: #f2f4f6;
    padding: 5px 14px;
    border-radius: 20px;
}

.badge-destacado {
    font-size: 12px;
    font-weight: 600;
    color: #b8860b;
    background: #fff6df;
    padding: 5px 14px;
    border-radius: 20px;
}

.detalle-encabezado h1 {
    font-size: 30px;
    line-height: 1.25;
    color: var(--cc-texto);
    margin: 0 0 10px;
    font-weight: 700;
}

.detalle-ubicacion {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: var(--cc-texto-suave);
    margin: 0 0 22px;
}

.detalle-ubicacion svg {
    color: var(--cc-verde);
    flex-shrink: 0;
}

/* ========================================================= */
/* PRECIO */
/* ========================================================= */

.detalle-precio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 0;
    border-top: 1px solid var(--cc-borde);
    border-bottom: 1px solid var(--cc-borde);
    margin-bottom: 22px;
}

.detalle-precio-info {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.precio-valor {
    font-size: 34px;
    font-weight: 800;
    color: var(--cc-verde);
    letter-spacing: -0.5px;
}

.precio-periodo {
    font-size: 15px;
    color: var(--cc-texto-suave);
    font-weight: 500;
}

.detalle-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.detalle-qr img {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    border: 1px solid var(--cc-borde);
    padding: 6px;
    background: #fff;
}

.detalle-qr span {
    font-size: 11px;
    color: var(--cc-texto-suave);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ========================================================= */
/* CARACTERÍSTICAS RÁPIDAS (dentro del encabezado) */
/* ========================================================= */

.detalle-caracteristicas-rapidas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 14px;
}

.cr-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--cc-verde-claro);
    border: 1px solid var(--cc-verde-borde);
    border-radius: 12px;
    padding: 12px 14px;
}

.cr-icono {
    font-size: 20px;
    line-height: 1;
}

.cr-valor {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--cc-texto);
}

.cr-etiqueta {
    display: block;
    font-size: 11px;
    color: var(--cc-texto-suave);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ========================================================= */
/* DESCRIPCIÓN */
/* ========================================================= */

.detalle-descripcion h2,
.detalle-caracteristicas-completas h2 {
    font-size: 19px;
    color: var(--cc-texto);
    margin: 0 0 16px;
    font-weight: 700;
    position: relative;
    padding-left: 14px;
}

.detalle-descripcion h2::before,
.detalle-caracteristicas-completas h2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 4px;
    border-radius: 4px;
    background: var(--cc-verde);
}

.detalle-descripcion p {
    line-height: 1.85;
    color: #414852;
    font-size: 15px;
    margin: 0;
    white-space: pre-line;
}

/* ========================================================= */
/* CARACTERÍSTICAS COMPLETAS (agrupadas por categoría) */
/* ========================================================= */

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px 28px;
}

.categoria-bloque h3 {
    font-size: 14px;
    font-weight: 700;
    color: var(--cc-verde-oscuro);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0 0 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--cc-borde);
}

.categoria-lista {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.categoria-lista li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #3a4149;
}

.categoria-lista li svg {
    color: var(--cc-verde);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ========================================================= */
/* AGENTE */
/* ========================================================= */

.detalle-agente h3 {
    font-size: 17px;
    color: var(--cc-texto);
    margin: 0 0 20px;
    font-weight: 700;
}

.agente-perfil {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--cc-borde);
}

.agente-foto {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--cc-verde-claro);
}

.agente-foto-placeholder {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cc-verde-claro);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.agente-nombre {
    font-size: 16px;
    font-weight: 700;
    color: var(--cc-texto);
    margin: 0;
}

.agente-rol {
    font-size: 13px;
    color: var(--cc-texto-suave);
    margin: 3px 0 0;
}

.agente-contacto h4 {
    font-size: 12px;
    color: var(--cc-texto-suave);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 12px;
}

.btn-contacto {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    border-radius: 10px;
    text-decoration: none;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.25s ease;
}

.btn-telefono {
    background: #eef5ff;
    color: #0066cc;
}

.btn-telefono:hover {
    background: #0066cc;
    color: white;
}

.btn-email {
    background: #eef5ff;
    color: #0066cc;
}

.btn-email:hover {
    background: #0066cc;
    color: white;
}

.btn-whatsapp {
    background: #25d366;
    color: white;
}

.btn-whatsapp:hover {
    background: #1da851;
    transform: translateY(-1px);
}

.btn-volver {
    display: inline-block;
    padding: 11px 20px;
    background: var(--cc-verde-claro);
    color: var(--cc-verde-oscuro);
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 6px;
    transition: all 0.25s ease;
}

.btn-volver:hover {
    background: var(--cc-verde);
    color: white;
}

.agente-sin-asignar {
    text-align: center;
    color: var(--cc-texto-suave);
}

.agente-sin-asignar p {
    margin: 5px 0;
}

/* ========================================================= */
/* COMPARTIR */
/* ========================================================= */

.detalle-compartir h4 {
    font-size: 12px;
    color: var(--cc-texto-suave);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 14px;
}

.compartir-botones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compartir-botones a {
    padding: 9px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.compartir-whatsapp {
    background: #25d366;
    color: white;
}

.compartir-whatsapp:hover {
    background: #1da851;
}

.compartir-email {
    background: #f2f4f6;
    color: #333;
}

.compartir-email:hover {
    background: #e2e6ea;
}

/* ========================================================= */
/* BOTÓN FLOTANTE DE WHATSAPP */
/* ========================================================= */

.wsp-flotante {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: transform 0.25s ease;
}

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

/* ========================================================= */
/* RESPONSIVE */
/* ========================================================= */

@media (max-width: 900px) {
    .detalle-contenedor {
        grid-template-columns: 1fr;
    }

    .detalle-columna--agente {
        position: static;
    }
}

@media (max-width: 768px) {
    .galeria-principal {
        height: 300px;
    }

    .galeria-nav {
        width: 36px;
        height: 36px;
    }

    .galeria-nav--prev {
        left: 10px;
    }

    .galeria-nav--next {
        right: 10px;
    }

    .galeria-miniaturas img {
        width: 80px;
        height: 60px;
    }

    .detalle-encabezado h1 {
        font-size: 22px;
    }

    .precio-valor {
        font-size: 26px;
    }

    .detalle-qr img {
        width: 64px;
        height: 64px;
    }

    .detalle-caracteristicas-rapidas {
        grid-template-columns: repeat(3, 1fr);
    }

    .categorias-grid {
        grid-template-columns: 1fr;
    }

    .detalle-tarjeta {
        padding: 20px;
    }

    .detalle-breadcrumb .breadcrumb-actual {
        max-width: 150px;
    }
}

@media (max-width: 480px) {
    .detalle-caracteristicas-rapidas {
        grid-template-columns: repeat(2, 1fr);
    }

    .detalle-tipo {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .compartir-botones {
        flex-direction: column;
    }

    .compartir-botones a {
        text-align: center;
    }
}