/* Container chính */
.rpp-room-page-container {
    display: flex;
    justify-content: center; /* Căn giữa nội dung */
    gap: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    margin: 20px 0;
    max-width: 1200px; /* Giới hạn chiều rộng tối đa */
    width: 100%;
}

/* Cột bên trái: Hình ảnh căn phòng */
.rpp-room-image {
    flex: 2;
    background: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.rpp-room-image-layers {
    position: relative;
    display: block;
    width: 100%;
}
#rpp-room-base-image,
.rpp-room-image-layer {
    width: 100%;
    height: auto;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}
#rpp-room-base-image {
    position: relative;
    z-index: 1;
}
.rpp-room-image-layer {
    z-index: 2;
}
.rpp-clickable-point {
    position: absolute;
    padding: 6px 12px;
    background: #FFFFFF;
    border: 2px solid #4A90E2;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    z-index: 10;
    white-space: nowrap;
}
.rpp-clickable-point:hover {
    background: #4A90E2;
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
.rpp-clickable-point.active {
    background: #4A90E2;
    color: #FFFFFF;
    border-color: #2E6DA4;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}

/* Controls cho xem và tải ảnh */
.rpp-image-controls {
    padding: 10px;
    text-align: center;
}
.rpp-view-room, .rpp-download-room, .rpp-back {
    padding: 8px 16px;
    margin: 0 5px;
    background: #4A90E2;
    color: #FFFFFF;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s ease;
}
.rpp-view-room:hover, .rpp-download-room:hover, .rpp-back:hover {
    background: #2E6DA4;
}
.rpp-back {
    display: none;
}

/* Cột bên phải: Danh sách danh mục và sản phẩm */
.rpp-product-list {
    flex: 1;
    background: #F5F5F5;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.rpp-product-list h3 {
    margin: 0 0 15px;
    font-size: 18px;
    color: #333;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 10px;
}
#rpp-category-list {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rpp-category-link {
    display: inline-block;
    padding: 8px 14px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
    text-decoration: none;
    transition: all 0.2s ease;
}
.rpp-category-link:hover {
    background: #4A90E2;
    color: #FFFFFF;
    border-color: #4A90E2;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.rpp-category-link.active {
    background: #4A90E2;
    color: #FFFFFF;
    border-color: #2E6DA4;
    font-weight: 500;
}
#rpp-loading {
    display: none;
    text-align: center;
    padding: 20px;
}
.rpp-spinner {
    width: 30px;
    height: 30px;
    border: 4px solid #E0E0E0;
    border-top: 4px solid #4A90E2;
    border-radius: 50%;
    animation: rpp-spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes rpp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
#rpp-loading p {
    margin: 10px 0 0;
    font-size: 14px;
    color: #666;
}
.rpp-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}
.rpp-product-item {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}
.rpp-product-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    border-color: #4A90E2;
}
.rpp-product-item.active {
    border-color: #4A90E2;
    box-shadow: 0 0 8px rgba(74, 144, 226, 0.3);
}
.rpp-product-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
    transition: transform 0.2s ease;
}
.rpp-product-item:hover img {
    transform: scale(1.05);
}
.rpp-product-item span {
    display: block;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

/* Style cho danh sách liên kết phòng trong shortcode */
.rpp-related-rooms {
    margin-top: 20px;
}
.rpp-related-rooms h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #333;
}
.rpp-related-rooms ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.rpp-related-rooms li {
    margin-bottom: 8px;
}
.rpp-related-rooms a {
    color: #4A90E2;
    text-decoration: none;
    transition: color 0.2s ease;
}
.rpp-related-rooms a:hover {
    color: #2E6DA4;
    text-decoration: underline;
}

