/* Custom Styles for The Corner Toy Store */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
}

.font-serif {
    font-family: 'Cormorant Garamond', serif;
}

/* Custom Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-5deg);
    }
}

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

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

/* Smooth Scroll Offset for Fixed Nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #FDFBF7;
}

::-webkit-scrollbar-thumb {
    background: #7d2041;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6b1e3e;
}

/* Selection Color */
::selection {
    background-color: #f9d0da;
    color: #3b0b1c;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Focus Styles for Accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #fbbf24;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    #newsletter-form,
    .animate-float,
    .animate-float-delayed {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Mobile Menu Transition */
#mobile-menu {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

#mobile-menu:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Card Hover Effects */
.group:hover .group-hover\\:scale-110 {
    transform: scale(1.1);
}

/* Form Focus States */
input:focus,
button:focus {
    outline: none;
}

/* Loading State for Buttons */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Toast Notification */
.toast {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 5vw, 3rem);
    }
    
    h1 {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}
