/* --- Desktop Default Layout --- */

/* --- Fullscreen Intro Video Overlay --- */
#intro-video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    /* Higher than everything else */
    background-color: #fff;
    /* Dark backdrop while loading */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

#intro-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Forces the video to cover the entire viewport without distortion */
}

#skip-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    z-index: 10000;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 30px;
    cursor: pointer;
    backdrop-filter: blur(5px);
    font-family: sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    transition: background 0.3s ease, transform 0.2s ease;
}

#skip-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.05);
}

section {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.canvas-container {
    position: relative;
    width: 1920px;
    max-width: 100%;
    height: auto;
    aspect-ratio: 1920 / 1080;
    /* Enforces perfect 16:9 scaling baseline */
    margin: 0 auto;
}

#fridge {
    width: 100%;
    height: 100%;
    display: block;
}

/* Position AND size the 3D model using percentages relative to the container */
#can-3d {
    position: absolute;
    top: 47%;
    left: 62%;

    /* FIX: Use percentages based on the 1920x1080 canvas size */
    /* 100px out of 1920px is ~5.2% | 200px out of 1080px is ~18.5% */
    width: 6.2%;
    height: 19.5%;

    background: transparent;
    z-index: 10;

}

/* --- Mobile View Zoom --- */
@media (max-width: 768px) {
    .canvas-container {
        position: absolute;
        top: 0;
        left: 50%;

        /* The container scale blows up both the SVG and the GLB uniformly */
        transform: translateX(-50%) scale(1.5);
        transform-origin: top center;

        width: 100vw;
        height: auto;
    }


    #intro-video {
        object-fit: contain;
        object-position: center top;
        /* Aligns the video horizontally centered, but vertically pinned to the top */
    }

}

@media (max-width: 1024px) {

    #intro-video {
        object-fit: contain;
        object-position: center top;
        /* Aligns the video horizontally centered, but vertically pinned to the top */
    }
}