/* Apartment Details Page Styles */
.apartment-details-page {
    padding: 2rem 0;
}

.apartment-details-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 2rem;
    align-items: start;
}

/* Main Content */
.apartment-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Image Gallery */
.apartment-gallery {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.gallery-main-image-container {
    position: relative;
    width: 100%;
    background: #f0f0f0;
    overflow: hidden;
}

.gallery-main-image-container img {
    width: 100%;
    height: auto;
    display: block;
    max-height: 600px;
    object-fit: cover;
}

.gallery-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 2;
}

.gallery-nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-prev {
    right: 15px;
}

.gallery-next {
    left: 15px;
}

.gallery-thumbnails {
    display: flex;
    gap: 0.8rem;
    padding: 1rem;
    background: #f8f9fa;
    overflow-x: auto;
}

.thumbnail {
    flex: 0 0 100px;
    height: 75px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.thumbnail:hover {
    opacity: 0.8;
    border-color: #D4AF37;
}

.thumbnail.active {
    border-color: #D4AF37;
    opacity: 1;
}

/* Info Sections */
.info-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Basic Information */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.info-label {
    font-weight: 600;
    color: #666;
}

.info-value {
    color: #333;
    font-weight: 500;
}

/* Description */
.description-text {
    color: #555;
    line-height: 1.8;
    font-size: 1rem;
}

/* Details Cards */
.details-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.detail-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s;
}

.detail-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.detail-card i {
    font-size: 2rem;
    color: #19335c;
}

.detail-content {
    flex: 1;
}

.detail-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.3rem;
}

.detail-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

/* Amenities List */
.amenities-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.amenity-item i {
    font-size: 1.3rem;
    color: #19335c;
    width: 30px;
    text-align: center;
}

.amenity-name {
    flex: 1;
    font-weight: 600;
    color: #333;
}

.amenity-status {
    color: #666;
    font-size: 0.9rem;
}

/* Video Container — Plyr drives layout for uploaded / YouTube media */
.video-container {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.video-container--plyr > .plyr,
.video-container--plyr > [id^="plyr-"] {
    border-radius: 8px;
}

.video-container--plyr .plyr__video-wrapper,
.video-container--plyr iframe {
    border: none !important;
}

.video-container:has(.video-placeholder) {
    aspect-ratio: 16 / 9;
    min-height: 200px;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    background: #1a1a1a;
}

.video-placeholder i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ff0000;
}

/* Rules List */
.rules-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 100%;
    min-width: 0;
}

.rules-list li {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 4px solid #19335c;
    color: #555;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

/* Admin Restrictions */
.admin-restrictions-section {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    background: #fff8f0;
    border: 1px solid #f5c28b;
    border-right: 6px solid #c0392b;
    box-shadow: 0 10px 26px rgba(192, 57, 43, 0.12);
    overflow: hidden;
}

.admin-restrictions-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.2rem;
    min-width: 0;
}

.admin-restrictions-icon {
    width: 46px;
    height: 46px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 46px;
    background: #c0392b;
    color: #fff;
    font-size: 1.25rem;
}

.admin-restrictions-section .section-title {
    margin-bottom: 0.45rem;
    padding-bottom: 0;
    border-bottom: 0;
    color: #8f241b;
    overflow-wrap: anywhere;
}

.admin-restrictions-tag {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0.25rem 0.7rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #f0b27a;
    color: #9a3412;
    font-size: 0.85rem;
    font-weight: 700;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.admin-restrictions-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.7rem;
    max-width: 100%;
    min-width: 0;
}

.admin-restrictions-list li {
    position: relative;
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    padding: 0.95rem 1.1rem 0.95rem 1rem;
    background: #fff;
    border: 1px solid #f3d1ad;
    border-radius: 8px;
    color: #4a1f16;
    font-weight: 700;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
}

.admin-restrictions-list li::before {
    content: "";
    position: absolute;
    right: 0;
    top: 0.9rem;
    bottom: 0.9rem;
    width: 4px;
    border-radius: 999px;
    background: #c0392b;
}

/* Warning Section */
.warning-section {
    background: #fff3e0;
    border-right: 4px solid #ff9800;
}

.warning-section .section-title {
    color: #e65100;
    border-bottom-color: #ffe0b2;
}

