/* =========================
   TERRACERTA - VISTA PROPIEDAD
========================= */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Montserrat:wght@500;600;700;800&family=Playfair+Display:wght@600;700&display=swap');

* {
    box-sizing: border-box;
}

:root {
    --cafe-oscuro: #55250e;
    --cafe-medio: #8f623f;
    --cafe-claro: #a16d46;
    --crema: #fbfaf7;
    --crema-2: #f6f1eb;
    --texto: #2b211b;
    --gris: #75665d;
    --borde: #eadfd6;
    --blanco: #ffffff;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--crema);
    color: var(--texto);
}

/* =========================
   NAVBAR
========================= */

.navbar {
    width: 100%;
    background: var(--cafe-oscuro);
    color: #fff;
    padding: 18px 7%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    box-shadow: 0 8px 22px rgba(85, 37, 14, 0.22);
}

.logo {
    color: #fff;
    text-decoration: none;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.menu {
    display: flex;
    align-items: center;
    gap: 26px;
    flex-wrap: wrap;
}

.menu a {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
}

.menu a:hover {
    color: #e7c8ad;
}

/* =========================
   CONTENEDOR
========================= */

.contenedor {
    width: min(1200px, 90%);
    margin: 52px auto;
}

/* =========================
   GALERÍA MEJORADA
========================= */

.galeria-propiedad {
    width: 100%;
    margin: 0 0 55px;
}

.imagen-principal {
    position: relative;
    width: 100%;
    height: 560px;
    border-radius: 24px;
    overflow: hidden;
    background: #eee;
    border: 1px solid var(--borde);
    box-shadow: 0 18px 45px rgba(85, 37, 14, 0.12);
}

.imagen-principal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botón encima de imagen principal */
.btn-ver-fotos {
    position: absolute;
    right: 18px;
    bottom: 18px;
    background: rgba(77, 35, 9, 0.92);
    color: #fff;
    border: none;
    padding: 11px 18px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0,0,0,0.25);
    z-index: 5;
}

.btn-ver-fotos:hover {
    background: #8B5E3C;
}

/* Miniaturas con scroll horizontal */
.miniaturas-scroll {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    overflow-x: auto;
    padding: 4px 4px 12px;
    scroll-behavior: smooth;
}

.miniaturas-scroll::-webkit-scrollbar {
    height: 8px;
}

.miniaturas-scroll::-webkit-scrollbar-thumb {
    background: #8B5E3C;
    border-radius: 999px;
}

.miniatura-btn {
    flex: 0 0 140px;
    height: 95px;
    border: 3px solid transparent;
    border-radius: 16px;
    overflow: hidden;
    padding: 0;
    cursor: pointer;
    background: #eee;
    transition: 0.2s ease;
}

.miniatura-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.miniatura-btn:hover,
.miniatura-btn.activa {
    border-color: #8B5E3C;
    transform: translateY(-2px);
}

/* =========================
   MODAL GALERÍA
========================= */

.modal-galeria {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.72);
    padding: 35px;
    overflow-y: auto;
}

.modal-galeria.abierto {
    display: block !important;
}

.modal-galeria-contenido {
    position: relative;
    max-width: 1100px;
    margin: 0 auto;
    background: #fffdf8;
    border-radius: 24px;
    padding: 35px;
}

.modal-galeria-contenido h2 {
    font-family: Georgia, "Times New Roman", serif;
    color: #4D2309;
    margin-top: 0;
    margin-bottom: 24px;
}

.cerrar-galeria {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: #4D2309;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
}

.cerrar-galeria:hover {
    background: #8B5E3C;
}

.galeria-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 18px;
}

.modal-img-btn {
    border: none;
    padding: 0;
    border-radius: 18px;
    overflow: hidden;
    cursor: zoom-in;
    background: #eee;
    height: 210px;
    transition: 0.2s ease;
}

.modal-img-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 26px rgba(0,0,0,0.18);
}

.modal-img-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* =========================
   MODAL FOTO GRANDE
========================= */

.modal-foto-grande {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.88);
    align-items: center;
    justify-content: center;
    padding: 30px;
}

.modal-foto-grande.abierto {
    display: flex !important;
}

.modal-foto-grande img {
    max-width: 95%;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.45);
    background: #fff;
}

.cerrar-foto-grande {
    position: fixed;
    top: 22px;
    right: 28px;
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: #4D2309;
    color: #fff;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    z-index: 10001;
}

