/* =========================================================
   ESTILOS DE LA PLANTILLA DE INMUEBLE (single.php)
   ========================================================= */
.single-property-wrapper {
    --sp-pink: #fc1663;
    --sp-pink-dark: #c4006b;
    --sp-pink-soft: #fff1f7;
    --sp-pink-line: #fce4ec;
    --sp-navy: #0b1a73;
    --sp-text: #4b5563;
    --sp-font-heading: 'Playfair Display', 'Fraunces', Georgia, 'Times New Roman', serif;

    width: 94% !important;
    max-width: 1500px !important;
    margin: 110px auto 50px !important; /* Margen superior de seguridad para el menú fijo */
    box-sizing: border-box !important;
}
.single-property-wrapper *,
.single-property-wrapper *::before,
.single-property-wrapper *::after { box-sizing: border-box; }

/* ---------- Layout superior: contenido + formulario más ancho (460px) ---------- */
.property-top-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 25px;
    align-items: start;
}
.property-main-col { min-width: 0; }

/* ---------- Migas de pan ---------- */
.property-breadcrumbs {
    font-size: 15px;
    color: #c39bd3;
    margin: 6px 0 14px;
}
.property-breadcrumbs a { color: #c39bd3; text-decoration: none; }
.property-breadcrumbs a:hover { color: var(--sp-pink); }
.property-breadcrumbs .sep { margin: 0 8px; }
.property-breadcrumbs .current { color: var(--sp-pink); font-weight: 600; }

/* ---------- Título ---------- */
.property-main-title {
    font-family: var(--sp-font-heading);
    font-size: 46px;
    font-weight: 800;
    color: var(--sp-navy);
    margin: 0 0 10px;
    line-height: 1.15;
    letter-spacing: -0.5px;
}
.property-main-title span { color: var(--sp-pink); }

.property-location-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--sp-navy);
    font-weight: 500;
    font-size: 19px;
    margin-bottom: 8px;
}
.property-location-tag svg { color: var(--sp-pink); flex-shrink: 0; }

.property-badge-row { margin-bottom: 0; }
.property-badge {
    display: inline-block;
    background: var(--sp-pink-soft);
    color: var(--sp-pink);
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: 12px 12px 0 0;
}

/* ---------- Hero: galería compacta + ficha de precio (Corregido y blindado contra solapamientos) ---------- */
.property-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 350px;
    gap: 18px;
    align-items: start;
    margin-bottom: 40px; /* Margen de seguridad inferior */
}

/* Galería estructurada y acotada en altura */
.property-gallery-box {
    display: flex;
    gap: 12px;
    width: 100%;
}

.property-main-img {
    position: relative;
    flex: 1;
    height: 420px; /* Altura fija controlada para evitar estiramientos imprevistos */
    border-radius: 10px;
    overflow: hidden;
    background: #e5e7eb;
}
.property-main-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: var(--sp-pink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 10;
}
.gallery-arrow:hover { background: var(--sp-pink-soft); }
.gallery-prev { left: 8px; }
.gallery-next { right: 8px; }

.property-counter {
    position: absolute;
    bottom: 8px;
    left: 10px;
    background: rgba(40,40,40,0.75);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    z-index: 10;
}

/* Columna de miniaturas con scroll interno controlado si hay muchas fotos */
.property-thumbnails-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 110px;
    height: 420px; /* Misma altura exacta que la imagen principal */
    overflow-y: auto; 
    padding-right: 4px;
}

/* Barra de desplazamiento estética para la columna de miniaturas */
.property-thumbnails-col::-webkit-scrollbar {
    width: 5px;
}
.property-thumbnails-col::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.property-thumb-item {
    position: relative;
    height: 90px; /* Altura controlada por miniatura individual */
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}
.property-thumb-item:hover { border-color: var(--sp-pink); }
.property-thumb-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

.thumb-more-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 500;
}

/* ---------- Ficha de precio ---------- */
.property-details-box {
    background: var(--sp-pink-soft);
    border-radius: 16px;
    padding: 16px 16px 18px;
}
.property-price-tag {
    font-family: var(--sp-font-heading);
    font-size: 38px;
    font-weight: 800;
    color: var(--sp-pink);
    line-height: 1.1;
    margin-bottom: 12px;
}
.property-specs-table { display: flex; flex-direction: column; margin-bottom: 15px; }
.property-spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f6dce8;
    font-size: 14.5px;
}
.property-spec-row:last-child { border-bottom: none; }
.spec-label { display: flex; align-items: center; gap: 10px; color: var(--sp-text); }
.spec-label svg { color: var(--sp-pink); width: 20px; height: 20px; flex-shrink: 0; }
.spec-value { color: var(--sp-text); text-align: right; }

