/* ── VARIABLES ─────────────────────────────────────────────────── */
:root {
    --brand-red:  #771a1c;
    --brand-bg:   #fbd5b2;
    --text-dark:  #2b2320;
    --text-mid:   #5c534d;
    --text-light: #9c8f86;
    --border:     #ece2d8;
    --white:      #ffffff;
    --radius-sm:  8px;
    --radius-md:  12px;
    --radius-lg:  18px;
}

/* ── BREADCRUMB ────────────────────────────────────────────────── */
.breadcrumb {
    max-width: 1100px;
    margin: 0 auto;
    padding: 28px 24px;
}

.breadcrumb ol {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-light);
}

.breadcrumb li + li::before {
    content: '/';
    margin-right: 4px;
    color: var(--text-light);
}

.breadcrumb a {
    color: var(--text-mid);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--brand-red);
    text-decoration: underline;
}

.breadcrumb li[aria-current="page"] {
    color: var(--brand-red);
    font-weight: 500;
}

@media (max-width: 767px) {
    .breadcrumb {
        padding: 20px 16px 12px;
    }

    .breadcrumb ol {
        font-size: 12px;
    }
}

/* ── LAYOUT GENERAL ────────────────────────────────────────────── */
.listing-main {
    padding-bottom: 0;
}

.listing-section {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 24px 0;
}

/* ── GALERÍA DESKTOP ───────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 8px;
    height: 480px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-photo {
    overflow: hidden;
    position: relative;
}

.gallery-photo--main {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
    cursor: pointer;
}

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

.gallery-btn-all {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: #771a1c;
    color: #fbd5b2;
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'MontserratCustom', sans-serif;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.gallery-btn-all:hover {
    background-color: #5c1416;
    transform: translateY(-2px);
}

/* ── GALERÍA MOBILE (carrusel) ─────────────────────────────────── */
.gallery-carousel {
    display: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 8px;
    padding: 16px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.gallery-carousel::-webkit-scrollbar {
    display: none;
}

.gallery-carousel__item {
    flex-shrink: 0;
    width: 100%;
    height: 260px;
    border-radius: var(--radius-md);
    overflow: hidden;
    scroll-snap-align: start;
}

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

/* ── CUERPO: CONTENIDO + SIDEBAR ───────────────────────────────── */
.listing-body {
    display: flex;
    gap: 48px;
    align-items: flex-start;
    padding-top: 32px;
    padding-bottom: 48px;
}

.listing-content {
    flex: 1;
    min-width: 0;
}

/* ── ENCABEZADO ────────────────────────────────────────────────── */
.listing-header {
    margin-bottom: 0;
}

.listing-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
    margin: 0 0 8px;
}

.listing-location svg {
    flex-shrink: 0;
    color: var(--brand-red);
}

.listing-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 400;
    color: var(--brand-red);
    margin: 0 0 16px;
    line-height: 1.15;
}

.listing-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.listing-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-mid);
}

.listing-stat svg {
    color: var(--brand-red);
    flex-shrink: 0;
}

/* ── SEPARADOR ─────────────────────────────────────────────────── */
.listing-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* ── DESCRIPCIÓN ───────────────────────────────────────────────── */
.listing-description p {
    font-size: 15px;
    color: var(--text-mid);
    line-height: 1.7;
    margin: 0 0 12px;
}

.listing-description p:last-child {
    margin-bottom: 0;
}

/* ── TÍTULO DE SECCIÓN ─────────────────────────────────────────── */
.listing-section-title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--brand-red);
    margin: 0 0 20px;
}

/* ── AMENITIES ─────────────────────────────────────────────────── */
.amenities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 24px;
}

.amenity {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-dark);
}

.amenity svg {
    color: var(--brand-red);
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    padding: 8px;
    box-sizing: content-box;
    background: var(--brand-bg);
    border-radius: 10px;
}

/* ── TAGS ──────────────────────────────────────────────────────── */
.listing-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.listing-tag {
    background: var(--brand-bg);
    color: var(--brand-red);
    font-size: 13px;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 999px;
}

/* ── MAPA ──────────────────────────────────────────────────────── */
.listing-map-address {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 12px;
}

.map-embed {
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 260px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

/* ── SIDEBAR ───────────────────────────────────────────────────── */
.listing-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.contact-card {
    position: sticky;
    top: 110px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    padding: 24px;
}

.contact-card__title {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
    font-weight: 400;
    color: var(--brand-red);
    margin: 0 0 4px;
}

.contact-card__subtitle {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 20px;
}

/* ── BOTONES ───────────────────────────────────────────────────── */
.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: #25D366;
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: background 0.2s;
    margin-bottom: 10px;
    box-sizing: border-box;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    color: var(--white);
    text-decoration: none;
}

.btn-whatsapp--full {
    flex: 1;
    margin-bottom: 0;
}

.btn-email {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border: 1px solid var(--border);
    color: var(--text-mid);
    font-size: 14px;
    font-weight: 500;
    padding: 13px 16px;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
    box-sizing: border-box;
}

.btn-email:hover {
    border-color: #6b7280;
    color: var(--text-dark);
    text-decoration: none;
}

/* ── HIGHLIGHTS ────────────────────────────────────────────────── */
.contact-divider {
    border: none;
    border-top: 1px solid var(--brand-red);
    margin: 16px 0;
}

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

.highlights li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-mid);
}

.highlights li svg {
    flex-shrink: 0;
}

/* ── CTA FLOTANTE MOBILE ───────────────────────────────────────── */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 12px 16px;
    gap: 12px;
    z-index: 40;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
}

.mobile-cta--hidden {
    transform: translateY(110%);
}

/* ── LIGHTBOX ──────────────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.lightbox-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-family: 'MontserratCustom', sans-serif;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: white;
    font-size: 48px;
    line-height: 1;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
    margin: 0;
    white-space: nowrap;
}

/* ── RESPONSIVE ────────────────────────────────────────────────── */
@media (max-width: 1023px) {
    .listing-sidebar {
        display: none;
    }

    .mobile-cta {
        display: flex;
    }

    .listing-main {
        padding-bottom: 72px;
    }
}

@media (max-width: 767px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 28px;
        padding: 8px 14px;
    }

    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }

    .gallery-section {
        display: none;
    }

    .gallery-carousel {
        display: flex;
        padding: 6px 0 0;
    }

    .gallery-carousel__item {
        border-radius: 0;
    }

    .listing-section {
        padding-left: 16px;
        padding-right: 16px;
    }

    .listing-body {
        padding-top: 12px;
        padding-bottom: 24px;
    }

    .listing-title {
        font-size: 22px;
    }

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

@media (max-width: 480px) {
    .listing-stats {
        gap: 6px 16px;
    }
}
