/* Push the footer to the bottom of the viewport even on short pages,
   without depending on theme CSS (scoped via :has() so it only applies
   when this page's wrapper is actually present, despite this stylesheet
   loading site-wide). */
body:has(.sc-property-page) {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sc-property-page {
    flex: 1 0 auto;
}

.sc-property-single {
    display: flex;
    align-items: flex-start;
    gap: 32px;
}

/* ── Left column ── */
.sc-property-main {
    flex: 2;
    min-width: 0;
    max-width: 100%;
}

/* ── Gallery ── */
.sc-property-gallery {
    border-radius: 8px;
    overflow: hidden;
}

.sc-gallery-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.sc-gallery-main-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

/* Top bar */
.sc-gallery-top-bar {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 14px;
    z-index: 3;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
}

.sc-gallery-badge-360 {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--sc-primary, #2271b1);
    color: #fff;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    line-height: 1;
    gap: 3px;
    flex-shrink: 0;
}

.sc-gallery-caption {
    flex: 1;
    text-align: center;
    color: #fff;
    font-size: 0.9rem;
    padding: 4px 16px 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.sc-gallery-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sc-primary, #2271b1);
    color: #fff;
    border-radius: 6px;
    padding: 8px 10px;
    text-decoration: none;
    flex-shrink: 0;
}

/* Virtual tour CTA */
.sc-gallery-tour-cta {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
    z-index: 2;
    pointer-events: auto;
}

.sc-gallery-tour-cta:hover {
    color: white !important;
}

.sc-gallery-tour-label {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
}

.sc-gallery-play-btn {
    width: 68px;
    height: 68px;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(2px);
    padding-left: 4px;
}

/* Bottom info overlay */
.sc-gallery-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 48px 20px 18px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.65) 0%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.sc-gallery-property-name {
    font-size: 1.7rem;
    font-weight: 700;
    margin: 0 0 5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.sc-gallery-property-stats {
    font-size: 0.9rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Thumbnails */
.sc-gallery-thumbs {
    display: flex;
    flex-wrap: nowrap;
    gap: 3px;
    margin-top: 3px;
    overflow-x: auto;
    min-width: 0;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sc-gallery-thumbs::-webkit-scrollbar {
    display: none;
}

.sc-gallery-thumbs.sc-grabbing {
    cursor: grabbing;
}

.sc-gallery-thumb {
    flex: 0 0 150px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.sc-gallery-thumb img {
    width: 100%;
    height: 90px;
    object-fit: cover;
    display: block;
    transition: opacity 0.2s;
    pointer-events: none;
}

.sc-gallery-thumb:hover img {
    opacity: 0.8;
}

.sc-gallery-thumb.sc-thumb-active img {
    opacity: 0.6;
}

/* ── Header ── */
.sc-property-header {
    margin-top: 24px;
}

.sc-property-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 6px;
}

.sc-property-location {
    color: #666;
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.sc-property-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 4px;
}

.sc-badge {
    display: inline-block;
    background: #f0f4f8;
    color: #444;
    font-size: 0.8rem;
    padding: 3px 10px;
    border-radius: 20px;
}

/* ── Details bar ── */
.sc-property-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    margin-top: 20px;
}

.sc-detail-item {
    flex: 1;
    min-width: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px;
    border-right: 1px solid #e5e7eb;
    text-align: center;
}

.sc-detail-item:last-child {
    border-right: none;
}

.sc-detail-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.sc-detail-value {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
}

/* ── Shared section card ── */
.sc-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}

.sc-section-body {
    line-height: 1.7;
    color: #444;
    font-size: 0.95rem;
    overflow: scroll;
}

.sc-section-body p {
    margin-bottom: 1em;
}

.sc-section-body p:last-child {
    margin-bottom: 0;
}

/* ── Description ── */
.sc-property-description {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

/* ── Room Details ── */
.sc-property-room-details {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.sc-property-room-details table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    margin-bottom: 20px;
}

.sc-property-room-details table:last-child {
    margin-bottom: 0;
}

.sc-property-room-details th {
    background: #f0f4f8;
    color: #444;
    font-weight: 600;
    padding: 8px 10px;
    text-align: left;
    border: 1px solid #e5e7eb;
}

.sc-property-room-details td {
    padding: 7px 10px;
    border: 1px solid #e5e7eb;
    color: #555;
    vertical-align: top;
}

.sc-property-room-details tr:nth-child(even) td {
    background: #fafafa;
}

/* ── Amenities ── */
.sc-property-amenities {
    margin-top: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 24px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.04);
}

.sc-amenity-groups {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.sc-amenity-group-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    margin: 0 0 8px;
}

.sc-amenity-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sc-amenity-list li {
    font-size: 0.9rem;
    color: #555;
    padding-left: 14px;
    position: relative;
}

.sc-amenity-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #2e86ab;
    font-size: 0.8rem;
}

