/* ==================== ROOT VARIABLES ==================== */
:root {
    --hero-left: #8B4513;
    --hero-right: #F4E4BC;
    --brand: #6F1D1B;
    --brand-2: #A05A2C;
    --accent: #99582A;
    --card-shadow: 0 4px 20px rgba(0,0,0,.08);
    --input-bg: #F4F4F4;
    --text: #2c2c2c;
    --muted: #777;
    --radius-lg: 18px;
    --radius-md: 12px;
}

html {
    font-size: 16px;
}

body {
    background: #fff;
}

@media (min-width: 1900px) {
    html {
        font-size: 19px;
    }

    .container {
        max-width: 1680px;
    }
}

@media (min-width: 1600px) {
    html {
        font-size: 18px;
    }

    .container {
        max-width: 1560px;
        width: unset;
    }
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    background: linear-gradient(270deg, var(--hero-left) 0%, var(--hero-right) 100%);
    padding: 120px 0 120px;
    text-align: center;
    position: relative;
}

/* Flip gradient in RTL */
[dir="rtl"] .hero-section {
    background: linear-gradient(90deg, var(--hero-left) 0%, var(--hero-right) 100%);
}

.hero-section h1 {
    margin: 0;
    font-weight: 700;
    font-size: 40px;
    color: #5a1e1e;
    letter-spacing: 0.5px;
}

body[dir="rtl"] .hero-section h1 {
    font-size: 48px;
}

.hero-section p {
    margin: 12px 0 0 0;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,.15);
}

body[dir="rtl"] .hero-section p {
    font-size: 28px;
}

/* ==================== PROPERTY DETAILS SECTION ==================== */
.property-details-section {}
.details-shell {
    background: #fff;
    border-radius: 24px;
    padding: 36px;
    box-shadow: 0 26px 60px rgba(0,0,0,0.12);
    margin: -70px auto 32px;
    max-width: 1180px;
    position: relative;
}

/* ==================== Property details block CSS ==================== */
.header-section.section { margin-bottom: 12px; }
.image-loop-section.section { margin-bottom: 12px; }
.details-section.section { margin-bottom: 12px; }
.features-section.section { margin-bottom: 12px; }
.description-section.section { margin-bottom: 12px; }
.gallery-section.section { margin-bottom: 12px; }
.additional-details-section.section {margin-bottom: 12px;}
.location-section.section { margin-bottom: 12px; }
.company-section.section { margin-bottom: 12px; }
.price-trend-section.section { margin-bottom: 12px; }

.header-top {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.header-left {
    max-width: 78%;
}

.header-right {
    min-width: 220px;
    text-align: right; /* default LTR */
}

[dir="rtl"] .header-right {
    text-align: left !important;
}

.header-title-container {
    display: flex;
    gap: 8px;
    width: 100%;
}

@media (max-width: 1199px) {
    .header-title-container {
        flex-direction: column;
    }
}

@media (max-width: 991px) {
    .header-left {
        max-width: 100%;
        width: 100%;
    }

    .header-right {
        max-width: 100%;
        width: 100%;
    }

    #btnAddToTour {
        width: 100%;
        justify-content: center;
        padding: 0 !important;
    }
}

.property-title {
    color: var(--brand);
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    padding-bottom: 0;
    border-bottom: none;
    text-overflow: ellipsis;
}

body[dir=rtl] .property-title {
    font-size: 28px;
}

.property-tag {
    position: unset;
}

.property-tag a{
}

.property-tag .icon {
    margin: 0;
}

/*    .property-tag .icon::before {
        vertical-align: middle;
    }
*/
#btnAddToTour {
    cursor: pointer;
    background: #AD5D2A;
    border-radius: 8px;
    height: 36px;
    font-size: 12px;
}

body[dir=rtl] #btnAddToTour {
    font-size: 16px;
}

.submeta {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    width: 100%;
}

body[dir=rtl] .submeta {
    font-size: 18px;
}


/* stars */
.star-rating {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    color: #F7C948;
    font-size: 14px;
    flex-shrink: 0;
    align-content: center;
}

    .star-rating i {
        line-height: 1;
    }

.tag-list {
    margin-top: 8px;
}

.tag {
    background: #efefef;
    padding: 6px 20px;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 6px;
    display: inline-block;
}

body[dir=rtl] .tag {
    font-size: 16px;
}

.price-pill {
    background: var(--brand);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
}

