body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f9;
}

/* Contenedor principal */
.content-wrapper {
    padding-top: 220px;
    /* Suficiente para el header + action bar + margen */
    min-height: calc(100vh - 300px);
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

/* Menú (Eliminado para usar el header global de global.css) */
/*
nav {
    background: #00205B;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
*/

/* Botón hamburguesa */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    height: 3px;
    width: 25px;
    background: white;
    margin: 4px 0;
    border-radius: 2px;
}

/* Precio */
.precio {
    font-size: 28px;
    color: #C2185B;
    font-weight: bold;
    margin: 20px 0;
}

/* Botón WhatsApp */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 12px 20px;
    background: white;
    color: #00205B;
    border: 2px solid #00205B;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-whatsapp:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 32, 91, 0.15);
}

.btn-facebook {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 20px;
    background: white;
    color: #1877F2;
    border: 2px solid #1877F2;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-facebook:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.15);
}

.btn-whatsapp-share {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 12px 20px;
    background: white;
    color: #25D366;
    border: 2px solid #25D366;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.2s;
}

.btn-whatsapp-share:hover {
    background: #f0fff4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.15);
}

/* Selector en detalle */
.titulo-con-check {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.check-container-detalle {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    padding: 8px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    border: 1px solid #e2e8f0;
    transition: all 0.2s;
}

.check-container-detalle:hover {
    border-color: var(--magenta, #d81159);
    transform: translateY(-2px);
}

.check-container-detalle span {
    font-size: 14px;
    font-weight: 600;
    color: #475569;
}

.prop-checkbox {
    width: 20px;
    height: 20px;
    accent-color: var(--magenta, #d81159);
    cursor: pointer;
}

/* Estilos de información adicional */
.ubicacion {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    margin-bottom: 20px;
    font-size: 16px;
}

.info-adicional {
    margin: 25px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.caracteristicas {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.caracteristicas li {
    font-size: 15px;
    color: #334155;
}

.descripcion-container {
    margin: 30px 0;
}

.descripcion-container h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--azul, #00205B);
}

.descripcion-texto {
    line-height: 1.7;
    color: #475569;
    white-space: pre-line;
    /* Preserva saltos de línea del CMS */
    font-size: 16px;
}

.acciones-detalle {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.volver {
    display: inline-block;
    color: #64748b;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
}

.volver:hover {
    color: var(--azul, #00205B);
}

.mgdetalle {

    color: #C2185B;
}

/* Volver */
.volver {
    display: inline-block;
    margin-top: 20px;
    text-decoration: none;
    color: #00205B;
    font-weight: bold;
}

/* Estados */
.estado-reservado {
    background: #C2185B;
    color: white;
}

.estado-vendido {
    background: #00205B;
    color: white;
}

.estado-alquilado {
    background: #3F51B5;
    color: white;
}

.estado-apto-credito {
    background: #4CAF50;
    color: white;
}

/* Layout de fotos */
.detalle-fotos {
    display: grid;
    grid-template-columns: 7.3fr 2.7fr;
    grid-template-rows: 1fr 1fr;
    gap: 10px;
    height: 600px;
    grid-template-areas:
        "principal secundaria1"
        "principal secundaria2";
}

.detalle-fotos .principal {
    grid-area: principal;
}

.detalle-fotos .secundaria1 {
    grid-area: secundaria1;
}

.detalle-fotos .secundaria2 {
    grid-area: secundaria2;
}

.detalle-fotos img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    background-color: #000;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, filter 0.3s ease;
    animation: fadeIn 0.8s ease forwards;
    opacity: 0;
}

/* Hover en fotos */
.detalle-fotos img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    filter: brightness(1.1);
}

/* Animación de entrada */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modal slider */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    /* Por encima del header (z-index 1000) */
}

.modal-content {
    position: relative;
    display: flex;
    align-items: center;
}

.modal img {
    width: auto;
    height: 80vh;
    aspect-ratio: 4 / 3;
    object-fit: contain;
    background-color: #000;
}

.modal .cerrar {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: #fff;
    cursor: pointer;
    z-index: 2100;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50%;
    transition: background 0.2s;
}

.modal .cerrar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal button {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: transparent !important;
    color: #ffffff !important;
    border: none !important;
    width: 30px !important;
    height: 180px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.25s ease !important;
    z-index: 1000 !important;
    opacity: 0.8 !important;
    box-shadow: none !important;
    padding: 0 !important;
}

.modal button svg {
    width: 24px !important;
    height: 24px !important;
    stroke-width: 8 !important;
    stroke: #ffffff !important;
    filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.8)) !important;
    pointer-events: none !important;
}

.modal .prev {
    left: 0 !important;
}

.modal .next {
    right: 0 !important;
}

.modal button:hover {
    background: transparent !important;
    opacity: 1 !important;
    transform: translateY(-50%) scale(1.15) !important;
    box-shadow: none !important;
}

/* Media queries */
@media (max-width: 768px) {
    nav ul {
        display: none;
        flex-direction: column;
        background: #00205B;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        padding: 10px;
    }

    nav ul.show {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .detalle-fotos {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        height: auto;
        grid-template-areas:
            "principal"
            "secundaria1"
            "secundaria2";
    }
}