.property-selection {
    padding: 15px 20px;
    /* background-color: #f9f9f9; Removed to allow body background to show */
}

/* Wrapper for Cottages and Apartments to display side by side, aligned with Hotels above */
#cottages-apartments-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    /* Account for Hotels section padding (20px each side) */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    /* Match Hotels section horizontal padding */
}

#cottages-apartments-wrapper>div {
    flex: 1 1 calc(50% - 15px);
    min-width: 300px;
}

#cottages-apartments-wrapper .property-selection {
    width: 100%;
    padding: 15px 0;
    /* Remove horizontal padding to match Hotels grid width */
}

/* Ensure Cottages and Apartments grids match Hotels grid sizing */
#cottages-apartments-wrapper .hotel-grid {
    max-width: 100%;
    gap: 0;
}

/* Override single-item-grid styling for Cottages and Apartments to match Hotels card width */
#cottages-apartments-wrapper .hotel-grid.single-item-grid {
    justify-items: stretch;
}

#cottages-apartments-wrapper .hotel-grid.single-item-grid .property-box {
    width: 100%;
    max-width: 100%;
}

.property-selection h2 {
    text-align: center;
    font-size: 2rem;
    margin-top: 0;
    margin-bottom: 2px;
    color: #1a202c;
}

.hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}

/* Styling for messages within empty grids */
.loading-placeholder,
.no-properties-message,
.error,
.loading {
    text-align: center;
    grid-column: 1 / -1;
    color: #666;
    padding: 20px;
    font-style: italic;
}

.error {
    color: #FF007A;
    font-weight: 600;
}

.property-box {
    background-color: rgba(255, 255, 255, 0.95);
    /* Slightly transparent to show background */
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding-bottom: 6px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.property-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

.property-box img {
    width: 100%;
    height: 320px;
    object-fit: cover;
    display: block;
}

/* New: Style the Swiper container within the property-box */
.property-box .swiper {
    width: 100%;
    height: 320px;
    border-radius: 8px 8px 0 0;
    margin-bottom: 5px;
    overflow: hidden;
    position: relative;
}

/* Leased Out banner styling */
.property-box .leased-out-banner {
    position: absolute;
    top: 20px;
    left: -40px;
    transform: rotate(-45deg);
    background-color: rgba(255, 152, 0, 0.85);
    /* Orange color for leased out */
    color: white;
    padding: 5px 45px 5px 35px;
    font-size: 0.8rem;
    font-weight: 700;
    z-index: 10;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.property-box .swiper-wrapper {
    overflow: hidden;
}

.property-box .swiper-slide {
    overflow: hidden;
}

.property-box .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ensure content below image has consistent padding */
.property-box h3,
.property-box p,
.property-box .room-price {
    padding: 0 20px;
    margin-bottom: 2px;
}

.property-box h3 {
    font-size: 1.25rem;
    margin-top: 3px;
    margin-bottom: 2px;
}

.property-box p {
    font-size: 0.88rem;
    line-height: 1.3;
    color: #4a5568;
    margin-bottom: 3px;
}

.property-box .room-price {
    font-weight: normal;
    color: #718096;
    /* Changed to grey */
    font-size: 0.78rem;
    /* Smaller font size */
    margin-bottom: 3px;
    text-align: right;
    /* Align to the right */
}

/* Single property styling - 70% width and centered */
.hotel-grid.single-item-grid {
    justify-items: center;
}

.hotel-grid.single-item-grid .property-box {
    width: 70%;
    max-width: 700px;
}

.details-link {
    display: inline-block;
    margin: 0 20px 20px 20px;
    color: #FF007A;
    text-decoration: none;
    font-weight: 600;
    align-self: flex-start;
}

.details-link:hover {
    text-decoration: underline;
}

/* Specific styling for "Book Now" button on property detail page, which is also .select-room-button */
.select-room-button {
    background-color: #FF007A;
    color: white !important;
    border: none;
    padding: 12px 20px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: block;
    width: calc(100% - 40px);
    margin: 0 20px 0 20px;
    text-align: center;
    align-self: center;
    text-decoration: none;
}

.select-room-button:hover {
    background-color: #e6006e;
}

.view-details-link {
    color: #FF007A !important;
    /* Pink color */
    text-decoration: none !important;
    /* Remove underline */
    font-weight: 600;
    /* Make it bold as in the example */
    display: inline-flex;
    /* Use flexbox to align text and arrow */
    align-items: center;
    gap: 5px;
    /* Space between text and arrow */
    padding: 5px 20px 5px 20px !important;
    /* Adjusted left padding to align with other text */
}

.view-details-link::after {
    content: '→';
    /* Unicode right arrow */
    font-size: 1.2em;
    /* Adjust arrow size */
    transition: transform 0.2s ease-in-out;
}

.view-details-link:hover::after {
    transform: translateX(5px);
    /* Move arrow slightly on hover */
}

/* ============================================
   RESPONSIVE BREAKPOINTS:
   - Laptop: 1441px and above (MacBook Air 13-inch and larger)
   - Tablet: 441px - 1440px
   - Mobile: 440px and below (Pixel 10 Pro XL and smaller)
   ============================================ */

/* Tablet styles (769px - 1440px) */
@media (max-width: 1440px) and (min-width: 769px) {
    .property-selection {
        padding: 12px 20px;
    }

    .property-selection h2 {
        font-size: 1.8rem;
    }

    .hotel-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 25px;
    }
}

/* Mobile styles (768px and below) */
@media (max-width: 768px) {
    .property-selection {
        padding: 12px 0;
    }

    .property-selection h2 {
        font-size: 1.6rem;
        margin-bottom: 2px;
        padding: 0 15px;
    }

    /* Force single column layout on mobile/small tablets */
    .hotel-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px;
    }

    /* Stack Cottages and Apartments vertically */
    #cottages-apartments-wrapper {
        flex-direction: column;
        padding: 0;
        /* Remove horizontal padding on mobile */
        width: 100%;
        /* Ensure full width */
    }

    #cottages-apartments-wrapper>div {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .property-box h3 {
        font-size: 1.2rem;
    }

    .property-box p {
        font-size: 0.9rem;
    }

    /* Ensure ALL property boxes take full width on mobile */
    .hotel-grid .property-box {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Ensure single properties take full width on mobile */
    .hotel-grid.single-item-grid {
        justify-items: stretch;
    }

    .hotel-grid.single-item-grid .property-box {
        width: 100%;
        max-width: 100%;
    }
}

/* Leased Out Modal Styles */
.leased-out-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
    backdrop-filter: blur(2px);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.leased-out-modal-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    text-align: center;
    position: relative;
}

.leased-out-modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.leased-out-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 1rem 0;
}

.leased-out-modal-message {
    font-size: 1rem;
    color: #4a5568;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
}

.leased-out-modal-button {
    background-color: #FF007A;
    color: white;
    border: none;
    padding: 12px 32px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 120px;
}

.leased-out-modal-button:hover {
    background-color: #e6006e;
    transform: translateY(-1px);
}

.leased-out-modal-button:active {
    transform: translateY(0);
}