/* Map Details Page - Luxury design (aligned with About Us) */

/* Prevent horizontal overflow */
.bs-map {
    overflow-x: hidden;
}

/* Show breadcrumb on map page (aboutus.css hides .breadcrumb) */
.bs-map-breadcrumb {
    display: block !important;
}

/* Inherit luxury vars from aboutus */
.bs-map {
    --bs-ink: #0b1220;
    --bs-muted: rgba(11,18,32,.72);
    --bs-border: rgba(15, 23, 42, .12);
    --bs-card: rgba(255,255,255,.92);
    --bs-shadow: 0 18px 55px rgba(2, 6, 23, .12);
    --bs-gold: #d6b15f;
    --bs-gold-2: #b8892f;
}

#related__properties .owl-stage-outer ~ .owl-nav button svg{
    width: 16px;
    height: 16px;
}

/* Hide Froala/embed branding */
.bs-map p[data-f-id="pbf"],
p[data-f-id="pbf"] {
    display: none !important;
}

/* Hero - map specific: text left, slider in half (right) for luxury look */
.bs-map__hero .bs-map__heroGrid {
    display: grid;
    grid-template-columns: 1fr minmax(320px, 1fr);
    gap: clamp(24px, 4vw, 56px);
    align-items: center;
}

.bs-map__hero .bs-about__heroMedia {
    max-width: 100%;
    /* min-width: 320px; */
    justify-self: end;
}

@media (max-width: 900px) {
    .bs-map__hero .bs-about__heroMedia {
        max-width: 100%;
        min-width: 0;
        justify-self: stretch;
    }

    .bs-map__frame--slider,
    .bs-map__heroSlider.owl-carousel {
        min-width: 0;
    }
}

.bs-map__hero .bs-gold-accent {
    color: #fff;
    font-weight: 600;
}

.bs-map__frame {
    position: relative;
}

/* Hero slider at top - single image per slide, no crop */
.bs-map__frame--slider {
    overflow: hidden;
    border-radius: 12px;
    width: 100%;
    min-width: 300px;
}

.bs-map__heroSlider.owl-carousel {
    position: relative;
    z-index: 0;
    width: 100%;
    min-width: 280px;
}

.bs-map__heroSlider .owl-stage-outer {
    overflow: hidden;
    width: 100%;
    min-width: 0;
}

.bs-map__heroSlider .owl-item {
    min-height: 240px;
}

/* Ensure one full slide visible - owl sets item width via JS; constrain image to fit */
.bs-map__heroSlider .owl-item .item {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.bs-map__heroSlider .owl-item .item img.main__map__image {
    max-width: 100%;
    margin: 0 auto;
}

.bs-map__heroSlider .item {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(11, 18, 32, .06);
    min-height: 240px;
}

.bs-map__frame .main__map__image,
.bs-map__heroSlider .main__map__image {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.bs-map__heroSlider .owl-nav button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #0b1220 !important;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.bs-map__heroSlider .owl-nav button:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #05379a !important;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 1;
}

.bs-map__heroSlider .owl-nav button:active {
    transform: translateY(-50%) scale(0.95);
}

.bs-map__heroSlider .owl-nav button svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.bs-map__heroSlider .owl-nav button.owl-prev {
    left: 16px;
}

.bs-map__heroSlider .owl-nav button.owl-next {
    right: 16px;
}

/* Hide arrows when disabled (only one slide) */
.bs-map__heroSlider .owl-nav button.disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.bs-map__heroSlider .owl-dots {
    position: absolute;
    bottom: 12px;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.bs-map__heroSlider .owl-dots .owl-dot span {
    background: rgba(255,255,255,.5);
    width: 8px;
    height: 8px;
}

.bs-map__heroSlider .owl-dots .owl-dot.active span,
.bs-map__heroSlider .owl-dots .owl-dot:hover span {
    background: #fff;
}

.bs-map__viewLarge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(11, 18, 32, .75);
    color: #fff;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, transform .15s;
    pointer-events: auto;
}

.bs-map__viewLarge:hover {
    background: rgba(11, 18, 32, .9);
    transform: translateY(-1px);
}

/* Main layout */
.bs-map__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

.bs-map__main {
    display: flex;
    flex-direction: column;
    gap: 32px;
    min-width: 0;
}

.bs-map__block {
    margin-bottom: 0;
}

.bs-map__about .bs-map__location {
    font-size: 14px;
    color: var(--bs-muted);
    margin-bottom: 12px;
}

.bs-map__details p,
.bs-map__details li {
    font-size: 14px;
    color: var(--bs-muted);
    line-height: 1.75;
}

.bs-map__details ul {
    padding-left: 20px;
}

/* Average Price block */
.bs-map__price {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: linear-gradient(135deg, rgba(5, 55, 154, .06) 0%, rgba(255,255,255,.98) 50%, rgba(214, 177, 95, .08) 100%);
    border: 1px solid var(--bs-border);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(2, 6, 23, .05);
}

.bs-map__priceIcon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(5, 55, 154, .12) 0%, rgba(5, 55, 154, .06) 100%);
    border: 1px solid rgba(5, 55, 154, .2);
    color: #05379a;
}

