/* Modern Single Property View */

/* =========================================
   FULL WIDTH & PAGE TITLE HIDING
   ========================================= */

/* Hide page titles when single property is present */
body:has(.wpl-single-property-modern) .entry-title,
body:has(.wpl-single-property-modern) .page-title,
body:has(.wpl-single-property-modern) .wp-block-post-title,
body:has(.wpl-single-property-modern) h1.has-text-align-center,
body:has(.wpl-single-property-modern) article > header,
body:has(.wpl-single-property-modern) .ast-archive-description {
    display: none !important;
}

/* Override WordPress block editor constrained layout */
body:has(.wpl-single-property-modern) .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none !important;
}

/* Remove container padding for full-width */
body:has(.wpl-single-property-modern) .entry-content,
body:has(.wpl-single-property-modern) .page-content,
body:has(.wpl-single-property-modern) .wp-block-post-content,
body:has(.wpl-single-property-modern) .wp-site-blocks,
body:has(.wpl-single-property-modern) .has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* JS fallback class for browsers without :has() */
body.wpl-has-single-property .entry-title,
body.wpl-has-single-property .page-title,
body.wpl-has-single-property .wp-block-post-title,
body.wpl-has-single-property article > header {
    display: none !important;
}

body.wpl-has-single-property .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none !important;
}

body.wpl-has-single-property .entry-content,
body.wpl-has-single-property .wp-block-post-content,
body.wpl-has-single-property .has-global-padding {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================
   MAIN CONTAINER STYLES
   ========================================= */

.wpl-single-view-container {
    display: block !important;
    width: 100%;
}

.wpl-single-property-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px;
    font-family: inherit; /* Inherit from theme */
    color: #333;
    width: 100%;
    box-sizing: border-box;
}

/* Gallery */
.wpl-modern-gallery {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 40px;
    width: 100%;
}

.wpl-gallery-main {
    position: relative;
    flex: 1;
    height: 500px;
    border-radius: 12px;
    background: #f0f0f0;
}

.wpl-gallery-main img#wpl-main-display-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.wpl-gallery-badges {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
    z-index: 10;
}