body[dir=rtl] .price-pill {
    font-size: 14px;
}


/* Carousel */
.main-carousel {
    position: relative;
}

    .main-carousel .carousel-slide {
        width: 100%;
    }

        .main-carousel .carousel-slide img {
            transition: transform .35s ease;
            width: 100%;
            height: 420px;
            object-fit: cover;
            display: block;
        }

        .main-carousel .carousel-slide:hover img {
            transform: scale(1.02);
        }

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}

    .carousel-dots .dot {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        border: none;
        background: #ddd;
        cursor: pointer;
    }

        .carousel-dots .dot.active {
            background: var(--brand);
        }

/* Thumbs */
.gallery-thumbs .thumb {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

    .gallery-thumbs .thumb img {
        width: 100%;
        height: 110px;
        object-fit: cover;
        display: block;
    }

/* ---------- Carousel ---------- */
.carousel-container {
    position: relative;
    width: 100%;
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-sizing: border-box;
}

.carousel-viewport {
    overflow: hidden;
    width: 100%;
    border-radius: 14px;
    position: relative;
    flex: 1 1 auto;
}

.carousel-track {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--gap, 24px);
    transition: transform 420ms cubic-bezier(.2,.8,.2,1);
    will-change: transform;
    padding: 0;
    align-items: stretch;
    box-sizing: border-box;
}

.carousel-item {
    flex: 0 0 auto;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    display: block;
    margin-right: 0;
    min-width: 0;
    width: calc((100% - ((var(--spv, 3) - 1) * var(--gap, 24px))) / var(--spv, 3));
    box-sizing: border-box;
}

.carousel-img {
    display: block;
    width: 100%;
    height: 320px;
    object-fit: cover;
    transition: transform .25s ease;
}

.carousel-item:hover .carousel-img {
    transform: translateY(-4px) scale(1.01);
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 30;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: none;
    background: rgba(255,255,255,0.92);
    color: #222;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform .12s ease, background .12s ease;
    font-weight: 700;
}

.carousel-arrow--prev { left: 12px; }
.carousel-arrow--next { right: 12px; }

.carousel-arrow:hover {
    transform: translateY(-50%) scale(1.03);
    background: rgba(255,255,255,0.98);
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

    .carousel-dots button {
        width: 10px;
        height: 10px;
        border-radius: 10px;
        border: none;
        background: #ddd;
        cursor: pointer;
        padding: 0;
    }

        .carousel-dots button.active {
            background: var(--brand);
        }

/* Carousel breakpoints */
@media (min-width: 1200px) {
    .carousel-img { height: 320px; }
    :root { --gap: 24px; }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .carousel-img { height: 280px; }
    :root { --gap: 24px; }
}

@media (max-width: 767px) {
    .carousel-img { height: 200px; }
    .carousel-arrow { display: none; }
    :root { --gap: 16px; }
}

/* Accessibility focus */
.carousel-arrow:focus, .carousel-dots button:focus, .carousel-link:focus {
    outline: 3px solid rgba(109,36,36,0.12);
    outline-offset: 2px;
}

/* FORCE carousel internals to LTR */
#property-carousel-section .carousel-container,
#property-carousel-section .carousel-viewport,
#property-carousel-section .carousel-track {
    direction: ltr !important;
    -webkit-direction: ltr !important;
    flex-direction: row !important;
}

#property-carousel-section .carousel-arrow--prev {
    left: 12px !important;
    right: auto !important;
    inset-inline-start: 12px !important;
    inset-inline-end: auto !important;
}

#property-carousel-section .carousel-arrow--next {
    right: 12px !important;
    left: auto !important;
    inset-inline-end: 12px !important;
    inset-inline-start: auto !important;
}

#property-carousel-section .carousel-arrow {
    transform: translateY(-50%);
}

#property-carousel-section[dir="rtl"] .carousel-arrow--prev {
    right: 12px !important;
    left: auto !important;
}

#property-carousel-section[dir="rtl"] .carousel-arrow--next {
    left: 12px !important;
    right: auto !important;
}

/* Detail cards */
.property-details-single td.df-txt {
    background: var(--brand-2);
    color: #fff;
    border-radius: 16px;
    padding: 14px 20px;
    text-align: center;
    min-width: 160px;
    box-shadow: 0 4px 10px rgba(0,0,0,.06);
}

    .property-details-single td.df-txt div.details-container {
        display: inline-flex;
    }

    .property-details-single td.df-txt div.details-value {
        font-size: 14px;
    }

    body[dir=rtl] .property-details-single td.df-txt div.details-value {
        font-size: 18px;
    }

    .property-details-single td.df-txt i {
        align-content: center;
        font-size: 20px;
        margin-bottom: 6px;
        display: block;
    }

