/* =========================
   Variables base
   ========================= */
:root {
    --color-bg: #f3f4f6;
    --color-bg-card: #ffffff;
    --color-primary: #2563eb;
    --color-primary-dark: #1d4ed8;
    --color-header: #111827;
    --color-text: #111827;
    --color-text-muted: #6b7280;
    --radius-card: 0.75rem;
    --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.06);
}

/* TIPOGRAFÍA GENERAL DETALLE */
body {
    font-family: "Inter", sans-serif;
}

/* HERO DETALLE DE PROPIEDAD */

.hero-detalle {
    position: relative;
    height: 80vh;
    min-height: 480px;
    max-height: 720px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 4rem 0 3rem;
    color: #ffffff;
}

.hero-detalle-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease-in-out;
    opacity: 1;
    z-index: 0;
}

.hero-detalle::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.65));
    z-index: 1;
}

.hero-detalle-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 1200px; /* contenedor más ancho */
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 2rem;
}

.hero-detalle-left {
    max-width: 650px;
}

.hero-detalle-title {
    font-family: "Inter", sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.hero-detalle-location {
    margin: 0;
    font-size: 1.05rem;
    color: #e5e7eb;
}

.hero-detalle-location span {
    color: #38bdf8;
}

/* PRECIO DESTACADO */

.hero-detalle-right {
    text-align: right;
}

.hero-detalle-price-box {
    display: inline-block;
    background: rgba(0, 0, 0, 0.55);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(4px);
}

.hero-detalle-price-big {
    margin: 0;
    font-size: clamp(2.1rem, 3.2vw, 2.7rem);
    font-weight: 700;
}

.hero-detalle-tagline {
    margin: 0.25rem 0 0;
    font-size: 0.9rem;
    color: #e5e7eb;
    text-align: right;
}

.hero-detalle-slides {
    display: none;
}

/* LAYOUT PRINCIPAL */

.breadcrumb-detalle {
    max-width: 1200px;
    margin: 1.5rem auto 1rem;
    padding: 0 1.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb-detalle a {
    color: #2563eb;
    text-decoration: none;
}

/* Aseguramos que las columnas se alineen arriba */
.detalle-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    max-width: 1400px;
    padding: 0 1.5rem;
    margin-left: auto;
    margin-right: auto;
    align-items: flex-start;
}

.detalle-layout aside {
    position: sticky;
    top: 6rem;
}

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

    .detalle-layout aside {
        position: static;
    }
}
/* Contenedor de la sección Galería */
.detalle-galeria-full {
    max-width: 1400px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
    
}

/* Galería: SIEMPRE 3 columnas en escritorio */
.detalle-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
    width: 100%;
    
}

/* Cada tarjeta de imagen */
.detalle-gallery-item {
    width: 100%;
    height: 230px;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

/* Título de la galería con el mismo estilo de los otros h2 */
.detalle-galeria-full h2 {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 0.75rem 0;
    color: #111827;
}
    

/* Ítems extra (de la 10 en adelante) – ocultos al inicio */
.detalle-gallery-item--hidden {
    display: none;     /* OJO: sin !important para que JS pueda cambiarlo */
}

.detalle-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detalle-gallery-item:hover img {
    transform: scale(1.05);
}

/* Botón Ver más / Ver menos centrado */
.detalle-gallery-toggle {
    padding: 0.6rem;
    background: #1f2933;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, transform 0.05s ease;
    display: block;
    margin: 1.5rem auto 0;
}

.detalle-gallery-toggle:hover {
    background: #111827;
}

/* Responsive */
@media (max-width: 900px) {
    .detalle-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .detalle-gallery {
        grid-template-columns: minmax(0, 1fr);
    }
}



/* RESUMEN CON ICONOS */

.detalle-resumen {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem 2rem;
    margin-bottom: 1.5rem;
}

.detalle-resumen-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 150px;
}

.detalle-resumen-icon {
    font-size: 1.4rem;
}

.detalle-resumen-item-label {
    font-size: 0.85rem;
    color: #6b7280;
}

.detalle-resumen-item-value {
    font-weight: 600;
    font-size: 1.05rem;
}

/* SECCIONES */

.detalle-section {
    margin-bottom: 2rem;
}

.detalle-section h2,
.otras-section h2,
.detalle-aside-card h2 {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 0.75rem 0;
}

