/* ── Page specific styles ── */
.page-hero {
    background: #1a2e2d;
    padding: 80px 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: 'FACTORY';
    position: absolute;
    font-family: 'Cormorant Garamond', serif;
    font-size: 180px;
    font-weight: 300;
    color: rgba(58, 189, 181, .04);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    letter-spacing: 20px;
    pointer-events: none;
}

.page-hero-label {
    font-size: 10px;
    letter-spacing: 5px;
    color: #3abdb5;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.page-hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    color: #fff;
    line-height: 1.1;
}

.page-hero-title em {
    font-style: italic;
    color: #3abdb5;
}

.page-hero-sub {
    font-size: 14px;
    font-weight: 300;
    color: rgba(255, 255, 255, .45);
    margin-top: 16px;
    letter-spacing: 1px;
}

/* ── 360 Section ── */
.tour-section {
    background: #111e1d;
    padding: 80px;
}

.tour-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.tour-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 300;
    color: #fff;
}

.tour-title em {
    font-style: italic;
    color: #3abdb5;
}

.tour-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, .3);
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-hint svg {
    opacity: .5;
}

/* Video selector tabs */
.video-tabs {
    display: flex;
    gap: 2px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.vtab {
    padding: 8px 20px;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(58, 189, 181, .15);
    color: rgba(255, 255, 255, .4);
    font-size: 11px;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .3s;
    font-family: 'Inter', sans-serif;
}

.vtab:hover {
    border-color: #3abdb5;
    color: rgba(255, 255, 255, .7);
}

.vtab.active {
    background: #3abdb5;
    border-color: #3abdb5;
    color: #fff;
}

/* 360 viewer container */
.viewer-wrap {
    position: relative;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid rgba(58, 189, 181, .15);
}

.viewer-wrap a-scene {
    width: 100%;
    height: 520px;
    display: block;
}

.viewer-overlay-info {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(17, 30, 29, .85);
    backdrop-filter: blur(10px);
    padding: 10px 16px;
    border: 1px solid rgba(58, 189, 181, .2);
    z-index: 10;
    pointer-events: none;
}

.voi-label {
    font-size: 9px;
    letter-spacing: 3px;
    color: #3abdb5;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.voi-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 16px;
    color: #fff;
}

.viewer-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.vctrl {
    width: 36px;
    height: 36px;
    background: rgba(17, 30, 29, .85);
    border: 1px solid rgba(58, 189, 181, .2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(58, 189, 181, .7);
    transition: all .3s;
    backdrop-filter: blur(10px);
}

.vctrl:hover {
    border-color: #3abdb5;
    color: #3abdb5;
}

.drag-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
    z-index: 5;
    transition: opacity .5s;
}

.drag-hint.hidden {
    opacity: 0;
}

.drag-hint-icon {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    animation: pulse 2s ease-in-out infinite;
}

.drag-hint p {
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .5);
    text-transform: uppercase;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: .6;
    }

    50% {
        transform: scale(1.1);
        opacity: 1;
    }
}

/* ── Gallery Section ── */
.gallery-section {
    padding: 80px;
    background: #f7fafa;
}

.gallery-header {
    margin-bottom: 48px;
}

.gallery-lbl {
    font-size: 10px;
    letter-spacing: 5px;
    color: #3abdb5;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gallery-ttl {
    font-family: 'Cormorant Garamond', serif;
    font-size: clamp(28px, 3vw, 44px);
    font-weight: 300;
    color: #1a2e2d;
}

.gallery-ttl em {
    font-style: italic;
    color: #3abdb5;
}

/* Masonry-style grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    gap: 4px;
}

.gallery-grid .g-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

.gallery-grid .g-item:nth-child(1) {
    grid-column: span 2;
    grid-row: span 2;
}

.gallery-grid .g-item:nth-child(6) {
    grid-column: span 2;
}

.gallery-grid .g-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .6s cubic-bezier(.25, .46, .45, .94);
    min-height: 220px;
}

.gallery-grid .g-item:nth-child(1) img {
    min-height: 444px;
}

.gallery-grid .g-item:hover img {
    transform: scale(1.04);
}

.g-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(17, 30, 29, .6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity .4s;
    display: flex;
    align-items: flex-end;
    padding: 16px;
}

.g-item:hover .g-overlay {
    opacity: 1;
}

.g-overlay span {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .8);
    text-transform: uppercase;
}

/* ── Lightbox ── */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 20, .95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity .4s;
    backdrop-filter: blur(10px);
}

.lightbox.open {
    opacity: 1;
    pointer-events: all;
}

.lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border: 1px solid rgba(58, 189, 181, .2);
}

.lb-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(58, 189, 181, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(58, 189, 181, .7);
    transition: all .3s;
}

.lb-close:hover {
    border-color: #3abdb5;
    color: #3abdb5;
}

.lb-prev,
.lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 1px solid rgba(58, 189, 181, .3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(58, 189, 181, .7);
    transition: all .3s;
}

.lb-prev {
    left: 24px;
}

.lb-next {
    right: 24px;
}

.lb-prev:hover,
.lb-next:hover {
    border-color: #3abdb5;
    color: #3abdb5;
}

.lb-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, .3);
    text-transform: uppercase;
}

/* ── Stats bar ── */
.factory-stats {
    background: #1a2e2d;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid rgba(58, 189, 181, .1);
}

.fstat {
    padding: 40px 30px;
    text-align: center;
    border-left: 1px solid rgba(58, 189, 181, .1);
}

.fstat:first-child {
    border-left: none;
}

.fstat-n {
    font-family: 'Cormorant Garamond', serif;
    font-size: 44px;
    font-weight: 300;
    color: #3abdb5;
    line-height: 1;
}

.fstat-l {
    font-size: 10px;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, .3);
    text-transform: uppercase;
    margin-top: 8px;
}

/* Responsive */
@media(max-width:1024px) {

    .page-hero,
    .tour-section,
    .gallery-section {
        padding: 60px 32px;
    }

    .tour-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid .g-item:nth-child(1) {
        grid-column: span 2;
    }

    .gallery-grid .g-item:nth-child(6) {
        grid-column: span 1;
    }

    .factory-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .fstat:nth-child(3) {
        border-left: none;
    }
}

@media(max-width:600px) {

    .page-hero,
    .tour-section,
    .gallery-section {
        padding: 50px 20px;
    }

    .viewer-wrap a-scene {
        height: 320px;
    }

    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2px;
    }

    .gallery-grid .g-item:nth-child(1) {
        grid-column: span 2;
    }

    .gallery-grid .g-item:nth-child(6) {
        grid-column: span 2;
    }

    .video-tabs {
        gap: 4px;
    }

    .vtab {
        font-size: 10px;
        padding: 7px 12px;
    }

    .factory-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}