.fullscreen-gallery {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    overflow: hidden;
}

.gallery-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.gallery-header {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.gallery-title {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    color: white;
}

.gallery-counter {
    font-size: 0.9rem;
    color: #ccc;
    margin-left: 15px;
}

.gallery-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.gallery-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.gallery-main {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.gallery-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-slide {
    flex: 0 0 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.gallery-image-container {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.gallery-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.gallery-image.zoomed {
    cursor: zoom-out;
    transform: scale(1.5);
    position: relative;
    z-index: 5;
}

.image-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.gallery-nav:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-50%) scale(1.1);
}

.gallery-prev {
    left: 30px;
}

.gallery-next {
    right: 30px;
}

.gallery-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.gallery-nav:disabled:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: translateY(-50%);
}

.gallery-thumbnails {
    padding: 20px 30px;
    background: rgba(0, 0, 0, 0.7);
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    overflow-x: auto;
}

.thumbnails-track {
    display: flex;
    gap: 10px;
    justify-content: center;
    min-width: min-content;
}

.thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.thumbnail:hover {
    opacity: 0.8;
    transform: translateY(-2px);
}

.thumbnail.active {
    opacity: 1;
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-zoom-controls {
    position: absolute;
    bottom: 100px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.zoom-level {
    position: absolute;
    bottom: 150px;
    right: 30px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.zoom-btn:hover + .zoom-level {
    opacity: 1;
}

.gallery-download {
    position: absolute;
    bottom: 100px;
    left: 30px;
    z-index: 10;
}

.download-btn {
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 10px 20px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: translateY(-2px);
}

/* Анимации */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.fullscreen-gallery.open {
    display: flex;
    animation: slideIn 0.3s ease;
}

.fullscreen-gallery.closing {
    animation: slideOut 0.3s ease;
}

/* Адаптивность */
@media (max-width: 768px) {
    .gallery-header {
        padding: 15px 20px;
    }

    .gallery-title {
        font-size: 1rem;
    }

    .gallery-slide {
        padding: 20px;
    }

    .gallery-nav {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .gallery-prev {
        left: 15px;
    }

    .gallery-next {
        right: 15px;
    }

    .gallery-thumbnails {
        padding: 15px 20px;
    }

    .thumbnail {
        width: 60px;
        height: 45px;
    }

    .gallery-zoom-controls {
        bottom: 80px;
        right: 15px;
    }

    .gallery-download {
        bottom: 80px;
        left: 15px;
    }

    .zoom-btn {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .gallery-slide {
        padding: 10px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        background: rgba(0, 0, 0, 0.7);
    }

    .gallery-prev {
        left: 10px;
    }

    .gallery-next {
        right: 10px;
    }

    .gallery-thumbnails {
        padding: 10px;
    }

    .thumbnail {
        width: 50px;
        height: 37px;
    }

    .gallery-zoom-controls {
        bottom: 60px;
        right: 10px;
    }

    .gallery-download {
        bottom: 60px;
        left: 10px;
    }

    .download-btn {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}
.gallery-open-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    z-index: 5;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.room-image-slider:hover .gallery-open-btn {
    opacity: 1;
}
.room-image:hover .gallery-open-btn {
    opacity: 1;
}

.gallery-open-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-2px);
}

.gallery-open-btn i {
    font-size: 0.9rem;
}