/* Gallery */

.project-art.has-gallery {
    aspect-ratio: auto;
    background: none;
    border-radius: 0;
    overflow: visible;
}

.project.gallery-right {
    grid-template-columns: 1.1fr 0.9fr;
}

.project.gallery-right .project-art {
    order: 2;
}

.project.gallery-right .project-info {
    order: 1;
}

.gallery-frame {
    position: relative;
    aspect-ratio: 3/4;
    width: 100%;
    background: transparent;
    overflow: hidden;
    border-radius: 2px;
}

@media (max-width: 640px) {
    .project.gallery-right {
        grid-template-columns: 1fr;
    }

    .project.gallery-right .project-art,
    .project.gallery-right .project-info {
        order: initial;
    }

    .project-art.has-gallery {
        aspect-ratio: 3 / 4;
    }
}

@media (max-width: 980px) {
    .project.gallery-right {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .project.gallery-right .project-art,
    .project.gallery-right .project-info {
        order: initial;
    }

    .textile-art {
        aspect-ratio: 3 / 4;
    }
}

.gallery-slide {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.gallery-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.35s ease;
}

.gallery-track img {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
    mix-blend-mode: difference;
    z-index: 2;
}

.gallery-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.gallery-arrow:disabled {
    opacity: 0.25;
    cursor: default;
}

.gallery-arrow:disabled:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.28);
}

.gallery-arrow.prev {
    left: 10px;
}

.gallery-arrow.next {
    right: 10px;
}

.gallery-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 3;
}

.gallery-dots .gallery-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    mix-blend-mode: difference;
}

.gallery-dots .gallery-dot.active {
    background: #fff;
    width: 18px;
    border-radius: 4px;
}

.gallery-tabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.gallery-tab {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 8px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: none;
    color: var(--ink-soft);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.gallery-tab:hover:not(.active) {
    background: var(--paper-dim);
    border-color: var(--highlight);
    color: var(--ink);
}

.gallery-tab.active {
    background: var(--highlight);
    color: var(--ink);
    border-color: var(--ink);
}