/*
 * Styles for Single Unit Page
 */

/* --- Hero Section (Card Style) --- */
.unit-hero {
    background: #fff;
    overflow: hidden;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
    border-radius: 14px;
}

.unit-hero-image {
    width: 100%;
    height: auto;
}

.unit-hero-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.unit-hero-content {
    max-width: 1400px;
    width: 100%;
    padding: 1rem 2rem 0.2rem;
}

.unit-title-container {
    display: flex;
    flex-direction: column;
}

.unit-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
    color: #1a1a1a;
    line-height: 1.2;
}

.unit-info {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: start;
}

.unit-cluster-name {
    font-size: 0.95rem;
    color: #123456;
}

/* --- Unit Badges Container --- */
.unit-badges-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* Base Unit Badge Styles */
.unit-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: #f0f0f0;
    color: #333;
}

/* Quantity Badge Variants */
.unit-badge-quantity {
    background-color: #e0e0e0;
}

/* Low Stock (0-3 units) - Red */
.unit-badge-low-stock,
.unit-badge-sold-out {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
}

/* Medium Stock (4-9 units) - Yellow */
.unit-badge-medium-stock {
    background-color: #fef3c7 !important;
    color: #d97706 !important;
    border: 1px solid #fde68a !important;
}

/* High Stock (10+ units) - Green */
.unit-badge-high-stock {
    background-color: #d1fae5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}

/* SOLD OUT Special Styling */
.unit-badge-sold-out {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
    border: 1px solid #fecaca !important;
    font-weight: 700 !important;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    .unit-badges-container {
        gap: 6px;
    }

    .unit-badge {
        font-size: 11px;
        padding: 3px 10px;
    }
}

/* --- Button --- */
.contact-button {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.4rem;
    background-color: #e60000;
    color: #fff;
    font-weight: 600;
    padding: 0.8rem 1.6rem;
    border-radius: 6px;
    text-decoration: none;
    width: fit-content;
    transition: 0.2s all ease-in-out;
}

.contact-button:hover {
    background-color: #c00000;
    color: #ffff;
}

.contact-button i {
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .unit-hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1.2rem 1.5rem;
    }

    .unit-title {
        font-size: 1.5rem;
    }

    .unit-contact-button {
        width: 100%;
    }

    .unit-hero-image img {
        height: 200px;
    }
}

.unit-spec-container {
    display: grid;
    grid-template-columns: auto 1fr;
    width: 100%;
    padding: 0;
    column-gap: 1rem;
    margin-bottom: 1rem;
}

.unit-spec-item {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: subgrid;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid #f0f0f0;
}

.unit-spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #7c7c7c;
}

.spec-label svg {
    width: 20px;
    height: 20px;
    fill: #7c7c7c;
}

.spec-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #000;
    justify-self: start;
}

/* --- Main Layout --- */
.unit-container {
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

@media (min-width: 992px) {
    .unit-container {
        grid-template-columns: 340px 1fr;
        padding: 2rem 1rem;
    }
}

/* --- Sidebar Section --- */
.unit-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: sticky;
    top: 8rem;
    align-self: start;
}

.unit-sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: 6px;
    box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid #ccc;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
}

.cta-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 1rem;
    height: 100%;
}

.cta-title {
    padding-top: 5px;
    font-size: 1.25rem;
    line-height: 1.2;
    font-weight: 600;
    color: #192a3d;
    text-align: start;
    margin-bottom: 8px;
}

.cta-subtitle {
    font-size: 0.9rem;
    color: #4a5568;
    text-align: start;
    margin-bottom: 1rem;
}

.contact-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;          
    padding: 12px 20px;    
    border-radius: 6px;    
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none; 
    color: #ffffff;       
    box-sizing: border-box; 
    transition: all 0.3s ease;
    line-height: 1.5;
}


.contact-button svg {
    margin-right: 8px;
    fill: #ffffff;
    width: 20px;
    height: 20px;
}


.wa-button {
    background-color: #25D366;
    margin-bottom: 10px;      
}