.wpl-badge-status {
    padding: 6px 12px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
}
.wpl-badge-status.sell { background-color: #2ecc71; }
.wpl-badge-status.rent { background-color: #3498db; }

/* Gallery Navigation */
.wpl-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--wpl-primary, #0073aa);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.wpl-gallery-nav:hover {
    background: var(--wpl-primary-dark, #005a87);
    transform: translateY(-50%) scale(1.05);
}

.wpl-gallery-prev { left: 10px; }
.wpl-gallery-next { right: 10px; }

/* Gallery Counter */
.wpl-gallery-counter {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
}

/* Thumbnails Wrapper */
.wpl-gallery-thumbs-wrapper {
    position: relative;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wpl-gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 500px;
    overflow: hidden;
}

.wpl-thumb-item {
    width: 120px;
    height: 118px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s, border-color 0.3s, transform 0.2s;
    position: relative;
    border: 3px solid transparent;
    flex-shrink: 0;
}

.wpl-thumb-item:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.wpl-thumb-item.active {
    opacity: 1;
    border-color: var(--wpl-primary, #0073aa);
}

.wpl-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hide scroll buttons - using main image nav instead */
.wpl-thumbs-scroll {
    display: none;
}

/* Video Container */
.wpl-video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
}

.wpl-video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Layout Grid */
.wpl-property-container-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

/* Header */
.wpl-header-modern {
    margin-bottom: 30px;
}

.wpl-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
}

.wpl-header-left {
    flex: 1;
    min-width: 300px;
}

.wpl-header-right {
    text-align: right;
}

.wpl-header-badges {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.wpl-badge-verified {
    display: inline-flex;
    align-items: center;
    background-color: #dcfce7;
    color: #166534;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.wpl-badge-verified .wpl-dot {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    margin-right: 6px;
}

.wpl-badge-pending {
    display: inline-flex;
    align-items: center;
    background-color: #fef3c7;
    color: #92400e;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.wpl-badge-pending .wpl-dot {
    width: 6px;
    height: 6px;
    background: #f59e0b;
    border-radius: 50%;
    margin-right: 6px;
}

.wpl-badge-status {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.wpl-badge-status.sell {
    background: var(--wpl-primary, #be0e0e);
    color: var(--wpl-btn-text, #ffffff);
}

.wpl-badge-status.rent {
    background: var(--wpl-secondary, #d1ae00);
    color: var(--wpl-btn-text, #ffffff);
}

.wpl-title-modern {
    font-size: 1.75em;
    margin: 0 0 10px 0;
    line-height: 1.3;
    font-weight: 700;
    color: #1f2937;
}

.wpl-location-modern {
    color: #6b7280;
    font-size: 0.95em;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wpl-location-modern .dashicons {
    color: var(--wpl-primary, #0073aa);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.wpl-price-modern {
    font-size: 1.875em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 4px;
}

.wpl-price-per-sqft {
    font-size: 0.875em;
    color: #6b7280;
    margin-bottom: 15px;
}

.wpl-header-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.wpl-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875em;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s;
}

.wpl-action-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.wpl-action-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Quick Info Card */
.wpl-quick-info-card {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wpl-quick-info-item {
    text-align: center;
    padding: 10px;
    border-right: 1px solid #e5e7eb;
}

.wpl-quick-info-item:last-child {
    border-right: none;
}

.wpl-quick-label {
    display: block;
    font-size: 0.7em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    font-weight: 600;
    margin-bottom: 6px;
}

.wpl-quick-value {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-weight: 700;
    color: #1f2937;
    font-size: 0.95em;
}

.wpl-quick-value .dashicons {
    color: var(--wpl-primary, #0073aa);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Card Sections */
.wpl-card-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Highlight Section - For listing-type specific primary info */
.wpl-highlight-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 100%);
    border: 2px solid var(--wpl-primary, #0073aa);
    border-left-width: 4px;
    position: relative;
}

.wpl-highlight-section::before {
    content: "Key Details";
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--wpl-primary, #0073aa);
    color: #fff;
    padding: 4px 12px;
    font-size: 0.75em;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpl-section-title {
    display: flex;
    align-items: center;
    font-size: 1.25em;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding: 0;
    border: none;
}

.wpl-title-bar {
    width: 4px;
    height: 24px;
    background: var(--wpl-primary, #0073aa);
    border-radius: 2px;
    margin-right: 12px;
}

.wpl-description-text {
    line-height: 1.7;
    color: #6b7280;
    font-size: 0.95em;
}

.wpl-description-text p {
    margin-bottom: 16px;
}

/* Details Grid */
.wpl-details-grid-modern {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    column-gap: 2em;
}

.wpl-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #f3f4f6;
}

.wpl-detail-row:last-child {
    border-bottom: none;
}

.wpl-detail-label {
    color: #6b7280;
    font-size: 0.95em;
}

.wpl-detail-value {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.95em;
}

/* Amenities Grid */
.wpl-amenities-grid-modern {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.wpl-amenity-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    border-radius: 8px;
    font-size: 0.9em;
    color: #374151;
}

.wpl-amenity-item .dashicons {
    color: var(--wpl-primary, #0073aa);
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Contact Card (Sidebar) */
.wpl-contact-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wpl-agent-header-new {
    display: flex;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.wpl-agent-avatar-new {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.wpl-agent-avatar-new img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpl-agent-info-new h4 {
    margin: 0 0 2px 0;
    font-size: 0.9em;
    font-weight: 600;
    color: #1f2937;
}

.wpl-agent-company {
    font-size: 0.75em;
    color: #6b7280;
    display: block;
    margin-bottom: 2px;
}

.wpl-agent-phone {
    font-size: 0.75em;
    color: #6b7280;
    display: block;
}

.wpl-form-group-new {
    margin-bottom: 12px;
}

.wpl-form-group-new label {
    display: block;
    font-size: 0.75em;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}

.wpl-form-group-new input,
.wpl-form-group-new textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.8em;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wpl-form-group-new input:focus,
.wpl-form-group-new textarea:focus {
    outline: none;
    border-color: var(--wpl-primary, #0073aa);
    box-shadow: 0 0 0 2px rgba(var(--wpl-primary-rgb, 0, 115, 170), 0.1);
}

.wpl-form-group-new textarea {
    resize: vertical;
    min-height: 70px;
}

.wpl-btn-send-inquiry {
    width: 100%;
    padding: 9px 16px;
    background: var(--wpl-primary, #0073aa);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 8px;
}

.wpl-btn-send-inquiry:hover {
    background: var(--wpl-primary-dark, #005a87);
}

.wpl-btn-whatsapp {
    padding: 9px 16px;
    background: #25d366;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.8em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
}

.wpl-btn-whatsapp:hover {
    background: #128c7e;
    color: #fff;
}

.wpl-btn-whatsapp .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.wpl-whatsapp-standalone {
    margin-top: 16px;
}

/* Old Agent Card (legacy support) */
.wpl-agent-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.wpl-agent-header {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: center;
}

.wpl-agent-avatar img {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    object-fit: cover;
}

.wpl-agent-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

.wpl-agent-label {
    font-size: 0.85em;
    color: #888;
    display: block;
    margin-bottom: 5px;
}

.wpl-agent-rating {
    font-size: 0.8em;
    color: #666;
}

.wpl-agent-contact-info p {
    margin: 8px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
}

.wpl-btn-reply {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 1px solid var(--wpl-primary, #0073aa);
    color: var(--wpl-primary, #0073aa);
    border-radius: 6px;
    font-weight: 600;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.wpl-btn-reply:hover {
    background: var(--wpl-primary, #0073aa);
    color: #fff;
}

.wpl-sidebar-widget {
    margin-top: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}



.wpl-sidebar-sticky-wrapper {
    position: sticky;
    top: 20px;
}

/* Similar Properties Section */
.wpl-similar-properties-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.wpl-similar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.wpl-similar-header h3 {
    display: flex;
    align-items: center;
    font-size: 1.5em;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.wpl-similar-header h3::before {
    content: '';
    width: 4px;
    height: 28px;
    background: var(--wpl-primary, #0073aa);
    border-radius: 2px;
    margin-right: 12px;
}

.wpl-view-all-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--wpl-primary, #0073aa);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
}

.wpl-view-all-link:hover {
    text-decoration: underline;
}

.wpl-similar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

/* Similar Properties now uses the modern card design from wpl-listings.css */
.wpl-similar-properties-section .wpl-property-card-modern {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wpl-similar-properties-section .wpl-property-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Old similar card styles kept for backward compatibility */
.wpl-similar-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wpl-similar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.wpl-similar-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.wpl-similar-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.wpl-similar-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.wpl-similar-card:hover .wpl-similar-card-image img {
    transform: scale(1.05);
}

.wpl-similar-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7em;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpl-similar-badge.sell {
    background: var(--wpl-primary, #be0e0e);
    color: var(--wpl-btn-text, #ffffff);
}

.wpl-similar-badge.rent {
    background: var(--wpl-secondary, #d1ae00);
    color: var(--wpl-btn-text, #ffffff);
}

.wpl-similar-fav {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}

.wpl-similar-fav:hover {
    background: #fff;
}

.wpl-similar-fav .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.wpl-similar-fav:hover .dashicons {
    color: #ef4444;
}

.wpl-similar-price-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
}

.wpl-similar-price {
    color: #fff;
    font-size: 1.25em;
    font-weight: 700;
}

.wpl-similar-card-content {
    padding: 16px;
}

.wpl-similar-title {
    font-size: 0.95em;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.wpl-similar-title a {
    color: inherit;
    text-decoration: none;
}

.wpl-similar-title a:hover {
    color: var(--wpl-primary, #0073aa);
}

.wpl-similar-location {
    font-size: 0.85em;
    color: #6b7280;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.wpl-similar-location .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: var(--wpl-primary, #0073aa);
}

.wpl-similar-meta {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid #f3f4f6;
}

.wpl-similar-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8em;
    color: #6b7280;
}

.wpl-similar-meta span .dashicons {
    color: var(--wpl-primary, #0073aa);
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Contact Form Additions */
.wpl-contact-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 12px 0;
}

.wpl-call-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.wpl-call-section p {
    font-size: 0.75em;
    color: #6b7280;
    margin: 0 0 6px 0;
}

.wpl-call-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--wpl-primary, #0073aa);
    font-weight: 600;
    font-size: 0.85em;
    text-decoration: none;
}

.wpl-call-link:hover {
    text-decoration: underline;
}

.wpl-whatsapp-chat-section {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.wpl-whatsapp-chat-section p {
    font-size: 0.75em;
    color: #6b7280;
    margin: 0 0 8px 0;
}

.wpl-btn-whatsapp-chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: #25D366;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.wpl-btn-whatsapp-chat:hover {
    background: #1DA851;
    transform: translateY(-1px);
}

.wpl-btn-whatsapp-chat svg {
    flex-shrink: 0;
}

.wpl-agent-label-new {
    font-size: 0.65em;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: block;
    margin-bottom: 2px;
}

.wpl-agent-name-new {
    margin: 0 0 4px 0;
    font-size: 0.9em;
    font-weight: 600;
    color: #1f2937;
}

.wpl-agent-rating-new {
    display: flex;
    gap: 1px;
}

.wpl-agent-rating-new .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
    color: #fbbf24;
}

/* Lightbox Modal */
.wpl-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.wpl-lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.wpl-lightbox-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
}

.wpl-lightbox-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.wpl-lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.wpl-lightbox-close:hover {
    transform: scale(1.2);
}

.wpl-lightbox-image-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.wpl-lightbox-image-wrapper img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 4px;
}

.wpl-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--wpl-primary, #0073aa);
    color: #fff;
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.wpl-lightbox-nav:hover {
    background: var(--wpl-primary-dark, #005a87);
    transform: translateY(-50%) scale(1.1);
}

.wpl-lightbox-prev { left: 20px; }
.wpl-lightbox-next { right: 20px; }

.wpl-lightbox-counter {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 500;
}

.wpl-lightbox-thumbs {
    display: flex;
    gap: 10px;
    padding: 15px 0;
    overflow-x: auto;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}

.wpl-lightbox-thumbs::-webkit-scrollbar {
    height: 6px;
}

.wpl-lightbox-thumbs::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.wpl-lightbox-thumb {
    flex: 0 0 80px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s, border-color 0.3s;
    border: 3px solid transparent;
}

.wpl-lightbox-thumb:hover {
    opacity: 0.8;
}

.wpl-lightbox-thumb.active {
    opacity: 1;
    border-color: var(--wpl-primary, #0073aa);
}

.wpl-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive */
@media (max-width: 1024px) {
    .wpl-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .wpl-modern-gallery {
        flex-direction: column;
    }
    
    .wpl-gallery-thumbs-wrapper {
        width: 100%;
        flex-direction: row;
    }
    
    .wpl-gallery-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        gap: 8px;
    }
    
    .wpl-thumb-item {
        width: 80px;
        height: 60px;
    }
    
    .wpl-property-container-grid {
        grid-template-columns: 1fr;
    }
    
    .wpl-header-top {
        flex-direction: column;
    }
    
    .wpl-header-right {
        text-align: left;
    }
    
    .wpl-header-actions {
        justify-content: flex-start;
    }
    
    .wpl-quick-info-card {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wpl-quick-info-item:nth-child(2) {
        border-right: none;
    }
    
    .wpl-quick-info-item:nth-child(3),
    .wpl-quick-info-item:nth-child(4) {
        border-top: 1px solid #e5e7eb;
    }
    
    .wpl-details-grid-modern {
        grid-template-columns: 1fr;
    }
    
    .wpl-amenities-grid-modern {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wpl-similar-grid {
        grid-template-columns: 1fr;
    }
    
    .wpl-gallery-main {
        height: 300px;
    }
    
    .wpl-gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .wpl-gallery-prev { left: 10px; }
    .wpl-gallery-next { right: 10px; }
    
    /* Lightbox Mobile */
    .wpl-lightbox-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .wpl-lightbox-prev { left: 10px; }
    .wpl-lightbox-next { right: 10px; }
    
    .wpl-lightbox-image-wrapper img {
        max-height: 50vh;
    }
    
    .wpl-lightbox-thumb {
        flex: 0 0 60px;
        height: 45px;
    }
    
    #wpl-inquiry-form-wrapper {
        position: static;
    }
}

/* =========================================
   PROJECT HIGHLIGHTS SECTION (Builder Projects)
   ========================================= */

.wpl-project-feature-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.wpl-project-feature-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.wpl-feature-title {
    font-size: 15px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.wpl-feature-title .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--wpl-primary, #0064d1);
}

.wpl-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wpl-feature-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.wpl-config-tag {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.wpl-config-tag:hover {
    background: linear-gradient(135deg, #bfdbfe 0%, #93c5fd 100%);
    transform: translateY(-2px);
}

.wpl-type-tag {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.wpl-type-tag:hover {
    background: linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 100%);
    transform: translateY(-2px);
}

.wpl-facing-tag {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border: 1px solid #fcd34d;
}

.wpl-facing-tag:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-2px);
}

/* =========================================
   FLOOR PLANS SECTION
   ========================================= */

.wpl-floor-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.wpl-floor-plan-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.wpl-floor-plan-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px);
}

.wpl-floor-plan-item a {
    display: block;
    position: relative;
}

.wpl-floor-plan-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.wpl-zoom-icon {
    position: absolute;
    bottom: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wpl-floor-plan-item:hover .wpl-zoom-icon {
    opacity: 1;
}

.wpl-zoom-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

@media (max-width: 768px) {
    .wpl-floor-plans-grid {
        grid-template-columns: 1fr;
    }
    
    .wpl-floor-plan-item img {
        height: 180px;
    }
    
    .wpl-tags-container {
        gap: 8px;
    }
    
    .wpl-feature-tag {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    /* Remove padding on mobile */
    .wpl-single-property-modern {
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    /* Swap order - Gallery first on mobile */
    .wpl-modern-gallery {
        order: 1 !important;
        margin-bottom: 0;
    }
    
    .wpl-header-modern {
        order: 2 !important;
        padding-top: 16px;
    }
    
    /* Lightbox stays hidden but needs order */
    .wpl-lightbox {
        order: 3 !important;
    }
    
    .wpl-property-container-grid {
        order: 4 !important;
    }
    
    .wpl-similar-properties-section {
        order: 5 !important;
    }
    .wpl-single-property-modern > script {
        order: 99 !important;
    }
}

/* =========================================
   FLOATING INQUIRE BUTTON
   ========================================= */

.wpl-floating-inquire-btn {
    display: none;
}

@media (max-width: 768px) {
    .wpl-floating-inquire-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        position: fixed;
        bottom: 20px;
        right: 16px;
        padding: 14px 24px;
        background: var(--wpl-primary, #4f46e5);
        color: #fff;
        border: none;
        border-radius: 50px;
        font-size: 1em;
        font-weight: 600;
        cursor: pointer;
        z-index: 998;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
        transition: transform 0.2s, opacity 0.3s;
    }
    
    .wpl-floating-inquire-btn:hover {
        transform: translateY(-2px);
    }
    
    .wpl-floating-inquire-btn .dashicons {
        font-size: 18px;
        width: 18px;
        height: 18px;
    }
    
    .wpl-floating-inquire-btn.hidden {
        opacity: 0;
        pointer-events: none;
        transform: translateY(20px);
    }
}
