/* Plugin Styles */
.property-listing-page {
    background: #fdfdfd;
}

.listing-container {
    padding: 40px 20px;
    box-sizing: border-box;
}

/* Ensure all plugin elements use border-box to avoid width+padding issues */
.property-listing-page * {
    box-sizing: border-box;
}

.listing-header {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.listing-title {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #262637;
}

.listing-location {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 15px;
}

.listing-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #262637;
}

.price-label {
    font-size: 1rem;
    font-weight: 400;
    color: #666;
    margin-left: 10px;
}

/* Gallery */
.listing-gallery-wrapper {
    margin-bottom: 30px;
    background: #000;
    /* Dark background for gallery area like Rightmove */
    padding: 10px;
    border-radius: 4px;
}

.mySwiperMain {
    height: 500px;
    width: 100%;
    margin-bottom: 10px;
    background: #f0f0f0;
    /* Lighter placeholder instead of black */
}

.list-slide-main {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
}

.list-slide-main img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    cursor: pointer;
}

.mySwiperThumbs {
    height: 100px;
    box-sizing: border-box;
    padding: 10px 0;
}

.list-slide-thumb {
    width: 25%;
    height: 100%;
    opacity: 0.4;
    cursor: pointer;
}

.list-slide-thumb:hover {
    opacity: 1;
}

.list-slide-thumb.swiper-slide-thumb-active {
    opacity: 1;
    border: 2px solid #fff;
}

.list-slide-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Features Bar */
.listing-features-bar {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #e5e5e5;
    margin-bottom: 30px;
    border-radius: 4px;
    flex-wrap: wrap;
    /* Allow items to wrap on mobile */
}

@media (max-width: 600px) {
    .listing-features-bar {
        gap: 15px;
        padding: 15px;
    }

    .feat-item {
        font-size: 1rem;
    }
}

.feat-item {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    color: #262637;
}

/* Content Grid */
.listing-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.listing-section {
    background: #fff;
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-bottom: 30px;
}

.listing-section h2 {
    font-size: 1.3rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
    margin-bottom: 20px;
    color: #262637;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-container iframe,
.video-container object,
.video-container embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.listing-description img {
    max-width: 100%;
    height: auto;
}

/* Sidebar */
.agent-card {
    background: #fff;
    padding: 30px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    position: sticky;
    top: 100px;
    text-align: center;
}

.btn-primary {
    display: block;
    background: #23e354;
    /* Rightmove green-ish listing button color is too generic, using a vibrant green */
    color: #fff;
    /* Wait, Rightmove is teal/green */
    background: #19cb88;
    padding: 12px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 10px;
}

.btn-secondary {
    display: block;
    background: #fff;
    border: 2px solid #262637;
    color: #262637;
    padding: 12px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
}

/* Lightbox */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    padding-top: 20px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-container {
    width: 90%;
    max-width: 1200px;
    text-align: center;
    margin: 0 auto;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
}

/* Lightbox Swipers */
.swiperLightboxMain {
    width: 100%;
    height: 70vh;
    margin-bottom: 20px;
}

.lb-slide-main {
    display: flex;
    justify-content: center;
    align-items: center;
}

.lb-slide-main img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.swiperLightboxThumbs {
    width: 100%;
    height: 15vh;
    box-sizing: border-box;
}

.lb-slide-thumb {
    width: 25%;
    height: 100%;
    opacity: 0.4;
    cursor: pointer;
    border: 2px solid transparent;
}

.lb-slide-thumb.swiper-slide-thumb-active {
    opacity: 1;
    border-color: #fff;
}

.lb-slide-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Custom Lightbox Nav Buttons to be clearly visible */
.lb-next,
.lb-prev {
    color: #fff;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .listing-content-grid {
        grid-template-columns: 1fr;
    }

    .mySwiperMain {
        height: 300px;
    }

    .swiperLightboxMain {
        height: 60vh;
    }

    .swiperLightboxThumbs {
        height: 20vh;
    }
}

/* Listings Grid (Archive & Shortcode) */
.mel-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.mel-listing-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.mel-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.mel-card-image {
    position: relative;
    height: 220px;
    background: #f0f0f0;
    overflow: hidden;
}

.mel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.mel-listing-card:hover .mel-card-image img {
    transform: scale(1.05);
}

.mel-status-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(38, 38, 55, 0.9);
    color: #fff;
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 4px;
    text-transform: uppercase;
}

.mel-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mel-card-title {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.mel-card-title a {
    color: #262637;
    text-decoration: none;
}

.mel-card-location {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.mel-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #19cb88;
    margin-bottom: 15px;
}

.mel-card-meta {
    display: flex;
    gap: 10px;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 20px;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: auto;
    /* Push to bottom if content varies */
}

.mel-view-btn {
    display: block;
    text-align: center;
    background: #262637;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}

.mel-view-btn:hover {
    background: #444;
}

/* Archive Grid Layout */
.mel-listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.mel-listing-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mel-listing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.mel-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.mel-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mel-status-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #19cb88;
    /* Match your primary color */
    color: #fff;
    padding: 5px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
}

.mel-card-content {
    padding: 20px;
}

.mel-card-title {
    font-size: 1.2rem;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.mel-card-title a {
    color: #262637;
    text-decoration: none;
}

.mel-card-location {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.mel-card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #19cb88;
    margin-bottom: 15px;
}

.mel-card-meta {
    display: flex;
    gap: 10px;
    color: #888;
    font-size: 0.9rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-bottom: 15px;
}

.mel-view-btn {
    display: block;
    text-align: center;
    background: #262637;
    color: #fff;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.mel-view-btn:hover {
    background: #33334d;
}

/* NEW CARD DESIGN STYLES */
.mel-status-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(38, 38, 55, 0.95);
    color: #fff;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    box-sizing: border-box;
}

.mel-card-content.text-center {
    text-align: center;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mel-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    min-height: 2.4em;
    /* Ensure 2 lines alignment if needed */
}

.mel-card-meta.justify-center {
    display: flex;
    justify-content: center;
    gap: 20px;
    border-top: none;
    margin-bottom: 20px;
    padding-top: 0;
    color: #555;
    font-size: 0.95rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.meta-item .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: #262637;
}

.mel-price-pill-container {
    margin-top: auto;
}

.mel-price-pill {
    display: inline-block;
    background: #e6f7f0;
    /* Light green */
    color: #1a6b48;
    /* Dark green text */
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
}

/* Override Archive Grid Gap if needed */
.mel-listings-grid {
    gap: 40px;
}