/* ─── Single Property Page ─── */
.apl-single-property {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a2e;
    line-height: 1.6;
}

.apl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ─── Breadcrumb ─── */
.apl-breadcrumb {
    background: #f8f9fa;
    padding: 16px 0;
    font-size: 14px;
}

.apl-breadcrumb a {
    color: #1a6b4a;
    text-decoration: none;
}

.apl-breadcrumb a:hover {
    text-decoration: underline;
}

.apl-breadcrumb-sep {
    margin: 0 8px;
    color: #999;
}

.apl-breadcrumb-current {
    color: #666;
}

/* ─── Gallery Slider ─── */
.apl-gallery-slider {
    position: relative;
    overflow: hidden;
    background: #000;
    max-height: 500px;
}

.apl-gallery-track {
    display: flex;
    transition: transform 0.5s ease;
}

.apl-gallery-slide {
    min-width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.apl-gallery-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    display: block;
}

.apl-slider-prev,
.apl-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    font-size: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    color: #333;
}

.apl-slider-prev:hover,
.apl-slider-next:hover {
    background: #fff;
}

.apl-slider-prev { left: 16px; }
.apl-slider-next { right: 16px; }

.apl-slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.apl-dot {
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.apl-dot.active {
    background: #fff;
}

/* ─── Title Section ─── */
.apl-single-content {
    padding: 40px 0;
}

.apl-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.apl-title-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.apl-status-badge {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    background: #eef1f4;
    color: #33383f;
}

.apl-status-sell { background: #e6f5ee; color: #1a6b4a; }
.apl-status-rent { background: #e8f0fe; color: #1967d2; }
.apl-status-sold { background: #fce8e6; color: #d93025; }
.apl-status-rented { background: #fef7e0; color: #e37400; }

.apl-type-label {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    background: #f0f0f0;
    color: #555;
}

.apl-property-title {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 6px;
    line-height: 1.2;
}

.apl-property-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0 0 10px;
}

.apl-title-details {
    display: flex;
    gap: 20px;
    font-size: 14px;
    color: #555;
    flex-wrap: wrap;
}

.apl-detail-item strong {
    color: #1a1a2e;
}

.apl-stars {
    color: #f5a623;
    margin-left: 4px;
}

.apl-single-price {
    font-size: 32px;
    font-weight: 700;
    color: #1a6b4a;
    white-space: nowrap;
}

/* ─── Sections ─── */
.apl-section {
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid #eee;
}

.apl-section:last-child {
    border-bottom: none;
}

.apl-section-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a1a2e;
}

/* ─── Property Details Grid ─── */
.apl-details-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.apl-detail-box {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
}

.apl-detail-icon {
    display: block;
    font-size: 24px;
    margin-bottom: 6px;
    color: #1a6b4a;
}

.apl-detail-label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apl-detail-value {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a2e;
}

/* ─── Features Grid ─── */
.apl-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.apl-feature-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.apl-feature-label {
    color: #666;
}

.apl-feature-value {
    font-weight: 600;
    color: #1a1a2e;
}

/* ─── Description ─── */
.apl-description {
    font-size: 15px;
    line-height: 1.8;
    color: #444;
}

.apl-description p {
    margin-bottom: 16px;
}

/* ─── Floor Plans Tabs ─── */
.apl-single-property .apl-tabs,
.apl-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.apl-single-property .apl-tabs .apl-tab,
.apl-floor-plans .apl-tab,
.apl-tabs .apl-tab,
button.apl-tab {
    padding: 12px 24px;
    background: none !important;
    background-color: transparent !important;
    border: none;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    font-family: inherit;
    outline: none;
    box-shadow: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    appearance: none;
    transition: color 0.2s, border-color 0.2s;
}

.apl-single-property .apl-tabs .apl-tab.active,
.apl-single-property .apl-tabs .apl-tab:hover,
.apl-single-property .apl-tabs .apl-tab:focus,
.apl-floor-plans .apl-tab.active,
.apl-floor-plans .apl-tab:hover,
.apl-floor-plans .apl-tab:focus,
button.apl-tab.active,
button.apl-tab:hover,
button.apl-tab:focus {
    color: #1a6b4a !important;
    border-bottom-color: #1a6b4a !important;
    background: none !important;
    background-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.apl-tab-content {
    display: none;
}

.apl-tab-content.active {
    display: block;
}

.apl-tab-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* ─── Virtual Tour ─── */
.apl-tour-embed iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 8px;
}

.apl-tour-link {
    display: inline-block;
    padding: 12px 30px;
    background: #1a6b4a;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s;
}

.apl-tour-link:hover {
    background: #145438;
    color: #fff;
}

/* ─── Location ─── */
.apl-address {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
}

.apl-location-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.apl-location-tag {
    display: inline-block;
    padding: 4px 12px;
    background: #e6f5ee;
    color: #1a6b4a;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
}

.apl-map iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 8px;
}

/* ─── Nearby Amenities ─── */
.apl-nearby-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.apl-nearby-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    font-size: 14px;
}

.apl-nearby-label {
    color: #555;
    font-weight: 500;
}

.apl-nearby-distance {
    color: #1a6b4a;
    font-weight: 600;
}

/* ─── Energy Performance ─── */
.apl-energy-chart {
    max-width: 500px;
    margin-bottom: 20px;
}

.apl-energy-bar {
    position: relative;
    padding: 8px 16px;
    margin-bottom: 4px;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: transform 0.2s;
}

.apl-energy-bar.active {
    transform: scaleX(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.apl-energy-indicator {
    font-size: 18px;
}

.apl-energy-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.apl-energy-stat {
    padding: 10px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

.apl-energy-stat strong {
    color: #1a1a2e;
}

/* ─── Similar Properties ─── */
.apl-similar-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .apl-details-grid,
    .apl-features-grid,
    .apl-nearby-grid,
    .apl-similar-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .apl-energy-details {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .apl-gallery-slide img {
        height: 300px;
    }
    .apl-property-title {
        font-size: 24px;
    }
    .apl-single-price {
        font-size: 24px;
    }
    .apl-title-section {
        flex-direction: column;
        gap: 16px;
    }
    .apl-details-grid,
    .apl-features-grid,
    .apl-nearby-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .apl-similar-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .apl-details-grid,
    .apl-features-grid,
    .apl-nearby-grid,
    .apl-similar-grid {
        grid-template-columns: 1fr;
    }
    .apl-gallery-slide img {
        height: 220px;
    }
}

/* ─── Inquiry Form ─── */
.apl-inquiry-wrap {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
}

.apl-inquiry-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.apl-inquiry-form {
    display: flex;
    flex-direction: column;
}

.apl-inquiry-field {
    margin-bottom: 14px;
}

.apl-inquiry-form input[type="text"],
.apl-inquiry-form input[type="email"],
.apl-inquiry-form input[type="tel"],
.apl-inquiry-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.apl-inquiry-form input[type="text"]:focus,
.apl-inquiry-form input[type="email"]:focus,
.apl-inquiry-form input[type="tel"]:focus,
.apl-inquiry-form textarea:focus {
    border-color: #1a6b4a;
}

.apl-inquiry-form textarea {
    resize: vertical;
    min-height: 100px;
}

.apl-inquiry-submit {
    width: 100%;
    padding: 14px;
    background: #1a6b4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.apl-inquiry-submit:hover {
    background: #145438;
}

.apl-inquiry-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apl-inquiry-status {
    display: none;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.apl-inquiry-success {
    background: #e6f5ee;
    color: #1a6b4a;
}

.apl-inquiry-error {
    background: #fce8e6;
    color: #d93025;
}

/* ─── Book a Viewing Button ─── */
.apl-viewing-btn {
    display: inline-block;
    margin-top: 14px;
    padding: 12px 26px;
    background: #1a6b4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.apl-viewing-btn:hover {
    background: #145438;
}

/* ─── Book a Viewing Modal ─── */
body.apl-modal-open {
    overflow: hidden;
}

.apl-viewing-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
}

.apl-viewing-modal.is-open {
    display: block;
}

.apl-viewing-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.apl-viewing-dialog {
    position: relative;
    z-index: 1;
    max-width: 460px;
    width: calc(100% - 40px);
    margin: 6vh auto 0;
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.apl-viewing-close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 34px;
    height: 34px;
    background: none;
    border: none;
    font-size: 26px;
    line-height: 1;
    color: #888;
    cursor: pointer;
}

.apl-viewing-close:hover {
    color: #333;
}

.apl-viewing-heading {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a2e;
}

.apl-viewing-sub {
    margin: 0 0 20px;
    font-size: 14px;
    color: #666;
}

.apl-viewing-form {
    display: flex;
    flex-direction: column;
}

.apl-viewing-field {
    margin-bottom: 14px;
}

.apl-viewing-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: #666;
}

.apl-viewing-form input[type="text"],
.apl-viewing-form input[type="email"],
.apl-viewing-form input[type="tel"],
.apl-viewing-form input[type="date"],
.apl-viewing-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
    color: #333;
    transition: border-color 0.2s;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.apl-viewing-form input:focus,
.apl-viewing-form textarea:focus {
    border-color: #1a6b4a;
}

.apl-viewing-form textarea {
    resize: vertical;
    min-height: 80px;
}

.apl-viewing-submit {
    width: 100%;
    padding: 14px;
    background: #1a6b4a;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.3s, opacity 0.3s;
    -webkit-appearance: none;
    appearance: none;
}

.apl-viewing-submit:hover {
    background: #145438;
}

.apl-viewing-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.apl-viewing-status {
    display: none;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.apl-viewing-success {
    background: #e6f5ee;
    color: #1a6b4a;
}

.apl-viewing-error {
    background: #fce8e6;
    color: #d93025;
}

/* Custom form shortcode (Contact Form 7, WPForms, etc.) inside the popup */
.apl-viewing-shortcode {
    margin-top: 4px;
}

.apl-viewing-shortcode input:not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]),
.apl-viewing-shortcode textarea,
.apl-viewing-shortcode select {
    width: 100%;
    box-sizing: border-box;
}