.cerrar-foto-grande:hover {
    background: #8B5E3C;
}

/* =========================
   LAYOUT PRINCIPAL
========================= */

.layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 48px;
    align-items: start;
}

.contenido-propiedad {
    min-width: 0;
}

.titulo-propiedad {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 46px;
    line-height: 1.1;
    color: var(--cafe-oscuro);
    text-transform: none;
}

.precio {
    margin: 0;
    color: var(--cafe-medio);
    font-size: 32px;
    font-weight: 800;
}

.moneda {
    margin-top: 4px;
    color: var(--gris);
    font-size: 15px;
    font-weight: 600;
}

/* =========================
   BOTONES
========================= */

.acciones {
    margin: 24px 0;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    border: none;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 700;
    font-size: 15px;
    transition: 0.2s ease;
}

.btn-negro,
.btn-dorado {
    background: var(--cafe-medio);
    color: #fff;
}

.btn-negro:hover,
.btn-dorado:hover {
    background: var(--cafe-oscuro);
}

.btn-dorado {
    margin-left: 12px;
}

/* =========================
   DIRECCIÓN / MAPA
========================= */

.direccion {
    margin: 24px 0;
    padding: 18px 20px;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 18px;
    line-height: 1.7;
    color: var(--texto);
    font-size: 16px;
}

.direccion strong {
    color: var(--cafe-oscuro);
}

.mapa-contenedor {
    display: none;
    margin: 22px 0 34px;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--borde);
    box-shadow: 0 18px 45px rgba(85, 37, 14, 0.13);
}

.mapa-contenedor iframe {
    width: 100%;
    height: 430px;
    border: 0;
    display: block;
}

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

.descripcion {
    margin-top: 30px;
    padding: 28px;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 22px;
    color: #3d332d;
    font-size: 17px;
    line-height: 1.85;
}

/* =========================
   DATOS RÁPIDOS
========================= */

.datos-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 38px 0;
}

.dato {
    padding: 22px 16px;
    text-align: center;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(85, 37, 14, 0.06);
}

.dato strong {
    display: block;
    margin-bottom: 7px;
    color: var(--cafe-oscuro);
    font-size: 22px;
}

.dato span {
    color: var(--gris);
    font-size: 14px;
}

/* =========================
   AMENIDADES
========================= */

.seccion {
    margin-top: 44px;
}

.seccion h2 {
    margin-bottom: 22px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--cafe-oscuro);
    font-size: 34px;
}

.amenidades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
    gap: 18px;
}

.amenidad {
    padding: 20px 16px;
    text-align: center;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 20px;
    color: var(--texto);
    transition: 0.2s ease;
}

.amenidad:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(85, 37, 14, 0.12);
}

.amenidad-icono {
    margin-bottom: 8px;
    color: var(--cafe-medio);
    font-size: 30px;
}

/* =========================
   CARD CONTACTO
========================= */

.asesor-card {
    position: sticky;
    top: 24px;
    padding: 28px;
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(85, 37, 14, 0.13);
}

.asesor-card h3 {
    margin: 0 0 14px;
    font-family: Georgia, "Times New Roman", serif;
    color: var(--cafe-oscuro);
    font-size: 28px;
    line-height: 1.15;
}

.asesor-card p {
    color: var(--gris);
    line-height: 1.65;
}

.btn-whatsapp {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    text-align: center;
    background: var(--cafe-medio);
    color: #fff;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 800;
    transition: 0.2s ease;
}

.btn-whatsapp:hover {
    background: var(--cafe-oscuro);
}

/* =========================
   FOOTER
========================= */

footer {
    margin-top: 70px;
    padding: 38px 7%;
    background: var(--cafe-oscuro);
    color: #fff;
    text-align: center;
}

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

@media (max-width: 950px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu {
        gap: 16px;
    }

    .imagen-principal {
        height: 380px;
    }

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

    .asesor-card {
        position: static;
    }

    .datos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .titulo-propiedad {
        font-size: 34px;
    }
}

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

    .miniatura-btn {
        flex-basis: 110px;
        height: 80px;
    }

    .modal-galeria {
        padding: 16px;
    }

    .modal-galeria-contenido {
        padding: 24px 18px;
    }

    .galeria-modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-img-btn {
        height: 230px;
    }

    .modal-foto-grande {
        padding: 18px;
    }

    .cerrar-foto-grande {
        top: 14px;
        right: 14px;
    }
}

