/* Custom styles for G&G Cake & Kitchen Supplies */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(30px);
    animation: heroFadeIn 0.8s ease forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.45s;
}

@keyframes heroFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal animations - progressive enhancement */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transitions */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(253, 246, 236, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 142, 0.08);
}

#navbar.scrolled .nav-link {
    color: rgba(90, 30, 95, 0.7);
}

#navbar.scrolled .nav-link:hover {
    color: rgb(109, 52, 109);
    background-color: rgba(232, 212, 237, 0.5);
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-link {
    display: block;
    width: 100%;
}

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

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

::-webkit-scrollbar-thumb {
    background: #d6afd9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a35aa3;
}

/* Selection color */
::selection {
    background-color: rgba(163, 90, 163, 0.2);
    color: #4a244a;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #a35aa3;
    outline-offset: 2px;
}

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
}

/* Button hover lift effect */
button, a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Product card hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}