.property-action-buttons { display: flex; gap: 8px; }
.btn-llamar, .btn-escribir, .btn-fav {
    height: 42px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-llamar {
    background: var(--sp-pink);
    color: #fff;
    border: 2px solid var(--sp-pink);
    flex: 1;
}
.btn-llamar:hover { background: var(--sp-pink-dark); border-color: var(--sp-pink-dark); color: #fff; }
.btn-escribir {
    background: #fff;
    color: var(--sp-pink);
    border: 2px solid var(--sp-pink);
    flex: 1;
}
.btn-escribir:hover { background: var(--sp-pink-soft); }
.btn-fav {
    background: #fff;
    color: var(--sp-pink);
    border: 2px solid var(--sp-pink);
    width: 48px;
    padding: 0;
}
.btn-fav:hover { background: var(--sp-pink-soft); }

/* ---------- Formulario lateral (Ancho 460px) ---------- */
.property-sidebar-form {
    background: var(--sp-pink-soft);
    border-radius: 16px;
    padding: 24px;
    position: sticky;
    top: 90px;
}
.sidebar-form-title {
    font-family: var(--sp-font-heading);
    font-size: 30px;
    font-weight: 800;
    color: var(--sp-navy);
    margin: 0 0 8px;
    line-height: 1.05;
    letter-spacing: -0.5px;
}
.sidebar-form-title span { color: var(--sp-pink); }
.sidebar-form-subtitle {
    font-size: 16px;
    color: var(--sp-navy);
    margin: 0 0 16px;
    line-height: 1.4;
}

.property-sidebar-form input[type="text"],
.property-sidebar-form input[type="email"],
.property-sidebar-form input[type="tel"],
.property-sidebar-form textarea {
    width: 100% !important;
    padding: 10px 14px !important;
    border: 1px solid #f6dce8 !important;
    border-radius: 4px !important;
    font-size: 15px !important;
    background: #fff !important;
    outline: none !important;
    box-sizing: border-box !important;
    margin-bottom: 12px !important;
}
.property-sidebar-form textarea {
    height: 90px !important;
    resize: none !important;
}
.property-sidebar-form input[type="submit"] {
    background: var(--sp-pink) !important;
    color: #fff !important;
    border: none !important;
    width: 100% !important;
    height: 46px !important;
    border-radius: 4px !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}
.property-sidebar-form input[type="submit"]:hover {
    background: var(--sp-pink-dark) !important;
}

/* ---------- Barra de compartir ---------- */
.property-share-bar {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--sp-pink-soft);
    padding: 12px 22px;
    border-radius: 12px;
    margin: 25px 0 20px; /* Separación clara y limpia */
    flex-wrap: wrap;
    clear: both;
}
.share-left { font-size: 15px; color: var(--sp-text); min-width: 290px; }
.share-actions-group { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-whatsapp,
.btn-copiar,
.btn-guardar {
    height: 40px;
    padding: 0 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14.5px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-whatsapp:hover { background: #1fb957; color: #fff; }
.btn-copiar,
.btn-guardar {
    background: #fff;
    color: #374151;
    border: 1px solid #f0d5e2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.btn-copiar svg { color: var(--sp-navy); }
.btn-guardar svg { color: var(--sp-pink); }

.btn-facebook {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #f0f2f5;
    color: #1877f2;
    border: 1px solid #dcedfc;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.btn-facebook:hover {
    background-color: #1877f2;
    color: #ffffff;
    border-color: #1877f2;
}

/* ---------- Zona inferior: descripción + tarjetas laterales ---------- */
.property-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 18px;
    align-items: start;
    clear: both; /* Limpia cualquier solapamiento flotante */
    margin-top: 10px;
}

.property-description-card {
    background: #fff;
    border: 1px solid var(--sp-pink-line);
    border-radius: 12px;
    padding: 20px 22px 22px;
    grid-column: 1;
    grid-row: 1;
}

.property-section-title {
    font-family: var(--sp-font-heading);
    font-size: 32px;
    font-weight: 800;
    color: var(--sp-navy);
    margin: 0 0 22px;
    padding-bottom: 10px;
    line-height: 1.1;
    letter-spacing: -0.5px;
    position: relative;
}
.property-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--sp-pink);
}
.property-description-text { font-size: 14.5px; color: var(--sp-text); line-height: 1.55; }
.property-description-text p { margin: 0 0 12px; }
.property-description-text p:last-child { margin-bottom: 0; }

/* Contenedor unificado de las tarjetas en columna derecha */
.property-info-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    grid-column: 2;
    grid-row: 1 / span 2;
}

.info-card-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--sp-pink-line);
    border-radius: 12px;
    padding: 14px 16px 16px;
}
.info-card-icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--sp-pink-soft);
    color: var(--sp-pink);
    display: flex;
    align-items: center;
    justify-content: center;
}
.info-card-icon svg { width: 26px; height: 26px; }
.info-card-body { flex: 1; min-width: 0; }
.info-card-title {
    font-family: var(--sp-font-heading);
    font-size: 24px;
    font-weight: 800;
    color: var(--sp-navy);
    margin: 4px 0 8px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    color: var(--sp-text);
}
.info-list li { display: flex; align-items: center; gap: 12px; }
.info-list li::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--sp-pink);
    flex-shrink: 0;
}
.info-map {
    margin-top: 12px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    background: #e5e7eb;
}
.info-map img { width: 100%; height: 100%; object-fit: cover; opacity: 0.8; display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
    .property-hero { grid-template-columns: minmax(0, 1fr); }
    .property-bottom-grid { grid-template-columns: minmax(0, 1fr); }
    .property-info-col { grid-column: auto; grid-row: auto; }
}
@media (max-width: 1024px) {
    .property-top-layout { grid-template-columns: minmax(0, 1fr); }
    .property-sidebar-form { position: static; }
    .property-main-title { font-size: 36px; }
}
@media (max-width: 700px) {
    .property-main-title { font-size: 28px; }
    .property-hero { grid-template-columns: 1fr; }
    .property-gallery-box { flex-direction: column; height: auto; }
    .property-main-img { height: 260px; }
    .property-thumbnails-col {
        flex-direction: row;
        width: 100%;
        height: 85px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .property-thumb-item { width: 90px; height: 100%; flex-shrink: 0; }
    .property-bottom-grid { grid-template-columns: minmax(0, 1fr); }
    .share-left { min-width: 0; width: 100%; }
    .property-action-buttons { flex-wrap: wrap; }
    .property-price-tag { font-size: 32px; }
}