.priceBadge {
    background-color: transparent;
    font-weight: 700;
    font-size: 20px;
    margin-left: 8px;
    color: #fff;
    direction: ltr;
}

/* Section titles and boxes */
.section-title {
    color: var(--brand);
    text-align: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0;
}

body[dir=rtl] .section-title {
    font-size: 24px;
}

.description-box {
    background: #f1f1f1;
    padding: 28px;
    border-radius: 14px;
}

.description-box p {
    font-size: 14px;
}

    body[dir=rtl] .description-box p {
        font-size: 18px;
    }

.additional-details-tab-list {

}

.additional-details-tab-list li.additional-details-tab-list-item {
/*    border-bottom: 2px solid var(--brand);*/
}

    .additional-details-tab-list li.additional-details-tab-list-item a {
        font-size: 14px;
    }

    body[dir=rtl] .additional-details-tab-list li.additional-details-tab-list-item a {
        font-size: 18px;
    }


@media (max-width: 479px) {
    .additional-details-tab-list {
        flex-direction: column;
        align-items: center;
    }
}

.tabs li.ui-state-active {
    border-bottom: 2px solid var(--brand);
}

.additional-details-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

body[dir=rtl] .additional-details-list li {
    font-size: 18px;
}

.additional-details-list li span {
    align-content: center;
    font-size: 12px;
}

body[dir=rtl] .additional-details-list li span {
    font-size: 16px;
}

#tabs-2 {
    font-size: 14px;
}

body[dir=rtl] #tabs-2 {
    font-size: 18px;
}

.property-single-item {
    border-radius: 14px;
    margin-top: 16px; 
    padding: 0px; 
    background: #fff;
}

/* Amenities */
.amenities-list {
/*    display: flex;*/
/*    flex-wrap: wrap;*/
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
    justify-content: space-between;
}

@media (max-width: 1199px) {
    .amenities-list {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 991px) {
    .amenities-list {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767px) {
    .amenities-list {
        grid-template-columns: repeat(1, 1fr);
    }
}

    .amenities-list li {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        background: #fff;
        padding: 8px 4px;
        border-radius: 10px;
        min-width: 200px;
        /*    box-shadow: 0 6px 18px rgba(0,0,0,.04);*/
        text-align: left;
    }

    .amenities-list li p {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        line-height: 1.5;
        margin: 0;
    }

.features-list-item, .extra-features-list-item {
    display: flex;
    width: 100%;
}

@media (max-width: 767px) {
    .features-list-item, .extra-features-list-item {
        align-items: center;
        justify-content: center !important;
    }
}


.amenities-list li .fa {
    background: var(--brand);
    width: 24px;
    height: 24px;
}

/* Gallery */
.spotlight-group {
    margin: 0;
}


.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.gallery-grid .gallery-item { padding: 8px; }

    .gallery-grid .gallery-item img {
        width: 100%;
        height: 160px;
        object-fit: cover;
        border-radius: 8px;
        transition: transform .2s ease;
    }

    .gallery-grid .gallery-item:hover img {
        transform: translateY(-6px);
    }

#map-single { height: unset; }

/* Map */
.map-responsive iframe {
    width: 100%;
    height: 420px;
    border: 0;
    display: block;
}

/* RTL tweaks */
[dir="rtl"] .tag {
    margin-left: 6px;
    margin-right: 0;
}

/* Responsive */
@media (max-width: 991px) {
    .gallery-shell {
        flex-direction: column;
    }

    .gallery-thumbs {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .property-details-single tr {
        flex-direction: column;
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .property-details-single td.df-txt {
        min-width: 160px;
        padding: 12px 14px;
    }

    .map-responsive iframe {
        height: 300px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .header-top {
        flex-direction: column;
        gap: 12px;
    }

    .property-details-single td.df-txt {
        width: 100%;
/*        max-width: 320px;*/
    }

    .main-carousel .carousel-slide img {
        height: 260px;
    }

    .map-responsive iframe {
        height: 250px;
    }
}

/* ==================== LATEST LISTINGS SECTION ==================== */
.latest-listings-section { justify-content: center; }

.latest-listings-section .container {
    display: flex;
    justify-content: center;
}

#relatedByRegionContainer h4{
    text-align: center;
    display: none;
}

#relatedByRegionContainer {
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1400px;
    padding: 0;
    margin: 32px 0;
}

#relatedByRegion {
    display: flex;
    justify-content: center;
    padding: 0 15px;
    margin: 0 auto;
    width: unset;
    max-width: 1560px;
}

@media (max-width: 1599px) {
    #relatedByRegion {
        width: 1170px;
    }

    #relatedByRegionContainer {
        max-width: 1180px;
    }
}