.bs-map__priceContent {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.bs-map__priceLabel {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-muted);
    letter-spacing: 0.02em;
}

.bs-map__priceValue {
    font-size: 20px;
    font-weight: 700;
    color: var(--bs-ink);
}

.bs-map__priceValue small {
    font-size: 13px;
    font-weight: 500;
    color: var(--bs-muted);
}

/* CTA banner - app download block */
.bs-map__cta {
    background: linear-gradient(135deg, rgba(214, 177, 95, .14) 0%, rgba(255,255,255,.98) 40%, rgba(37, 99, 235, .08) 100%) !important;
    border: 1px solid var(--bs-border) !important;
    padding: 12px 16px !important;
    border-radius: 6px !important;
    box-shadow: 0 4px 24px rgba(2, 6, 23, .06) !important;
}

.bs-map__cta p {
    color: var(--bs-ink) !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin: 0 !important;
}

.bs-map__cta strong {
    color: var(--bs-ink) !important;
    font-weight: 650 !important;
}

.bs-map__appLinks {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.bs-map__appLinks a {
    transition: transform .15s ease;
}

.bs-map__appLinks a:hover {
    transform: translateY(-2px);
}

.bs-map__appLinks a img {
    height: 52px;
    width: auto;
    display: block;
}

/* Insights grid */
.bs-map__insights {
    grid-template-columns: repeat(2, 1fr);
}

.bs-map__insightContent p,
.bs-map__insightContent li {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--bs-muted);
    line-height: 1.6;
}

/* .bs-map__insightContent ul {
    padding-left: 18px;
} */

/* Sidebar */
.bs-map__sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bs-map__list {
    list-style: none;
    padding: 16px 18px;
    margin: 0 0 16px;
    background: rgba(214, 177, 95, .08);
    border-radius: 12px;
}

.bs-map__list li {
    position: relative;
    padding-left: 26px;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--bs-ink);
    line-height: 1.6;
}

.bs-map__list li:last-child {
    margin-bottom: 0;
}

.bs-map__list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 16px;
    height: 16px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2305397a' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") no-repeat center;
}

.bs-map__card .bs-btn {
    width: 100%;
    justify-content: center;
    padding: 10px 16px;
}
.bs-map__sidebar .bs-btn{
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-block: 0;
    width: max-content;
    font-size: 12px;
    border-radius: 6px;
}

.bs-map__loans .bs-map__loansLabel {
    font-size: 12px;
    font-weight: 600;
    color: var(--bs-muted);
    margin-bottom: 12px;
    text-align: right;
}

.bs-map__offer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--bs-border);
}

.bs-map__offer:last-of-type {
    border-bottom: none;
}

.bs-map__offer img {
    max-width: 50px;
    height: auto;
}

.bs-map__offer span {
    font-weight: 600;
    color: var(--bs-ink);
}

/* Property cards - use .properties__cities__section from main.css (same as homepage) */

.bs-map .properties__cities__section {
    overflow: hidden;
    max-width: 100%;
}

#related__properties {
    position: relative;
    max-width: 100%;
}

#related__properties .owl-stage{
    padding-bottom: 20px;
}

/* Owl carousel nav */
#related__properties .owl-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,.12);
    cursor: pointer;
}

#related__properties .owl-nav button.owl-next { right: 8px; }
#related__properties .owl-nav button.owl-prev { left: 8px; }

/* Modal */
.modal__wrapper {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.modal__wrapper.show { display: block; }

.modal__wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
}

.modal__wrapper .close__modal {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 50%;
    z-index: 10001;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal__wrapper .close__modal:hover { background: rgba(0, 0, 0, 0.85); }

.modal__wrapper .close__modal path { stroke: #fff; }

/* Responsive */
@media (max-width: 980px) {
    .bs-map__heroGrid {
        grid-template-columns: 1fr !important;
    }

    .bs-map__hero .bs-about__heroMedia {
        order: -1;
    }

    .bs-map__grid {
        grid-template-columns: 1fr;
    }

    .bs-map__sidebar {
        position: static;
    }

    .bs-map__insights {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .bs-map__appLinks {
        flex-direction: column;
    }

    .bs-map__appLinks a img {
        height: 40px;
    }
}
