@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card-enter {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* Custom Hide Scrollbar for Firefox */
.scrollbar-hide {
    scrollbar-width: none;
}

/* --- New Engaging Styles --- */

/* 1. Playful Background Pattern */
body {
    background-color: #FFEFD5;
    background-image: 
        radial-gradient(rgba(30, 45, 61, 0.13) 1.5px, transparent 1.5px),
        radial-gradient(rgba(30, 45, 61, 0.13) 1.5px, transparent 1.5px);
    background-size: 36px 36px;
    background-position: 0 0, 18px 18px;
    background-attachment: fixed;
}

/* 2. Custom Range Slider */
input[type=range] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    border-radius: 50%;
    background: #3D9B88;
    border: 2px solid #1E2D3D;
    cursor: pointer;
    margin-top: -10px; /* You need to specify a margin in Chrome, but in Firefox and IE it is automatic */
    box-shadow: 2px 2px 0px 0px #1E2D3D;
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type=range]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: #FFEFD5;
    border-radius: 4px;
    border: 2px solid #1E2D3D;
}

/* 3. Floating Animation for Header Elements */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

.animate-float-gentle {
    animation: float-gentle 4s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-gentle 5s ease-in-out infinite 1s;
}

/* 4. Glassmorphism Utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 5. Product Card Hover Transition */
.product-card-enter {
    animation: fadeInUp 0.4s ease-out forwards;
}

/* 6. Smooth Image Transition in Modal */
#modal-img-main {
    transition: opacity 0.3s ease, transform 0.5s ease;
}

/* 7. Modal Scrollbar */
#modal-panel .overflow-y-auto::-webkit-scrollbar {
    width: 3px;
}
#modal-panel .overflow-y-auto::-webkit-scrollbar-thumb {
    background: rgba(61, 155, 136, 0.2);
    border-radius: 99px;
}
#modal-panel .overflow-y-auto::-webkit-scrollbar-track {
    background: transparent;
}

/* 8. Size Button Active State */
#modal-sizes button.active-size {
    background-color: #3D9B88;
    color: white;
    border-color: #3D9B88;
}

/* 9. Safe Area for Mobile Bottom Bar */
.safe-area-pb {
    padding-bottom: env(safe-area-inset-bottom, 16px);
}

/* 10. No Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* 11. Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}
.animate-shake {
    animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

/* 12. Filter Sidebar Scrollbar */
.filter-scrollbar::-webkit-scrollbar {
    width: 4px;
}
.filter-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(61, 155, 136, 0.25);
    border-radius: 99px;
}
.filter-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.filter-scrollbar {
    scrollbar-width: thin;
    scrollbar-color: rgba(61, 155, 136, 0.25) transparent;
}

/* 13. Filter size grid compact */
.dynamic-filters-container .grid label div {
    font-size: 0.8rem;
}

/* 14. Mobile-specific responsive fixes */
@media (max-width: 768px) {
    /* Reduce background dot size on mobile */
    body {
        background-size: 30px 30px;
        background-position: 0 0, 15px 15px;
    }

    /* Make product cards animate faster on mobile */
    .product-card-enter {
        animation-duration: 0.3s;
    }

    /* Ensure bottom actions don't overlap footer */
    main {
        padding-bottom: 80px !important;
    }
    
    /* Navbar compact on mobile */
    nav .shadow-brutal {
        box-shadow: 2px 2px 0px 0px #1E2D3D;
    }
}

