/* ==========================================================================
   BanaBulBi Original Listing Detail Page Layout (Global Edition)
   ========================================================================== */

.detail-container {
    padding-top: 12px;
    padding-bottom: 40px;
}

.detail-breadcrumb {
    font-size: 0.82rem;
    margin-bottom: 8px;
}

.detail-breadcrumb a {
    color: var(--bbb-primary);
    text-decoration: none;
}

.detail-breadcrumb a:hover {
    text-decoration: underline;
}

/* Title row */
.detail-top {
    padding: 4px 0 10px 0;
    margin-bottom: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.detail-top h1 {
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #243b5e;
    margin: 0;
    line-height: 1.3;
}

.detail-top-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: #6c7a91;
}

/* Main two-column flex layout */
.detail-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.detail-left-col {
    width: 100%;
    min-width: 0;
}

.detail-right-col {
    width: 100%;
    min-width: 0;
}

@media (min-width: 1200px) {
    .detail-layout {
        flex-direction: row;
        align-items: flex-start;
    }

    .detail-left-col {
        flex: 1 1 885px;
        max-width: 885px;
    }

    .detail-right-col {
        flex: 0 0 320px;
        width: 320px;
        position: sticky;
        top: 78px;
    }
}

/* Gallery + Quick Specs Card (original .detail-body) */
.detail-body {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #fff;
    border: 1px solid #e6ebf2;
    border-radius: 6px;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(24, 69, 139, 0.05);
}

@media (min-width: 1200px) {
    .detail-body {
        flex-direction: row;
        align-items: stretch;
        gap: 15px;
    }
}