@media (max-width: 1399px) {
    #relatedByRegion {
        width: 1140px;
    }
}

@media (max-width: 1199px) {
    #relatedByRegion {
        width: 970px;
    }
}

@media (max-width: 991px) {
    #relatedByRegion {
        width: 750px;
    }
}

@media (max-width: 767px) {
    #relatedByRegion {
        width: 100%;
    }
}





.listings-header {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1180px;
    margin: 32px 0;
    padding: 28px;
    border-radius: 20px;
    color: #fff;
    background: linear-gradient(90deg, var(--accent), var(--brand));
    box-shadow: 0 18px 60px rgba(0,0,0,0.10);
}

.listings-header h1 {
    margin: 0;
    color: #fff;
    font-size: 40px;
    font-weight: 700;
    text-align: center;
}

/* Price trend visuals */
.trend-shell {
    max-width: 1180px;
    margin: 16px auto 8px;
    padding: 22px;
    border-radius: 22px;
    background: #f3f3f3;
    box-shadow: 0 10px 36px rgba(0,0,0,0.03);
    box-sizing: border-box;
}

.trend-inner {
    background: #fff;
    border-radius: 10px;
    padding: 14px 18px;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    min-height: 180px;
}

#priceTrendChart {
    width: 100% !important;
    height: 240px !important;
    display: block;
}

.trend-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-size: 15px;
    pointer-events: none;
}

    .trend-fallback.hidden { display: none; }

.price-trend-section > .section-title {
    font-size: 28px;
    font-weight: 800;
    color: var(--brand);
    text-align: center;
    margin: 0 0 12px 0;
    line-height: 1;
}

.price-trend-section {
    clear: both;
    margin-top: 22px;
}

@media (max-width: 991px) {
    #priceTrendChart { height: 200px !important; }
    .price-trend-section > .section-title { font-size: 24px; }
}

/* Action buttons */
.button--small {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

    .button--small.button--outline {
        background: transparent;
        color: var(--brand);
        border: 1px solid rgba(0,0,0,0.08);
    }




button.button.small {
    font-size: 12px;
}

body[dir=rtl] button.button.small {
    font-size: 16px;
}

/* Company card */
.company-section { margin-top: 28px; }

.company-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 28px;
    padding: 18px;
    max-width: 1180px;
    margin: 12px auto 18px;
    box-sizing: border-box;
    background: transparent;
}

.company-logo {
    width: 160px;
    height: 160px;
    border-radius: 18px;
    padding: 4px;
    background: linear-gradient(90deg, var(--brand-2), var(--brand));
    box-shadow: 0 10px 30px rgba(0,0,0,0.10);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 160px;
}

    .company-logo img {
        width: 100%;
        height: 100%;
        margin: 0;
        object-fit: cover;
        border-radius: 14px;
        display: block;
        background: #fff;
        box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    }

.company-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 220px;
}

.company-title {
    margin: 0 0 8px 0;
    color: var(--brand);
    font-size: 28px;
    line-height: 1.05;
    font-weight: 800;
}

.company-desc {
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    margin: 0;
    overflow: visible;
    display: block;
    -webkit-line-clamp: none;
    -webkit-box-orient: unset;
}

.no-company-info {
    color: var(--muted);
    font-style: italic;
}

.company-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .company-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 12px;
    }

    .company-logo {
        width: 120px;
        height: 120px;
        flex: 0 0 120px;
        margin-bottom: 12px;
    }

    .company-title { font-size: 20px; }
    .company-desc { font-size: 14px; -webkit-line-clamp: none; }
    .company-actions { justify-content: center; margin-top: 10px; }
}


#realEstatePriceRating h2 {
    font-size: 20px !important;
}

body[dir=rtl] #realEstatePriceRating h2 {
    font-size: 24px !important;
}