/* ==========================================================
   General Styles & Banner
   ========================================================== */

.banner {
    width: 100%;
    border-radius: 3px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

body,
.property-sidebar,
.feature-property-sec {
    background-color: #f7f6ff !important;
}

/* ==========================================================
   Premium Card Base (Common for both)
   ========================================================== */

.product-custom {
    margin-bottom: 1px;
    width: 100%;
}

.profile-widget.rent-list-view {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid #f0f0f0;
    overflow: hidden;
}

.profile-widget.rent-list-view:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.property-date {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 13px;
    color: #888;
    font-weight: 500;
    z-index: 5;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 10px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.doc-img {
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.doc-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.profile-widget.rent-list-view:hover .doc-img img {
    transform: scale(1.08);
}

.product-amount {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.product-amount h5 {
    font-size: 14px;
    padding: 5px 12px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border-radius: 50px;
    font-weight: 700;
    backdrop-filter: blur(4px);
    margin: 0;
}

/* ==========================================================
   Layout 1: Horizontal Premium Card (Optimized for 3-Column)
   ========================================================== */

.rent-list-view.horizontal {
    display: flex;
    align-items: stretch;
    gap: 15px;
    padding: 12px;
    background: #ffffff;
    border-radius: 20px;
}

.rent-list-view.horizontal .doc-img {
    height: 180px;
    width: 230px;
    /* Balanced width to prevent overflow in 3-column */
    border-radius: 3px;
}

.rent-list-view.horizontal .product-amount {
    top: auto;
    bottom: 12px;
    left: 12px;
}

.rent-list-view.horizontal .product-amount h5 {
    font-size: 16px;
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 12px;
    border-radius: 10px;
}

.rent-list-view.horizontal .property-date {
    position: static;
    background: none;
    padding: 0;
    font-size: 11px;
    color: #8892a0;
    font-weight: 500;
}

/* ==========================================================
   Layout 2: Vertical Premium Card
   ========================================================== */

.rent-list-view.vertical {
    display: block;
}

.rent-list-view.vertical .doc-img {
    height: 220px;
    width: 100%;
    border-radius: 20px 20px 0 0;
}

.rent-list-view.vertical .pro-content {
    padding: 20px;
}

/* ==========================================================
   Shared Content Styles
   ========================================================== */

.pro-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    /* CRITICAL: Allows flex items to shrink and prevents overflow */
}

.list-head .title a {
    font-size: 17px !important;
    /* Slightly smaller than 18px for better fit */
    font-weight: 800;
    color: #0d233e;
    transition: color 0.3s ease;
    text-decoration: none;
    line-height: 1.2;
    display: block;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Smart truncation for long names */
}

.list-head .title a:hover {
    color: #f38a1f;
}

.list-head p {
    font-size: 12px;
    color: #8892a0;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    /* Smart truncation for long addresses */
}

/* Feature Grid Box (Image Reference) */
.details-box {
    background: #f8f8ff;
    /* Light purple/blue background */
    border-radius: 8px;
    padding: 6px 10px;
    /* Reduced padding */
    margin-bottom: 8px;
    display: flex;
    gap: 12px;
    /* Reduced gap between items */
    list-style: none;
    overflow: hidden;
}

.details-box li {
    font-size: 13px;
    color: #4b61d1;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.details-box li i {
    font-size: 14px;
}

.details-box li img {
    width: 16px;
    filter: invert(34%) sepia(76%) saturate(1633%) hue-rotate(218deg) brightness(89%) contrast(89%);
    /* Blue-ish tint for SVGs */
}

/* Bottom Row Styling */
.card-bottom-row {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

.bottom-info p {
    margin: 0;
    line-height: 1.2;
}

.bottom-info .cat-name {
    color: #ff6a28;
    font-weight: 800;
    font-size: 14px;
}

.bottom-info .loc-name,
.bottom-info .date-text {
    color: #8892a0;
    font-size: 12px;
    font-weight: 500;
}

.btn-primary {
    padding: 10px 22px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    background: #f38a1f;
    border: none;
    color: #fff;
    transition: all 0.3s ease;
}

.user-name h6 {
    font-size: 13px;
    /* Reduced from 14px */
    font-weight: 600;
    color: #f38a1f;
    margin-bottom: 0;
}


.btn-primary:hover {
    background: #d97914;
    transform: scale(1.05);
}

/* ==========================================================
   Sidebar Ad & Recently Added Pills
   ========================================================== */

.sidebar-recent mt-4 {
    margin-top: 20px;
}

/* ==========================================================
   Smart Sidebar Design (Image Reference)
   ========================================================== */

.left-sidebar-widget.list-sidebar {
    background: #ffffff;
    border-radius: 12px;
    padding: 0;
    box-shadow: none;
    border: none;
}

.collapse-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px;
    /* Further reduced from 15px */
    margin-bottom: 12px;
    /* Further reduced from 15px */
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f2f2f2;
}

.collapse-card .card-title {
    margin-bottom: 12px;
    /* Further reduced */
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 8px;
    /* Further reduced */
    position: relative;
}

.collapse-card .card-title a {
    font-size: 16px !important;
    /* Reduced from 20px */
    font-weight: 800;
    color: #0d233e;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
}

.collapse-card .card-title a::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.collapse-card .card-title a.collapsed::after {
    transform: rotate(-180deg);
}

.review-form {
    margin-bottom: 12px;
    list-style: none;
}

.review-form .form-control,
.review-form .select,
.review-form .selection .select2-selection {
    background-color: #f5f7fa !important;
    border: 1px solid #f5f7fa !important;
    border-radius: 8px !important;
    height: 36px !important;
    /* Fast/Ultra-compact height */
    padding: 0 10px !important;
    font-size: 12px !important;
    /* Reduced for smart look */
    color: #8892a0 !important;
    box-shadow: none !important;
}

.review-form .form-control:focus {
    border-color: #e0e4e9 !important;
    background-color: #ffffff !important;
}

/* Checkbox Style */
.checkbox-list {
    padding: 0;
    margin: 0;
    list-style: none;
}

.checkbox-list li {
    margin-bottom: 10px;
    /* Reduced from 15px */
}

.custom_check {
    display: block;
    position: relative;
    padding-left: 26px;
    cursor: pointer;
    font-size: 12px;
    /* Smaller font for smart design */
    color: #6c757d;
    user-select: none;
    font-weight: 500;
}

.custom_check input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f5f7fa;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.custom_check:hover input~.checkmark {
    background-color: #e9ecef;
}

.custom_check input:checked~.checkmark {
    background-color: #f38a1f;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom_check input:checked~.checkmark:after {
    display: block;
}

.custom_check .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.apply-btn {
    padding: 0 12px 12px;
}

.apply-btn .btn-primary {
    background: #ff6a28 !important;
    /* Specific orange from image */
    border-radius: 8px;
    height: 40px;
    /* More compact */
    font-weight: 800;
    font-size: 14px;
    border: none;
    width: 100%;
}

.reset-btn {
    color: #ff3b30 !important;
    /* Specific red for reset */
    font-weight: 700;
    font-size: 12px;
    text-decoration: none;
    display: block;
    text-align: center;
    margin-top: 10px;
}

.sidebar-property-item {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Increased gap */
    background: #ffffff;
    /* Clean white background */
    border-radius: 12px;
    padding: 10px;
    /* More padding */
    text-decoration: none !important;
    transition: all 0.3s ease;
    border: 1px solid #f2f2f2;
    margin-bottom: 12px;
    /* Gap between items */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.sidebar-property-item:hover {
    background: #ffffff;
    border-color: #f38a1f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-item-img {
    width: 65px;
    /* Slightly bigger */
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-item-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-item-info {
    min-width: 0;
    /* Enable truncation */
}

.sidebar-item-info h6 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 800;
    color: #0d233e;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-item-info p {
    margin: 0;
    font-size: 13px;
    color: #ff6a28;
    /* Smart orange price */
    font-weight: 700;
}

/* ==========================================================
   Recently Added Main Section (Smart UI Image Reference)
   ========================================================== */

.recently-view-title {
    color: #0d233e;
    font-size: 24px;
    font-weight: 800;
    margin: 40px 0 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: none;
    /* Removing previous single bar */
    padding-left: 0;
}

.recently-view-title::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 32px;
    background: #f38a1f;
    border-radius: 2px;
    box-shadow: 10px 0 0 #f38a1f;
    /* Creating the double bar effect */
    margin-right: 18px;
}

.recent-property-card {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
    background: #fff;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #f2f2f2;
    transition: all 0.3s ease;
    height: 140px;
    /* Small/Compact height */
}

.recent-property-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.recent-img-box {
    position: relative;
    background: #f8f9fa;
    border: 5px solid #ffffff;
    /* Thick white border around image */
    border-radius: 10px;
    overflow: hidden;
    width: 110px;
    height: 110px;
    flex-shrink: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.priceRecent {
    position: absolute;
    bottom: 8px;
    left: 8px;
    z-index: 5;
    display: none;
}

.priceRecent h5 {
    font-size: 16px;
    font-weight: 800;
    color: #fff;
    background: rgba(13, 35, 62, 0.7);
    backdrop-filter: blur(8px);
    padding: 3px 10px;
    border-radius: 50px;
    margin: 0;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 0.5px solid rgba(255, 255, 255, 0.2);
}

.recent-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recent-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 5px 0;
}

.recent-info h4 {
    font-weight: 800;
    font-size: 14px;
    /* Small/Compact font */
    color: #0d233e;
    margin-bottom: 4px;
    line-height: 1.3;
}

.recent-info p {
    font-size: 11px;
    color: #8892a0;
    margin-bottom: auto;
    line-height: 1.4;
}

.recent-info .text-start {
    /* Ensuring button wrapper takes full width */
    width: 100%;
    text-align: right !important;
    /* Moving button to the right as per image */
}

.recent-info .btn-book {
    background: #f38a1f;
    color: #fff;
    padding: 6px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 11px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.recent-info .btn-book:hover {
    background: #d97914;
    transform: scale(1.05);
}

/* ==========================================================
   Mobile Sidebar Drawer & Overlay
   ========================================================== */

#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: none;
    backdrop-filter: blur(2px);
}

#sidebar-overlay.open {
    display: block;
}

@media (max-width: 991px) {
    #sidebar-drawer {
        position: fixed !important;
        top: 0;
        left: -320px;
        width: 320px !important;
        height: 100vh;
        background: #fff;
        z-index: 10001;
        overflow-y: auto;
        padding: 20px;
        transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
        display: block !important;
    }

    #sidebar-drawer.open {
        left: 0;
    }

    .rent-list-view.horizontal {
        flex-direction: column;
        padding: 8px;
        /* Reduced from 12px */
    }

    .priceRecent {
        display: block;
    }

    .rent-list-view.horizontal .doc-img,
    .recent-property-card,
    .recent-img-box {
        width: 100%;
        height: 180px;
        /* Reduced from 200px */
    }

    /* Fix Select2 dropdown z-index for mobile sidebar */
    .select2-container--open {
        z-index: 10002 !important;
    }

    .select2-dropdown {
        z-index: 10002 !important;
    }
}