/* Original Floating Left Action Column — OUTSIDE the gallery card on the left */
.fixed-scroll-column {
    width: 50px;
    position: absolute;
    left: -58px;
    top: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (max-width: 1399.98px) {
    /* On narrower desktop viewports where container has less outer gutter, keep it flush without overlapping the image */
    .detail-container {
        padding-left: 62px;
    }
}

@media (max-width: 1199.98px) {
    .detail-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .fixed-scroll-column {
        display: none !important;
    }
}

/* Original .fc-button (50x50 square white button in fixed-scroll-column) */
.fc-button {
    width: 50px;
    height: 50px;
    position: relative;
    background: #fff;
    border: 1px solid #e8edf5;
    box-shadow: 0 2px 8px rgba(24, 69, 139, 0.08);
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: var(--bbb-secondary);
    font-size: 16px;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.fc-button:hover {
    background: #f5f9ff;
    color: var(--bbb-accent);
    border-color: var(--bbb-secondary);
}

.fc-button.is-favorited {
    color: #e74c3c;
}

.fc-button[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #18458B;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
    z-index: 40;
}

.fc-button[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Left gallery column inside detail-body */
.detail-image {
    position: relative;
    width: 100%;
    min-width: 0;
}

@media (min-width: 1200px) {
    .detail-image {
        flex: 0 0 528px;
        max-width: 528px;
    }
}

/* Top bar above image: Location left, Price + Price History right */
.top-detail {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 4px 2px 8px 2px;
    border-bottom: 1px solid #f0f3f8;
    margin-bottom: 8px;
}

.top-detail .location {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--bbb-secondary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.top-detail .price-box {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.top-detail .price {
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #F8BB11;
    line-height: 1.1;
}

.top-detail .price-old {
    font-size: 13px;
    color: #b7afaf;
    text-decoration: line-through;
    font-weight: 600;
}

.top-detail .price-campaign {
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: #F8BB11;
}

.top-detail .btn-price-history {
    border: 1px solid #d9e4f5;
    background: #f5f9ff;
    color: var(--bbb-primary);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.top-detail .btn-price-history:hover {
    background: var(--bbb-primary);
    color: #fff;
}

/* Swiper Main & Thumbnail Gallery (clean — no floating icons over the photo!) */
.detail-gallery-wrap {
    position: relative;
}

.detail-main-swiper {
    width: 100%;
    height: 360px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f4fa;
}

@media (max-width: 575.98px) {
    .detail-main-swiper {
        height: 255px;
    }
}

.detail-main-swiper .swiper-slide a {
    display: block;
    width: 100%;
    height: 100%;
}

.detail-main-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-main-swiper .swiper-button-next,
.detail-main-swiper .swiper-button-prev {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(24, 69, 139, 0.72);
    color: #fff;
}

.detail-main-swiper .swiper-button-next::after,
.detail-main-swiper .swiper-button-prev::after {
    font-size: 14px;
    font-weight: 700;
}

.gallery-counter-badge {
    position: absolute;
    right: 10px;
    bottom: 10px;
    z-index: 10;
    background: rgba(24, 38, 66, 0.78);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    pointer-events: none;
}

.detail-thumb-swiper {
    margin-top: 8px;
    height: 68px;
}

.detail-thumb-swiper .swiper-slide {
    opacity: 0.55;
    cursor: pointer;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: opacity 0.2s ease, border-color 0.2s ease;
}

.detail-thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
    border-color: var(--bbb-secondary);
}

.detail-thumb-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Right-of-gallery specs list (Desktop) */
.detail-infos {
    display: none;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
}

@media (min-width: 1200px) {
    .detail-infos {
        display: flex;
    }
}

.detail-infos ul,
.detail-tab-infos ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.detail-infos ul {
    max-height: 440px;
    overflow-y: auto;
    padding-right: 6px;
}

.detail-infos ul::-webkit-scrollbar {
    width: 6px;
}

.detail-infos ul::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 3px;
}

.detail-infos ul::-webkit-scrollbar-thumb {
    background: var(--bbb-secondary);
    border-radius: 3px;
}

.detail-infos li,
.detail-tab-infos li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 27px;
    padding: 4px 8px;
    border-bottom: 1px solid #ededed;
    font-size: 13px;
}

.detail-tab-infos li:nth-child(odd) {
    background-color: #f9f9f9;
}

.detail-infos li .prop-title,
.detail-tab-infos li .prop-title {
    color: #666;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    flex: 0 0 auto;
}

.detail-infos li .prop-value,
.detail-tab-infos li .prop-value {
    color: #878C9F;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    text-align: right;
    word-break: break-word;
}

/* BiKampanya Countdown Box */
.box-count-square {
    margin-top: 10px;
    padding: 10px 8px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f0f9f2 0%, #e7f5eb 100%);
    border: 1px solid #c6e8cf;
    text-align: center;
}

.box-count-square .countdown-title {
    font-size: 12px;
    font-weight: 700;
    color: #207933;
    margin-bottom: 6px;
}

.deals-countdown {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.deals-countdown .countdown-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 48px;
    padding: 4px 6px;
    background: #fff;
    border: 1px solid #cfe7d5;
    border-radius: 6px;
}

.deals-countdown .countdown-amount {
    font-size: 15px;
    font-weight: 800;
    color: #1c7c32;
    line-height: 1.1;
}

.deals-countdown .countdown-period {
    font-size: 10px;
    font-weight: 700;
    color: #6c7a91;
    text-transform: uppercase;
}

/* Original Sky-Blue Tab Bar (detail-main) */
.detail-main {
    margin-top: 15px;
}

.detail-tab-container {
    background: #fff;
    border: 1px solid #e6ebf2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.detail-tab-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    background-color: var(--bbb-secondary);
    padding: 0 8px;
    gap: 4px;
}

.detail-tab-button {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, border-color 0.2s ease, background-color 0.15s ease;
}

.detail-tab-button:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.detail-tab-button.active {
    color: #fff;
    border-bottom-color: var(--bbb-warning);
}

.detail-tab-content {
    padding: 16px;
}

.detail-tab-pane {
    display: none;
}

.detail-tab-pane.active {
    display: block;
}

.detail-description {
    font-size: 14.5px;
    line-height: 1.7;
    color: #2f3b52;
    word-break: break-word;
}

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

/* Amenities / Extra Features Checkmark Cards (original .detail-amenities) */
.detail-amenities {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-amenities .card {
    border: 0;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: visible;
}

.detail-amenities .card-header {
    background-color: var(--bbb-secondary);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    padding: 10px 14px;
    border-radius: 0;
    font-size: 14px;
    font-weight: 700;
}

.detail-amenities .card-title {
    color: #fff;
    margin: 0;
    font-size: 14.5px;
    font-weight: 700;
}

.listing-features ul {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
}

.listing-features li {
    width: 33.333%;
    text-align: left;
    margin-bottom: 12px;
    font-size: 13px;
    color: #4b5275;
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-weight: 600;
    position: relative;
    padding-left: 22px;
    padding-right: 8px;
}

.listing-features li::before {
    content: "\F26E"; /* Bootstrap Icons bi-check-lg */
    font-family: "bootstrap-icons";
    font-weight: 700;
    position: absolute;
    left: 0;
    top: -1px;
    font-size: 15px;
    color: #28a745;
}

@media (max-width: 767.98px) {
    .listing-features li {
        width: 50%;
    }
}

/* Desktop Right Sidebar: Owner Card (original .detail-owner) */
.detail-owner {
    display: none;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6ebf2;
    padding: 10px;
    min-height: 290px;
    box-shadow: 0 2px 10px rgba(24, 69, 139, 0.06);
    margin-bottom: 14px;
}

@media (min-width: 1200px) {
    .detail-owner {
        display: flex;
    }
}

.owner-company-name {
    text-align: center;
    margin: 0 auto;
    border-bottom: 1px solid #ededed;
    width: 100%;
    padding-bottom: 8px;
}

.owner-company-name h5 {
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--bbb-primary);
    margin-bottom: 2px;
}

.owner-company-name a {
    color: var(--bbb-primary);
    text-decoration: none;
}

.owner-company-name a:hover {
    color: var(--bbb-secondary);
}

.owner-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid #ededed;
    padding-bottom: 12px;
}

.owner-images {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    margin: 16px 0 10px 0;
}

.owner-images img {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border: 1px solid #ededed;
    border-radius: 10px;
    background: #f8fafd;
}

.owner-agent-name {
    color: var(--bbb-primary);
    text-align: center;
    font-weight: 700;
    font-size: 14px;
}

/* Original .owner-tools (Sky-blue bottom strip with 25x25 white square .fc-button icons — used in BOTH desktop and mobile!) */
.owner-tools {
    display: flex;
    margin-top: auto;
    justify-content: center;
    align-items: center;
    min-height: 38px;
    background-color: var(--bbb-secondary);
    padding: 4px 6px;
}

.owner-tools .button-tool {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.owner-tools .fc-tool-btn {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    background: #fff;
    border: 1px solid #f0f1f3;
    color: var(--bbb-secondary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.12s ease;
}

.owner-tools .fc-tool-btn:hover {
    background: #fff8f0;
    color: #F97316;
    transform: translateY(-1px);
}

.owner-tools .fc-tool-btn.is-favorited {
    color: #e74c3c;
}

/* Sticky Scroll Header Bar (#scrollDiv) */
.detail-sticky-tool {
    position: fixed;
    top: -100px;
    left: 0;
    right: 0;
    z-index: 1035;
    background: #fff;
    border-bottom: 2px solid var(--bbb-secondary);
    box-shadow: 0 4px 16px rgba(24, 69, 139, 0.12);
    padding: 6px 14px;
    transition: top 0.35s ease;
}

.detail-sticky-tool.show {
    top: 0;
}

.sticky-detail {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sticky-detail .title {
    font-size: 13.5px;
    font-weight: 700;
    color: #566985;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
}

.sticky-detail-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.sticky-detail-loc {
    font-size: 11.5px;
    color: var(--bbb-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sticky-detail-price {
    font-family: 'DM Sans', 'Nunito', sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: #F8BB11;
    white-space: nowrap;
}

/* ==========================================================================
   Original Mobile Fixed Bottom Owner Area (.detail-owner-mobile)
   Matches original _DetayOwnerInfo.cshtml & emlakdetail.css
   ========================================================================== */
.detail-owner-mobile {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background-color: var(--bbb-primary);
    padding: 5px;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.22);
    width: 100%;
}

@media (min-width: 1200px) {
    .detail-owner-mobile {
        display: none;
    }
}

.detail-owner-mobile .owner-company-name-mobile {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 8px 6px 8px;
}

.detail-owner-mobile .images {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.detail-owner-mobile .images img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid #ededed;
    border-radius: 10px;
    background: #fff;
}

.detail-owner-mobile .names {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
    min-width: 0;
    padding-left: 10px;
}

.detail-owner-mobile .names h5 {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

.detail-owner-mobile .names a {
    color: #fff;
    text-decoration: none;
}

.detail-owner-mobile .names span {
    color: orange;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Original Share Modal (_ShareModal.cshtml exact design) */
.bbb-share-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.bbb-share-backdrop.show {
    display: flex;
}

.bbb-share-dialog {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
}

.bbb-share-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid #f0f0f0;
}

.bbb-share-title {
    font-weight: 700;
    font-size: 16px;
    color: #243b5e;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bbb-share-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 22px;
    color: #aaa;
    line-height: 1;
}

.bbb-share-url-row {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bbb-share-url-text {
    font-size: 13px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.bbb-share-copy-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.bbb-share-copy-btn:hover {
    border-color: #F97316;
    color: #F97316;
}

.bbb-share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
}

.share-modal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px 10px;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.1s;
}

.share-modal-btn i {
    color: #F97316;
    font-size: 22px;
}

.share-modal-btn span {
    font-size: 11px;
    color: #666;
    text-align: center;
}

.share-modal-btn:hover {
    border-color: #F97316;
    background: #fff8f4;
    transform: translateY(-1px);
}

.share-modal-btn:active {
    transform: scale(0.97);
}

@media (max-width: 1199.98px) {
    .detail-container {
        padding-bottom: 135px; /* room for 2-row fixed mobile owner bar */
    }

    .detail-top h1 {
        font-size: 1rem;
    }

    .top-detail .location {
        font-size: 0.85rem;
    }

    .top-detail .price,
    .top-detail .price-campaign {
        font-size: 1.15rem;
    }
}