/* DESCRIPCIÓN */

.detalle-description-text {
    white-space: pre-line;
    line-height: 1.8;
    font-size: 1.05rem;
}

/* TABLA ESPECIFICACIONES CON TICKS */

.detalle-table {
    width: 100%;
    border-collapse: collapse;
}

.detalle-table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 0.6rem 0.5rem;
}

.detalle-table td:first-child {
    position: relative;
    padding-left: 1.7rem;
    font-weight: 500;
}

/* ✔ Tick a la derecha */
.detalle-table td:last-child {
    position: relative;
    padding-right: 1.8rem;
}

.detalle-table td:last-child::after {
    content: "✓";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    font-weight: 700;
    font-size: 1.1rem;
}


/* COMODIDADES */
.detalle-tags {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.detalle-tag {
    font-size: 1rem;
    font-family: "Inter", sans-serif;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.detalle-tag::after {
    content: "✓";
    color: #16a34a;
    font-weight: bold;
}

@media (max-width: 900px) {
    .detalle-tags {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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


/* GALERÍA */

.detalle-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
}

.detalle-gallery-item {
    width: 220px;
    height: 150px;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.detalle-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detalle-gallery-item:hover img {
    transform: scale(1.05);
}

/* TARJETAS LATERALES */

.detalle-aside-card {
    border: 1px solid #e5e7eb;
    padding: 1.2rem;
    border-radius: 0.9rem;
    margin-bottom: 1.5rem;
    background-color: #f9fafb;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.04);
}

.detalle-aside-card p {
    margin: 0.5rem 0;
}

.detalle-aside-card-info strong {
    font-weight: 600;
}

/* FORMULARIO LATERAL */

.detalle-form-text {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.detalle-form-group {
    margin-bottom: 0.75rem;
}

.detalle-label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.9rem;
}

.detalle-input,
.detalle-textarea {
    width: 100%;
    padding: 0.55rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-family: "Inter", sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.detalle-textarea {
    resize: vertical;
}

.detalle-input:focus,
.detalle-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.detalle-btn {
    width: 100%;
    padding: 0.6rem;
    background: #1f2933;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, transform 0.05s ease;
}

.detalle-btn:hover {
    background: #111827;
}

.detalle-btn:active {
    transform: scale(0.98);
}

.detalle-gallery-toggle {
    padding: 0.6rem;
    background: #1f2933;
    color: white;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: background-color 0.15s ease, transform 0.05s ease;

    display: block;
    margin: 1rem auto 0;
}


/* OTRAS PROPIEDADES */

.otras-section {
    max-width: 1200px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.otras-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.otras-card {
    border: 1px solid #e5e7eb;
    padding: 0;
    border-radius: 0.75rem;
    width: 260px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    background-color: #ffffff;
}

.otras-card-img {
    height: 150px;
    overflow: hidden;
}

.otras-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.otras-card-body {
    padding: 0.75rem;
}

.otras-card-title {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.otras-card-location {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.otras-card-price {
    margin: 0.25rem 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.otras-card-link {
    font-size: 0.9rem;
    text-decoration: none;
    color: #2563eb;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .hero-detalle {
        height: 70vh;
        padding-bottom: 2.5rem;
    }

    .hero-detalle-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-detalle-right {
        text-align: left;
    }

    .hero-detalle-price-big {
        font-size: 1.8rem;
    }

    .hero-detalle-tagline {
        text-align: left;
    }

    .detalle-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    
}
/* LIGHTBOX PARA GALERÍA */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(3px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.lightbox-img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 2.2rem;
    color: white;
    cursor: pointer;
}

/* Flechas de navegación del lightbox */
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    font-size: 3rem;
    color: white;
    padding: 0 1rem;
    cursor: pointer;
    user-select: none;
    transform: translateY(-50%);
    transition: opacity 0.15s ease;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 0.6;
}

/* Sección de ubicación */
.detalle-ubicacion-full {
    max-width: 1400px;
    margin: 0 auto 2.5rem;
    padding: 0 1.5rem;
}

.detalle-ubicacion-full h2 {
    font-family: "Inter", sans-serif;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 0 0 0.75rem 0;
    color: #111827;
}

/* Wrapper del mapa para hacerlo responsive */
.detalle-mapa-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
    background: #e5e7eb;
}

.detalle-mapa-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0.75rem;
}
