/* ========== PAGE HEADER ========== */
.collection-hero {
    padding-top: 120px;
    padding-bottom: 16px;
    text-align: center;
}

.collection-hero h1 {
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: 6px;
    text-transform: uppercase;
    color: #222;
    margin-bottom: 10px;
}

.collection-hero p {
    font-size: 0.9rem;
    color: #888;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .collection-hero {
        padding-top: 100px;
        padding-bottom: 12px;
    }

    .collection-hero h1 {
        font-size: 1.5rem;
        letter-spacing: 4px;
    }
}

/* ========== TAB BAR ========== */
.tab-bar {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 0 40px 16px;
}

.tab-btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 30px;
    background: transparent;
    border: 1px solid #ddd;
    color: #888;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    border-color: #999;
    color: #333;
}

.tab-btn.active {
    background: #222;
    border-color: #222;
    color: #fff;
}

.tab-btn__accent {
    color: inherit;
    transition: color 0.3s ease;
}

.tab-btn.active .tab-btn__accent {
    color: #e74c3c;
}

/* ========== TAB DESCRIPTION ========== */
.tab-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 0 40px 16px;
    display: grid;
}

.tab-description__text {
    grid-row: 1;
    grid-column: 1;
    font-size: 0.8rem;
    font-weight: 300;
    color: #888;
    letter-spacing: 0.5px;
    line-height: 1.7;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tab-description__text.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .tab-bar {
        padding: 0 20px 10px;
        gap: 4px;
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.65rem;
        letter-spacing: 1px;
    }

    .tab-description {
        padding: 0 20px 10px;
    }
}

/* ========== GALLERY WRAPPER ========== */
.gallery-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px 80px;
}

/* ========== GALLERY GRID (masonry columns) ========== */
.gallery-grid {
    columns: 2;
    column-gap: 8px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
    break-inside: avoid;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    max-height: 700px;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.gallery-item:hover img {
    transform: scale(1.04);
}

.gallery-item.hidden {
    display: none;
}

/* Full-width hero — standalone between grid sections */
.gallery-hero {
    position: relative;
    overflow: hidden;
    margin-bottom: 8px;
}

.gallery-hero img {
    width: 100%;
    display: block;
    transition: transform 0.8s ease;
}

.gallery-hero:hover img {
    transform: scale(1.04);
}

.gallery-hero.hidden {
    display: none;
}

.gallery-label {
    position: absolute;
    bottom: 16px;
    left: 18px;
    background: rgba(0, 0, 0, 0.45);
    padding: 6px 12px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #fff;
}

/* ========== GALLERY POPUP ========== */

.gallery-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-popup-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.gallery-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    z-index: 2001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.gallery-popup.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.gallery-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s ease;
    z-index: 10;
}

.gallery-popup__close:hover {
    border-color: #333;
}

.gallery-popup__close svg {
    width: 18px;
    height: 18px;
    stroke: #666;
}

.gallery-popup__inner {
    padding: 24px;
}

.gallery-popup__title {
    font-size: 1.2rem;
    font-weight: 300;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #222;
    margin-bottom: 4px;
}

.gallery-popup__range {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #aaa;
    margin-bottom: 16px;
}

.gallery-popup__range .range-number {
    color: #e53935;
    font-weight: 600;
}

.gallery-popup__desc {
    font-size: 0.82rem;
    font-weight: 300;
    color: #666;
    line-height: 1.7;
    margin-bottom: 16px;
}

.gallery-popup__main-img-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    margin-bottom: 12px;
    background: #fff;
    position: relative;
    container-type: size;
}

.gallery-popup__main-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.gallery-popup__main-img.rotated {
    transform: translate(-50%, -50%) rotate(-90deg);
    max-width: 100cqh;
    max-height: 100cqw;
}

.gallery-popup__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: center;
}

.gallery-popup__thumb {
    flex-shrink: 0;
    width: 72px;
    height: 72px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    opacity: 0.6;
}

.gallery-popup__thumb:hover {
    opacity: 0.9;
}

.gallery-popup__thumb.active {
    border-color: #e53935;
    opacity: 1;
}

.gallery-popup__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 768px) {
    .gallery-wrapper {
        padding: 0 20px 60px;
    }

    .gallery-grid {
        column-gap: 6px;
    }

    .gallery-item {
        margin-bottom: 6px;
    }

    .gallery-hero {
        margin-bottom: 6px;
    }
}

@media (max-width: 600px) {
    .gallery-wrapper {
        padding: 0 16px 40px;
    }

    .gallery-grid {
        columns: 1;
    }

    .gallery-popup {
        width: 95vw;
    }

    .gallery-popup__inner {
        padding: 16px;
    }

    .gallery-popup__thumb {
        width: 56px;
        height: 56px;
    }

    .gallery-popup__title {
        font-size: 1rem;
    }
}