.warning-text {
    color: #555;
    line-height: 1.8;
    margin: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Booking Button */
.booking-button-section {
    text-align: center;
    margin-top: 1rem;
}

.book-now-button {
    background: linear-gradient(135deg, #19335c 0%, #2176ff 100%);
    color: white;
    border: none;
    padding: 1.2rem 3rem;
    border-radius: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.4s;
    box-shadow: 0 6px 20px rgba(25, 51, 92, 0.3);
    min-width: 250px;
}

.book-now-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(25, 51, 92, 0.4);
    background: linear-gradient(135deg, #0a2342 0%, #19335c 100%);
}

.book-now-button i {
    font-size: 1.4rem;
}

/* Sidebar */
.apartment-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Price Details */
.price-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-row:last-child {
    border-bottom: none;
}

.price-label {
    color: #666;
    font-size: 0.95rem;
}

.price-value {
    color: #333;
    font-weight: 600;
    font-size: 1rem;
}

.price-total-row {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: none;
}

.price-total-row .price-value {
    color: #19335c;
    font-size: 1.1rem;
    font-weight: 700;
}

.price-vat-row {
    padding: 0.6rem 0;
}

.price-final-row {
    background: #f0f4f8;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    border: none;
}

.price-final-row .price-value {
    color: #19335c;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Share Buttons */
.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.share-btn {
    padding: 0.8rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.3s;
    font-size: 0.9rem;
    color: white;
}

.share-facebook {
    background: #1877f2;
}

.share-facebook:hover {
    background: #155db1;
    transform: translateY(-2px);
}

.share-whatsapp {
    background: #25d366;
}

.share-whatsapp:hover {
    background: #1eab52;
    transform: translateY(-2px);
}

.share-telegram {
    background: #0088cc;
}

.share-telegram:hover {
    background: #006ba3;
    transform: translateY(-2px);
}

.share-link {
    background: #6c757d;
}

.share-link:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 992px) {
    .apartment-details-layout {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .apartment-main-content {
        display: contents;
        order: 1;
        min-width: 0;
    }

    .apartment-sidebar {
        display: contents;
        position: static;
        order: 2;
        width: 100%;
        max-width: 100%;
    }

    .apartment-main-content > *,
    .apartment-sidebar > * {
        order: 20;
    }

    .apartment-gallery {
        order: 1;
    }

    .basic-info-section {
        order: 2;
    }

    .apartment-description-section {
        order: 3;
    }

    .room-bed-section {
        order: 4;
    }

    .price-details-card {
        order: 5;
    }

    .share-apartment-card {
        order: 99;
    }

    .share-buttons {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .apartment-details-page {
        width: min(100%, calc(100vw - 1rem));
        padding: 0.75rem 0 1.25rem;
        overflow-x: hidden;
    }

    .apartment-details-layout {
        gap: 1rem;
        min-width: 0;
    }

    .apartment-main-content {
        gap: 1rem;
    }

    .apartment-gallery,
    .info-section,
    .sidebar-card,
    .video-container {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .apartment-gallery {
        border-radius: 10px;
    }

    .gallery-main-image-container {
        aspect-ratio: 16 / 11;
    }

    .gallery-main-image-container img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover;
    }

    .info-section,
    .sidebar-card {
        padding: 1rem;
    }

    .section-title,
    .sidebar-title {
        font-size: 1.1rem;
    }

    .details-cards {
        grid-template-columns: 1fr;
    }

    .gallery-thumbnails {
        padding: 0.8rem;
        gap: 0.6rem;
    }

    .thumbnail {
        flex: 0 0 80px;
        height: 60px;
    }

    .book-now-button {
        padding: 1rem 2rem;
        font-size: 1.1rem;
        min-width: 200px;
    }

    .price-label {
        font-size: 0.85rem;
    }

    .price-value {
        font-size: 0.9rem;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .price-row {
        align-items: flex-start;
        gap: 0.6rem;
        flex-wrap: wrap;
    }

    .price-row .price-value[style] {
        width: auto !important;
        text-align: left !important;
    }

    .share-buttons {
        grid-template-columns: 1fr;
    }

    .video-container iframe {
        height: auto;
        aspect-ratio: 16 / 9;
        display: block;
    }

    .info-badges {
        position: static;
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .gallery-main-image-container {
        aspect-ratio: 4 / 3;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .amenity-item {
        flex-wrap: wrap;
    }

    .amenity-status {
        width: 100%;
        margin-top: 0.5rem;
    }

    .book-now-button {
        width: 100%;
        min-width: auto;
    }

    .section-title,
    .sidebar-title {
        line-height: 1.5;
        overflow-wrap: anywhere;
    }

    .detail-card {
        padding: 1rem;
    }

    .amenity-item {
        align-items: flex-start;
    }
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    box-shadow: 0 3px 8px rgba(0,0,0,0.15);
}


.badge-gender-male {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.badge-gender-female {
    background: linear-gradient(135deg, #e83e8c, #c23674);
}


.badge-code {
    background: #1e3a8a;
}

@media (max-width: 440px) {
    .info-badges {
        right: 50%;
    }
}


.info-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    gap: 8px;
}

.basic-info-section {
    position: relative;
}
