@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;700;800;900&display=swap');

.popmart-container {
    background: #ffffff;
    padding: 20px 20px;
    font-family: 'Outfit', sans-serif;
    color: #000;
    overflow: hidden;
}

.product-3d-slide {
    position: relative;
    width: 100%;
    min-height: 550px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.mega-back-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 800;
    color: #000;
    text-align: center;
    width: 100%;
    max-width: 900px;
    line-height: 1.1;
    z-index: 1;
    pointer-events: none;
    text-transform: none;
    letter-spacing: -2px;
    opacity: 0;
    /* Starts hidden for animation */
}

.image-stack,
.model-container {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
    z-index: 2;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
}

.model-container model-viewer {
    width: 100%;
    height: 100%;
    --poster-color: transparent;
}

/* Smooth fade for the poster */
model-viewer::part(poster) {
    transition: opacity 0.5s ease-in-out;
}

model-viewer[data-model-status="loaded"]::part(poster) {
    opacity: 0;
}

.image-stack:active,
.model-container:active {
    cursor: grabbing;
}

.product-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.05s ease;
    user-select: none;
}

.product-image.active {
    opacity: 1;
}

.drag-path-container {
    position: absolute;
    bottom: 120px;
    width: 80%;
    max-width: 400px;
    height: 60px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 3;
    pointer-events: none;
}

.drag-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.4);
    margin-bottom: 12px;
    text-transform: uppercase;
}

.drag-path-line {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.15;
}

.drag-path-line svg {
    width: 100%;
    height: 100%;
    fill: #000;
}

.drag-icon-wrap {
    width: 44px;
    height: 44px;
    background: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.15);
    transition: transform 0.1s linear;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 4;
}

.drag-icon-wrap svg {
    width: 20px;
    height: 20px;
    fill: #000;
}

/* Animations */
@keyframes textReveal {
    from {
        opacity: 0;
        transform: translate(-50%, -40%) scale(0.9);
    }

    to {
        opacity: 0.12;
        /* Subtle but visible watermark-like opacity */
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes modelEntry {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.splide__slide.is-active .mega-back-text {
    animation: textReveal 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mega-back-text {
        font-size: 12vw;
    }

    .image-stack {
        max-width: 350px;
    }

    .product-3d-slide {
        min-height: 500px;
    }
}

.action-buttons {
    margin-top: 40px;
    display: flex;
    gap: 15px;
    z-index: 4;
}

.carousel-btn {
    background: #000;
    border: 1px solid #000;
    color: #fff;
    padding: 14px 40px;
    border-radius: 40px;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
}

.carousel-btn:hover {
    background: #333;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Splide Customization */
.splide__arrow {
    background: #fff !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    width: 44px !important;
    height: 44px !important;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.splide__arrow:hover {
    opacity: 1;
    background: #f8f8f8 !important;
}

.splide__arrow svg {
    fill: #000 !important;
}

.splide__pagination__page {
    background: rgba(0, 0, 0, 0.1) !important;
}

.splide__pagination__page.is-active {
    background: #000 !important;
    transform: scale(1.4) !important;
}