.wa-button:hover {
    background-color: #1ebe5a; 
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.booking-button {
    background-color: #D32F2F; 
    margin-top: 0;             
}

.booking-button:hover {
    background-color: #b71c1c; 
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    display: flex;
    align-items: center;
    justify-content: start;
    font-weight: 600;
    font-size: 18px;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: #fff;
    background-color: #123456;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    text-align: start;
}

.sidebar-contents {
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0rem 1rem;
}

.sidebar-sub {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 0.8rem;
    color: #7c7c7c;
}

.sidebar-pt {
    font-weight: 400;
    font-size: 0.9rem;
    color: #1a202c;
}

@media (max-width: 986px) {
    .unit-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        width: 100%;
    }

    .unit-sidebar-info {
        width: 100%;
    }

    .class-map {
        height: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .unit-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        width: 100%;
    }

    .unit-sidebar {
        grid-template-columns: 1fr;
    }
}

/* --- Main Content Section --- */
.unit-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0 2rem;
    min-width: 0;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 0;
    color: #1a202c;
}

/* --- Gallery Section (Using dis-slider) --- */
.unit-gallery-section {
    margin-bottom: 2.5rem;
}

.dis-slider-wrapper {
    width: 100%;
    margin: 0;
    font-family:
        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.dis-slider-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 2px;
}

.dis-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #f2f4f6;
}

.dis-slide-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.6s ease-in-out,
        visibility 0.6s ease-in-out;
}

.dis-slide-image.active {
    opacity: 1;
    visibility: visible;
}

.dis-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    color: #1a202c;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.2s ease,
        transform 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.dis-nav-btn:hover {
    background-color: #ffffff;
    transform: translateY(-50%) scale(1.1);
}

.dis-prev-btn {
    left: 16px;
}
.dis-next-btn {
    right: 16px;
}

.dis-bottom-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 5;
    padding: 16px;
    box-sizing: border-box;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6) 0%, transparent 100%);
    pointer-events: none;
}

.dis-label-wrapper {
    position: relative;
    width: 100%;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.dis-slide-label {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.75);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease,
        visibility 0.4s;
    pointer-events: all;
}

.dis-slide-label.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dis-dots-wrapper {
    text-align: center;
    pointer-events: all;
}

.dis-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    margin: 0 4px;
    cursor: pointer;
    padding: 0;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease;
}

.dis-dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dis-dot.active {
    background-color: #e53e3e;
}

@media (max-width: 767px) {
    .dis-nav-btn {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    .dis-prev-btn {
        left: 10px;
    }
    .dis-next-btn {
        right: 10px;
    }
    .dis-image-wrapper {
        aspect-ratio: 4 / 3;
    }
}

/* --- About Section --- */
.unit-about-section {
    border-radius: 6px;
    box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.2);
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding: 0.8rem 1.2rem;
}

.unit-description p {
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 1rem;
}

.unit-description p:last-child {
    margin-bottom: 0;
    color: #7c7c7c;
}

/* --- Facilities Section --- */
.unit-facility-section {
    margin-top: 2.5rem;
}

.unit-facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.8rem;
}

.facility-card {
    text-align: start;
    background: #f9fafb;
    padding: 2rem 2.5rem;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.facility-card:hover {
    background: #ffffff;
    border-color: #d1d5db;
}

.facility-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    color: #1a202c;
}

.facility-card p {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.facility-description {
    font-size: 0.75rem !important;
    color: #828282 !important;
}

/* --- Responsive Design --- */
@media (max-width: 991px) {
    .unit-container {
        gap: 1rem;
        grid-template-columns: 1fr;
    }

    .unit-content {
        padding: 0;
    }

    .unit-sidebar {
        order: 1;
        position: relative;
        top: 0;
    }

    .unit-info-box {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 700px) {
    .unit-container {
        padding: 1.5rem 1rem;
    }

    .unit-content {
        padding: 0px;
    }

    .section-title {
        font-size: 1.25rem;
    }

    .unit-facility-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Accessibility Section --- */
.cluster-accessibility-section {
    margin-top: 2.5rem;
    margin-bottom: 2.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.accessibility-tabs {
    display: flex;
    flex-direction: column;
}

.accessibility-tab-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
    border-bottom: 2px solid #e5e7eb;
}

.accessibility-tab {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-weight: 500;
    color: #4b5563;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.accessibility-tab:hover {
    color: #1a202c;
}

.accessibility-tab.active {
    color: #123456;
    border-bottom-color: #123456;
}

.accessibility-tab-content {
    margin-top: 1rem;
}

.accessibility-panel {
    display: none;
}

.accessibility-panel.active {
    display: block;
}

.access-list {
    list-style: disc;
    margin-left: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
}