@media (max-width: 600px) {
    .contenedor {
        width: 92%;
        margin: 28px auto;
    }

    .navbar {
        padding: 16px 5%;
    }

    .logo {
        font-size: 22px;
    }

    .menu {
        gap: 12px;
    }

    .menu a {
        font-size: 14px;
    }

    .imagen-principal {
        height: 280px;
    }

    .titulo-propiedad {
        font-size: 30px;
    }

    .precio {
        font-size: 26px;
    }

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

    .btn-dorado {
        margin-left: 0;
        margin-top: 10px;
    }

    .mapa-contenedor iframe {
        height: 330px;
    }
}
/* ============================
   MODAL COMPARTIR
============================ */

.modal-compartir {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.62);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10050;
    padding: 22px;
}

.modal-compartir.abierto {
    display: flex !important;
}

.modal-compartir-contenido {
    width: 100%;
    max-width: 590px;
    background: #fffdf8;
    border: 1px solid rgba(77, 35, 9, 0.10);
    border-radius: 26px;
    padding: 36px;
    position: relative;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
    text-align: center;
    animation: aparecerCompartir 0.22s ease;
}

@keyframes aparecerCompartir {
    from {
        opacity: 0;
        transform: translateY(14px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.cerrar-compartir {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(77, 35, 9, 0.10);
    color: var(--cafe-oscuro);
    font-size: 27px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}

.cerrar-compartir:hover {
    background: var(--cafe-oscuro);
    color: #fff;
}

.modal-compartir-contenido h2 {
    margin: 0 0 10px;
    color: var(--cafe-oscuro);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 32px;
    line-height: 1.15;
}

.modal-compartir-contenido p {
    color: var(--gris);
    margin: 0 0 26px;
    line-height: 1.6;
}

.compartir-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.compartir-opcion {
    width: 100%;
    min-height: 48px;
    border: none;
    border-radius: 15px;
    padding: 14px 16px;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    font-size: 15px;
    text-align: center;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.10);
}

.compartir-opcion:hover {
    transform: translateY(-2px);
    color: #fff !important;
    opacity: 0.94;
}

.compartir-opcion.whatsapp {
    background: #25D366;
}

.compartir-opcion.facebook {
    background: #1877F2;
}

.compartir-opcion.instagram {
    background: linear-gradient(135deg, #833AB4, #E1306C, #FCAF45);
}

.compartir-opcion.twitter {
    background: #111111;
}

.compartir-opcion.gmail {
    background: #D44638;
}

.compartir-opcion.copiar {
    background: var(--cafe-oscuro);
}

.input-url-compartir {
    width: 100%;
    border: 1px solid rgba(77, 35, 9, 0.18);
    background: #ffffff;
    color: var(--cafe-oscuro);
    border-radius: 14px;
    padding: 14px 15px;
    font-size: 14px;
    outline: none;
    text-align: center;
}

.input-url-compartir:focus {
    border-color: var(--cafe-medio);
    box-shadow: 0 0 0 4px rgba(143, 98, 63, 0.12);
}

.mensaje-copiado {
    margin-top: 14px;
    color: var(--cafe-oscuro);
    font-weight: 800;
    opacity: 0;
    transform: translateY(5px);
    transition: 0.2s ease;
}

.mensaje-copiado.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 520px) {
    .modal-compartir {
        padding: 16px;
    }

    .modal-compartir-contenido {
        padding: 34px 20px 26px;
        border-radius: 22px;
    }

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

    .modal-compartir-contenido h2 {
        font-size: 26px;
    }
}
/* ============================
   BOTONES UNIFICADOS EN PROPIEDAD
============================ */

.contenido-propiedad .btn,
.btn-negro,
.btn-dorado,
.asesor-card .btn-whatsapp,
.btn-mapa,
.btn-google-maps {
  background: #4D2309 !important;
  border: 2px solid #4D2309 !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  font-weight: 700 !important;
  text-decoration: none !important;
  transition: 0.25s ease !important;
}

.contenido-propiedad .btn:hover,
.btn-negro:hover,
.btn-dorado:hover,
.asesor-card .btn-whatsapp:hover,
.btn-mapa:hover,
.btn-google-maps:hover {
  background: #8B5E3C !important;
  border-color: #8B5E3C !important;
  color: #ffffff !important;
  transform: translateY(-2px);
}

/* ============================
   TIPOGRAFÍAS TERRACERTA
   Montserrat + Playfair + Manrope
============================ */

:root {
    --font-logo: 'Montserrat', Arial, sans-serif;
    --font-title: 'Playfair Display', Georgia, serif;
    --font-body: 'Manrope', 'Montserrat', Arial, sans-serif;
}

/* Texto general */
body,
.direccion,
.descripcion,
.dato span,
.asesor-card p,
.amenidad,
footer,
.input-url-compartir,
.modal-compartir-contenido p {
    font-family: var(--font-body) !important;
}

/* Marca, navegación, botones y etiquetas */
.logo,
.menu a,
.btn,
.btn-ver-fotos,
.btn-whatsapp,
.btn-negro,
.btn-dorado,
.compartir-opcion,
.cerrar-galeria,
.cerrar-foto-grande,
.cerrar-compartir,
.mensaje-copiado,
.moneda,
.precio,
.dato strong,
.direccion strong {
    font-family: var(--font-logo) !important;
}

/* Títulos elegantes */
.titulo-propiedad,
.seccion h2,
.asesor-card h3,
.modal-galeria-contenido h2,
.modal-compartir-contenido h2 {
    font-family: var(--font-title) !important;
}

/* Ajuste visual para que combine con la página principal */
.logo {
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
}

.menu a {
    font-weight: 700 !important;
}

.titulo-propiedad {
    font-weight: 700 !important;
}

.descripcion {
    font-size: 16.5px !important;
    line-height: 1.85 !important;
}

.amenidad {
    font-weight: 600 !important;
}

.btn,
.btn-ver-fotos,
.btn-whatsapp,
.btn-negro,
.btn-dorado,
.compartir-opcion {
    font-weight: 800 !important;
    letter-spacing: 0.1px !important;
}

/* ============================
   AMENIDADES COMPACTAS
   Ajuste para que las tarjetas ocupen menos espacio
============================ */

.amenidades-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 12px !important;
}

.amenidad {
    min-height: 82px !important;
    padding: 12px 10px !important;
    border-radius: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: center !important;
}

.amenidad:hover {
    transform: translateY(-2px) !important;
}

.amenidad-icono {
    margin-bottom: 2px !important;
    font-size: 22px !important;
    line-height: 1 !important;
}

.amenidad div:last-child {
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
}

/* Móvil */
@media (max-width: 600px) {
    .seccion h2 {
        font-size: 29px !important;
        margin-bottom: 16px !important;
    }

    .amenidades-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .amenidad {
        min-height: 70px !important;
        padding: 10px 7px !important;
        border-radius: 14px !important;
    }

    .amenidad-icono {
        font-size: 20px !important;
        margin-bottom: 1px !important;
    }

    .amenidad div:last-child {
        font-size: 12.5px !important;
        line-height: 1.18 !important;
    }
}

/* Celulares muy angostos */
@media (max-width: 360px) {
    .amenidades-grid {
        gap: 8px !important;
    }

    .amenidad {
        min-height: 66px !important;
        padding: 9px 5px !important;
    }

    .amenidad div:last-child {
        font-size: 12px !important;
    }
}

/* ============================
   LOGO NAVBAR CON IMAGEN
   Igual al navbar principal
============================ */

.navbar {
    min-height: 102px;
}

.logo.logo-navbar {
    display: flex !important;
    align-items: center !important;
    gap: 16px !important;
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: var(--font-logo) !important;
    font-size: 30px !important;
    font-weight: 800 !important;
    letter-spacing: 0.2px !important;
    text-transform: none !important;
    white-space: nowrap !important;
}

.navbar-logo-img {
    width: 74px !important;
    height: 74px !important;
    object-fit: cover !important;
    object-position: center !important;
    border-radius: 50% !important;
    clip-path: circle(50% at 50% 50%) !important;
    display: block !important;
    flex-shrink: 0 !important;
    background: transparent !important;
}

.logo.logo-navbar span {
    display: inline-block !important;
}

/* Responsive */
@media (max-width: 768px) {
    .logo.logo-navbar {
        font-size: 24px !important;
        gap: 12px !important;
    }

    .navbar-logo-img {
        width: 62px !important;
        height: 62px !important;
    }
}

@media (max-width: 480px) {
    .logo.logo-navbar {
        font-size: 20px !important;
        white-space: normal !important;
        line-height: 1.15 !important;
    }

    .navbar-logo-img {
        width: 54px !important;
        height: 54px !important;
    }
}