/* ── Right column: sidebar ── */
.sc-property-sidebar {
    flex: 1;
    min-width: 0;
    align-self: stretch;
}

.sc-property-sidebar-inner {
    position: sticky;
    top: 100px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 24px;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sc-sidebar-rating-badge {
    display: inline-flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
    background: #f59e0b;
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    margin-top: 4px;
    margin-bottom: 12px;
}

.sc-sidebar-rating-stars {
    display: flex;
    align-items: center;
    gap: 1px;
}

.sc-star {
    fill: rgba(255, 255, 255, 0.35);
}

.sc-star-filled {
    fill: #fff;
}

.sc-sidebar-rating-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1;
}

.sc-sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.3;
}

.sc-sidebar-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.sc-sidebar-stats span {
    font-size: 0.85rem;
    background: #f0f4f8;
    padding: 4px 10px;
    border-radius: 20px;
    color: #333;
}

.sc-sidebar-times {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    margin-bottom: 20px;
}

.sc-sidebar-time {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.sc-sidebar-time-label {
    color: #888;
}

.sc-sidebar-time-value {
    font-weight: 600;
    color: #222;
}

/* ── Sidebar booking widget ── */
.sc-sidebar-booking {
    margin-top: 20px;
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sc-sb-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sc-sb-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sc-sb-daterange {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #222;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}

.sc-sb-daterange:focus {
    outline: none;
    border-color: #2e86ab;
}

.sc-sb-counters {
    display: flex;
    gap: 12px;
}

.sc-sb-counters .sc-sb-field {
    flex: 1;
}

.sc-sb-counter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    gap: 8px;
}

.sc-sb-counter span {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    min-width: 20px;
    text-align: center;
}

.sc-sb-counter-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #2e86ab;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.sc-sb-counter-btn:hover:not(:disabled) {
    color: #256f8e;
}

.sc-sb-counter-btn:disabled {
    color: #ccc;
    cursor: not-allowed;
}

.sc-sb-check-btn {
    width: 100%;
    padding: 12px;
    background: var(--sc-primary, #2271b1);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: filter 0.2s;
}

.sc-sb-check-btn:hover:not(:disabled) {
    filter: brightness(0.85);
}

.sc-sb-check-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sc-sb-call-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #3da66c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}

.sc-sb-call-btn:hover {
    background: #358e5d;
    color: #fff;
}

.sc-sb-reserve-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--sc-primary, #2271b1);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: filter 0.2s;
    box-sizing: border-box;
}

.sc-sb-reserve-btn:hover:not(:disabled) {
    filter: brightness(0.85);
}

.sc-sb-reserve-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sc-sb-reserve-note {
    margin: 6px 0 0;
    font-size: 0.8rem;
    color: #777;
    text-align: center;
}

/* Price breakdown (online-checkout properties), mirrors the checkout page's order summary rows */
.sc-sb-price-breakdown {
    font-size: 0.9rem;
    margin-top: 12px;
}

.sc-sb-price-breakdown .sc-order-summary-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 14px 0;
}

.sc-sb-price-breakdown .sc-order-summary-total-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 1rem;
}

.sc-sb-price-breakdown .sc-order-summary-total-label {
    color: #333;
}

.sc-sb-price-breakdown .sc-order-summary-total-value {
    font-weight: 400;
    color: #222;
}