/* Style cho danh sách các phòng liên quan trong trang room */
.rpp-related-rooms-grid {
    margin: 40px 0;
    max-width: 1200px;
    width: 100%;
}
.rpp-related-rooms-grid h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
    border-bottom: 1px solid #E0E0E0;
    padding-bottom: 10px;
}
.rpp-related-rooms-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cột */
    gap: 20px;
}
.rpp-related-room-item {
    display: block;
    text-decoration: none;
    background: #FFFFFF;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.rpp-related-room-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}
.rpp-related-room-item img {
    width: 400px;
    height: 300px;
    object-fit: cover;
    display: block;
}
.rpp-related-room-item h4 {
    margin: 10px;
    font-size: 14px;
    color: #333;
    text-align: center;
    line-height: 1.4;
}

/* Style cho danh sách rooms trong meta box */
.rpp-rooms-list-ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.rpp-rooms-list-ul li {
    padding: 5px 10px;
    border-bottom: 1px solid #eee;
}
.rpp-rooms-list-ul li:last-child {
    border-bottom: none;
}
.rpp-rooms-list-ul label {
    display: flex;
    align-items: center;
    font-size: 14px;
}
.rpp-rooms-list-ul input[type="checkbox"] {
    margin-right: 8px;
}

/* Responsive Design */

/* Máy tính bảng (768px - 1024px) */
@media (max-width: 1024px) {
    .rpp-room-page-container {
        flex-direction: column;
        gap: 15px;
        max-width: 100%; /* Chiếm toàn bộ chiều rộng */
        padding: 0 15px; /* Thêm padding để tránh sát lề */
    }
    .rpp-room-image,
    .rpp-product-list {
        flex: none;
        width: 100%;
    }
    .rpp-room-image {
        max-width: 100%;
    }
    .rpp-clickable-point {
        padding: 5px 10px;
        font-size: 13px;
        border-radius: 18px;
    }
    .rpp-product-list {
        padding: 15px;
    }
    .rpp-product-list h3 {
        font-size: 16px;
    }
    .rpp-category-link {
        padding: 6px 12px;
        font-size: 13px;
    }
    .rpp-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 12px;
    }
    .rpp-product-item img {
        height: 90px;
    }
    .rpp-product-item span {
        font-size: 12px;
    }
    .rpp-related-rooms h3 {
        font-size: 16px;
    }
    .rpp-related-rooms li {
        font-size: 14px;
    }
    .rpp-related-rooms-grid {
        padding: 0 15px;
        max-width: 100%;
    }
    .rpp-related-rooms-items {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên tablet */
        gap: 15px;
    }
    .rpp-related-room-item img {
        width: 400px;
        height: 300px;
    }
    .rpp-related-room-item h4 {
        font-size: 13px;
        margin: 8px;
    }
}

/* Mobile (dưới 768px) */
@media (max-width: 767px) {
    .rpp-room-page-container {
        flex-direction: column;
        gap: 10px;
        margin: 10px 0;
        padding: 0 10px;
        max-width: 100%;
    }
    .rpp-room-image,
    .rpp-product-list {
        flex: none;
        width: 100%;
    }
    .rpp-room-image {
        max-width: 100%;
        border-radius: 6px;
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    }
    .rpp-clickable-point {
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 16px;
        border-width: 1px;
    }
    .rpp-product-list {
        padding: 10px;
        border-radius: 6px;
    }
    .rpp-product-list h3 {
        font-size: 14px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }
    #rpp-category-list {
        gap: 6px;
    }
    .rpp-category-link {
        padding: 5px 10px;
        font-size: 12px;
        border-radius: 16px;
    }
    .rpp-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    .rpp-product-item {
        padding: 8px;
        border-radius: 6px;
    }
    .rpp-product-item img {
        height: 80px;
        border-radius: 3px;
    }
    .rpp-product-item span {
        font-size: 11px;
        line-height: 1.3;
    }
    #rpp-loading {
        padding: 15px;
    }
    .rpp-spinner {
        width: 24px;
        height: 24px;
        border-width: 3px;
    }
    #rpp-loading p {
        font-size: 12px;
    }
    .rpp-related-rooms {
        margin-top: 15px;
    }
    .rpp-related-rooms h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }
    .rpp-related-rooms li {
        font-size: 13px;
        margin-bottom: 6px;
    }
    .rpp-related-rooms a {
        font-size: 13px;
    }
    .rpp-related-rooms-grid {
        margin: 20px 0;
        padding: 0 10px;
        max-width: 100%;
    }
    .rpp-related-rooms-items {
        grid-template-columns: repeat(2, 1fr); /* 2 cột trên mobile */
        gap: 10px;
    }
    .rpp-related-room-item img {
        width: 100%;
        height: auto;
        aspect-ratio: 4/3; /* Đảm bảo tỷ lệ 400/300 */
    }
    .rpp-related-room-item h4 {
        font-size: 12px;
        margin: 6px;
    }
    .rpp-image-controls {
        padding: 8px;
        text-align: center;
    }
    .rpp-view-room, .rpp-download-room, .rpp-back {
        padding: 6px 12px;
        margin: 0 3px;
        font-size: 12px;
    }
}