.ad-details-page {
    min-height: 100vh;
    padding: 50px 0;
    background:
        radial-gradient(circle at top right, rgba(3, 87, 129, 0.12), transparent 34%),
        linear-gradient(180deg, #f5f8fb 0%, #ffffff 100%);
    direction: rtl;
}

.ad-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 28px;
    align-items: start;
}

.ad-details-main {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.ad-details-card {
    overflow: hidden;
    border: 1px solid #e8eef4;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.ad-gallery-card {
    position: relative;
}

.ad-gallery-img {
    width: 100%;
    height: 500px;
    display: block;
    object-fit: cover;
    background: #f1f5f9;
}

.ad-carousel-btn {
    width: 52px;
    height: 52px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 18px;
    border-radius: 50%;
    background: rgba(17, 24, 39, 0.5);
    opacity: 1;
}

.ad-carousel-btn span {
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
}

.ad-gallery-count {
    position: absolute;
    left: 20px;
    bottom: 20px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.72);
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.ad-details-tabs {
    position: sticky;
    top: 90px;
    z-index: 20;
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 12px;
    border: 1px solid #e8eef4;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.07);
    backdrop-filter: blur(10px);
}

.ad-tab-link {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 13px;
    color: #475569;
    background: #f8fafc;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: 0.25s ease;
}

.ad-tab-link:hover,
.ad-tab-link.active {
    background: linear-gradient(135deg, #035781, #1597bd) !important;
    color: #ffffff !important;
    border-color: transparent;
    box-shadow: 0 10px 24px rgba(3, 87, 129, 0.28);
}

.ad-section-item {
    padding: 28px;
    scroll-margin-top: 130px;
}

.ad-section-header {
    margin-bottom: 22px;
}

.ad-section-header span {
    display: inline-flex;
    margin-bottom: 8px;
    color: #035781;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.ad-section-header h1,
.ad-section-header h2 {
    margin: 0;
    color: #111827;
    font-size: 28px;
    font-weight: 900;
    line-height: 1.4;
}

.ad-rating-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 18px;
}

.ad-rating-row img {
    width: 20px;
    height: 20px;
}

.ad-description-text {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.9;
}

.ad-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ad-info-box {
    padding: 20px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.ad-info-box span {
    display: block;
    margin-bottom: 8px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.ad-info-box strong {
    color: #111827;
    font-size: 18px;
    font-weight: 900;
}

.ad-amenities-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ad-amenity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 70px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.ad-amenity-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #035781;
    background: #e6f3f8;
}

.ad-amenity-icon svg {
    width: 24px;
    height: 24px;
}

.ad-amenity-item span {
    color: #111827;
    font-size: 14px;
    font-weight: 800;
}

.ad-muted-text {
    grid-column: 1 / -1;
    margin: 0;
    color: #64748b;
    font-size: 15px;
}

.ad-location-text {
    margin: -8px 0 18px;
    color: #475569;
    font-size: 16px;
    font-weight: 700;
}

.ad-map-wrapper {
    overflow: hidden;
    height: 360px;
    border-radius: 22px;
    border: 1px solid #e8eef4;
    background: #f1f5f9;
}

#map {
    width: 100%;
    height: 100%;
}

.ad-owner-sidebar {
    position: sticky;
    top: 95px;
    min-width: 0;
}

.ad-owner-card {
    padding: 26px;
    border: 1px solid #e8eef4;
    border-radius: 26px;
    background: #ffffff;
    box-shadow: 0 16px 50px rgba(15, 23, 42, 0.08);
}

.ad-owner-profile {
    text-align: center;
    padding-bottom: 22px;
    border-bottom: 1px solid #eef2f6;
}

.ad-owner-img {
    width: 112px;
    height: 112px;
    display: block;
    margin: 0 auto 14px;
    border-radius: 50%;
    object-fit: cover;
    border: 6px solid #eef6fa;
}

.ad-owner-profile h3 {
    margin: 0;
    color: #111827;
    font-size: 21px;
    font-weight: 900;
}

.ad-owner-profile p {
    margin: 7px 0 0;
    color: #64748b;
    font-size: 14px;
    font-weight: 700;
}

.ad-message-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 22px 0;
    border-radius: 15px;
    background: #035781;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    transition: 0.25s ease;
}

.ad-message-btn:hover {
    background: #024869;
    color: #ffffff;
    transform: translateY(-2px);
}

.ad-owner-info-list {
    display: grid;
    gap: 12px;
}

.ad-owner-info-item {
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #eef2f6;
}

.ad-owner-info-item span {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
}

.ad-owner-info-item strong {
    color: #111827;
    font-size: 15px;
    font-weight: 900;
}

.ad-owner-lifestyle {
    margin-top: 20px;
}

.ad-owner-lifestyle h4 {
    margin: 0 0 12px;
    color: #111827;
    font-size: 17px;
    font-weight: 900;
}

.ad-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ad-tags span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eef6fa;
    color: #035781;
    font-size: 13px;
    font-weight: 800;
}

.ad-zoom-wrapper {
    overflow: auto;
    max-height: 90vh;
    text-align: center;
}

.ad-modal-img {
    max-width: 100%;
    transition: transform 0.2s ease;
    background-color: #ffffff;
    cursor: zoom-in;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

@media (max-width: 1199px) {
    .ad-details-layout {
        grid-template-columns: 1fr;
    }

    .ad-owner-sidebar {
        position: static;
        order: -1;
    }

    .ad-owner-card {
        display: grid;
        grid-template-columns: 220px 1fr;
        gap: 22px;
        align-items: center;
    }

    .ad-owner-profile {
        padding-bottom: 0;
        border-bottom: 0;
        border-left: 1px solid #eef2f6;
        padding-left: 22px;
    }

    .ad-message-btn {
        margin: 0;
    }
}

@media (max-width: 767px) {
    .ad-details-page {
        padding: 28px 0;
    }

    .ad-gallery-img {
        height: 320px;
    }

    .ad-section-item {
        padding: 22px 18px;
    }

    .ad-section-header h1,
    .ad-section-header h2 {
        font-size: 23px;
    }

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

    .ad-details-tabs {
        top: 74px;
    }

    .ad-owner-card {
        display: block;
        padding: 22px 18px;
    }

    .ad-owner-profile {
        border-left: 0;
        padding-left: 0;
        padding-bottom: 20px;
        border-bottom: 1px solid #eef2f6;
    }

    .ad-message-btn {
        margin: 20px 0;
    }

    .ad-map-wrapper {
        height: 280px;
    }
} 