.sc-sb-price-breakdown .sc-order-summary-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #333;
    text-align: left;
}

.sc-sb-price-breakdown .sc-order-summary-toggle-right {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #222;
}

.sc-sb-price-breakdown .sc-order-summary-chevron {
    fill: #999;
    transition: transform 0.2s ease;
}

.sc-sb-price-breakdown .sc-order-summary-toggle-expanded .sc-order-summary-chevron {
    transform: rotate(180deg);
}

.sc-sb-price-breakdown .sc-order-summary-expand-content {
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.sc-sb-price-breakdown .sc-order-summary-expand-content:not([hidden]) {
    display: flex;
}

.sc-sb-price-breakdown .sc-order-summary-fee-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #777;
    padding-left: 4px;
}

.sc-sb-price-breakdown .sc-order-summary-total-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #e9eaea;
    border-radius: 8px;
    padding: 14px 16px;
    margin-top: 20px;
}

.sc-sb-price-breakdown .sc-order-summary-total-box-label,
.sc-sb-price-breakdown .sc-order-summary-total-box-value {
    font-weight: 700;
    font-size: 1rem;
    color: #222;
}

.sc-sb-message {
    font-size: 0.85rem;
    line-height: 1.5;
    padding: 10px 12px;
    border-radius: 6px;
    text-align: center;
}

.sc-sb-msg-error {
    background: #fff3f3;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

.sc-sb-msg-success {
    background: #f0faf4;
    color: #1a7a45;
    border: 1px solid #b8e6ca;
}

.sc-sidebar-tour-btn {
    display: block;
    text-align: center;
    background: var(--sc-primary, #2271b1);
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 8px;
    transition: filter 0.2s;
}

.sc-sidebar-tour-btn:hover {
    filter: brightness(0.85);
    color: #fff;
}

/* ── Virtual Tour Modal ── */
.sc-tour-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
}

.sc-tour-modal.sc-tour-open {
    display: block;
}

.sc-tour-modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.6);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    padding: 4px 10px;
    cursor: pointer;
    border-radius: 4px;
}

.sc-tour-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* ── Lightbox ── */
.sc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.93);
    z-index: 99999;
    flex-direction: column;
}

.sc-lightbox.sc-lightbox-open {
    display: flex;
}

.sc-lightbox-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 60px;
    position: relative;
    flex-shrink: 0;
}

.sc-lightbox-caption {
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
}

.sc-lightbox-close {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 6px 10px;
}

.sc-lightbox-stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0 24px;
    min-height: 0;
}

.sc-lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
}

.sc-lightbox-thumbs-wrap {
    flex-shrink: 0;
    padding: 14px 0;
}

.sc-lightbox-thumbs {
    display: flex;
    gap: 3px;
    overflow-x: auto;
    cursor: grab;
    user-select: none;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 0 14px;
}

.sc-lightbox-thumbs::-webkit-scrollbar {
    display: none;
}

.sc-lightbox-thumbs.sc-grabbing {
    cursor: grabbing;
}

.sc-lightbox-thumb {
    flex: 0 0 100px;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.sc-lightbox-thumb:hover {
    opacity: 0.8;
}

.sc-lightbox-thumb.sc-lb-active {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.sc-lightbox-thumb img {
    width: 100%;
    height: 68px;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .sc-property-single {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .sc-property-main,
    .sc-property-sidebar {
        width: 100%;
        flex: none;
        min-width: 0;
    }

    /* Move sidebar above description/amenities by rendering it first visually */
    .sc-property-sidebar {
        order: -1;
        margin-bottom: 24px;
    }

    .sc-property-sidebar-inner {
        position: static;
        border-radius: 8px;
    }

    .sc-gallery-main-img {
        height: 260px;
    }

    .sc-gallery-tour-label {
        font-size: 1.4rem;
    }

    .sc-gallery-thumb {
        flex: 0 0 110px;
    }

    .sc-amenity-groups {
        grid-template-columns: 1fr;
    }

    .sc-property-details {
        flex-wrap: wrap;
    }

    .sc-detail-item {
        flex: 1 1 45%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .sc-detail-item:last-child {
        border-bottom: none;
    }
}