/* Extra Mobile rules */
@media (max-width: 767px) {

    .container,
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .breadcrumb {
        padding: 20px 0 !important;
        /* Heavily reduced */
    }

    .breadcrumb-title h2 {
        font-size: 18px !important;
        margin-bottom: 5px;
    }

    .col-md-6 {
        width: 100% !important;
    }

    .recent-property-card {
        flex-direction: column;
        height: auto;
        padding: 8px;
        /* Reduced from 15px */
    }

    .recent-img-box {
        width: 100%;
        height: 150px;
        /* Reduced from 180px */
        margin-bottom: 8px;
    }

    .banner {
        height: 120px !important;
        /* Reduced from 160px */
        margin-bottom: 15px !important;
        /* Reduced from 30px */
    }

    .list-head .title a {
        font-size: 15px !important;
    }

    .details-box {
        padding: 4px 8px;
        gap: 8px;
    }

    .details-box li {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .rent-list-view.horizontal .doc-img {
        height: 150px;
        /* Reduced from 180px */
    }

    .card-bottom-row {
        flex-direction: row;
        /* Match desktop/tablet if possible or keep column but tighter */
        flex-wrap: wrap;
        align-items: center;
        gap: 5px;
    }

    .btn-primary {
        padding: 8px 15px;
        font-size: 12px;
    }

    .bottom-info .cat-name {
        font-size: 12px;
    }
}

@media (max-width: 1199px) {
    .row>.col-xl-3.d-none.d-xl-block {
        display: none !important;
    }

    .col-xl-6 {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
}

/* ==========================================================
   Mobile Recently Added Grid
   ========================================================== */

.mobile-recent-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px;
    text-decoration: none !important;
    border: 1px solid #f2f2f2;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

.mobile-recent-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-color: #f38a1f;
}

.mobile-recent-card .img-box {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
    background-color: #f8f9fa;
}

.mobile-recent-card .img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mobile-recent-card .info-box h6 {
    font-size: 13px;
    font-weight: 700;
    color: #0d233e;
    margin-bottom: 4px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: 34px;
    /* Fixed height for 2 lines */
}

.mobile-recent-card .info-box p {
    font-size: 13px;
    color: #ff6a28;
    font-weight: 800;
    margin: 0;
}

/* Hide scrollbar for the entire page while keeping functionality */
html,
body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar,
.buy-list::-webkit-scrollbar,
#sidebar-drawer::-webkit-scrollbar {
    display: none;
}

.buy-list {
    overflow-x: hidden;
}