/* mCream Edibles - Merch/Polaroid Collage Styles */

/* Mobile scrolling improvements for polaroids */
@media (max-width: 768px) {
    /* Optimize animations for mobile performance */
    .polaroid-item {
        will-change: transform;
        transform: translateZ(0);
    }
    
    /* Reduce animation complexity on mobile for better performance */
    .polaroid-frame img {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
}

/* Polaroid Collage Styles */
.polaroid-collage {
    position: relative;
    width: 100%;
    max-width: 800px;
    height: 70vh;
    max-height: 500px;
    min-height: 400px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.polaroid-item {
    position: absolute;
    transition: all 0.3s ease;
    cursor: pointer;
}

.polaroid-item:hover {
    z-index: 10;
    transform: scale(1.05);
}

.polaroid-frame {
    transform: rotate(var(--rotation, 0deg));
    transition: all 0.3s ease;
}

.polaroid-frame img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

/* Individual polaroid positioning and floating animations */
.polaroid-1 {
    top: 15px;
    left: 200px;
    --rotation: -12deg;
    animation: float1 6s ease-in-out infinite;
}

.polaroid-2 {
    top: 5px;
    right: 150px;
    --rotation: 15deg;
    animation: float2 7s ease-in-out infinite;
}

.polaroid-3 {
    top: 180px;
    left: 80px;
    --rotation: -8deg;
    animation: float3 5.5s ease-in-out infinite;
}

.polaroid-4 {
    bottom: 80px;
    left: 45%;
    transform: translateX(-50%);
    --rotation: 5deg;
    animation: float4 6.5s ease-in-out infinite;
}

.polaroid-5 {
    top: 120px;
    right: 15px;
    --rotation: -15deg;
    animation: float5 5s ease-in-out infinite;
}

.polaroid-6 {
    bottom: 30px;
    right: 100px;
    --rotation: 10deg;
    animation: float6 7.5s ease-in-out infinite;
}

/* Floating animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(-12deg); }
    50% { transform: translateY(-15px) rotate(-10deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(15deg); }
    50% { transform: translateY(-20px) rotate(17deg); }
}

@keyframes float3 {
    0%, 100% { transform: translateY(0px) rotate(-8deg); }
    50% { transform: translateY(-12px) rotate(-6deg); }
}

@keyframes float4 {
    0%, 100% { transform: translateX(-50%) translateY(0px) rotate(5deg); }
    50% { transform: translateX(-50%) translateY(-18px) rotate(7deg); }
}

@keyframes float5 {
    0%, 100% { transform: translateY(0px) rotate(-15deg); }
    50% { transform: translateY(-16px) rotate(-13deg); }
}

@keyframes float6 {
    0%, 100% { transform: translateY(0px) rotate(10deg); }
    50% { transform: translateY(-14px) rotate(12deg); }
}

/* Hover effects for polaroids */
.polaroid-item:hover .polaroid-frame {
    transform: rotate(0deg) scale(1.05);
}

.polaroid-item:hover .polaroid-frame img {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Store Polaroid Styles */
.polaroid-store {
    position: relative;
    display: flex;
    justify-content: center;
    margin: 20px 0 40px 0;
    z-index: 1;
}

.polaroid-store .polaroid-frame {
    transform: rotate(-5deg);
    transition: all 0.3s ease;
    animation: float-store 6s ease-in-out infinite;
}

.polaroid-store .polaroid-frame img {
    width: 200px;
    height: 200px;
    object-fit: cover;
    display: block;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.polaroid-store:hover .polaroid-frame {
    transform: rotate(0deg) scale(1.05);
}

.polaroid-store:hover .polaroid-frame img {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

@keyframes float-store {
    0%, 100% { transform: translateY(0px) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(-3deg); }
}

/* Mobile responsiveness for Polaroid Collage */
@media (max-width: 768px) {
    .polaroid-collage {
        height: 60vh;
        max-height: 450px;
        min-height: 350px;
        max-width: 100%;
        margin: 15px auto;
    }
    
    .polaroid-frame img {
        width: 140px;
        height: 140px;
    }
    
    .polaroid-1 {
        top: 20px;
        left: 100px;
    }
    
    .polaroid-2 {
        top: 10px;
        right: 150px;
    }
    
    .polaroid-3 {
        top: 140px;
        left: 5px;
    }
    
    .polaroid-4 {
        bottom: 80px;
    }
    
    .polaroid-5 {
        top: 100px;
        right: 5px;
    }
    
    .polaroid-6 {
        bottom: 60px;
        right: 60px;
    }
}

@media (max-width: 480px) {
    .polaroid-collage {
        height: 50vh;
        max-height: 350px;
        min-height: 280px;
        margin: 10px auto;
    }
    
    .polaroid-frame img {
        width: 110px;
        height: 110px;
    }
    
    .polaroid-1 {
        top: 10px;
        left: 70px;
    }
    
    .polaroid-2 {
        top: 5px;
        right: 75px;
    }
    
    .polaroid-3 {
        top: 100px;
        left: 50px;
    }
    
    .polaroid-4 {
        bottom: 60px;
    }
    
    .polaroid-5 {
        top: 70px;
        right: 50px;
    }
    
    .polaroid-6 {
        bottom: 75px;
        right: 60px;
    }
}
