/* Custom styles for G Mart */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: #fdf2f4;
}
::-webkit-scrollbar-thumb {
    background: #c43b5d;
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a12040;
}

/* Selection color */
::selection {
    background: #c43b5d;
    color: #fff5f7;
}

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-20px) rotate(var(--rotation, 0deg)); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(var(--rotation, 0deg)); }
    50% { transform: translateY(-12px) rotate(var(--rotation, 0deg)); }
}

/* Apply float animations to decorative elements */
.relative > div[aria-hidden="true"]:nth-child(1) {
    animation: float 6s ease-in-out infinite;
}
.relative > div[aria-hidden="true"]:nth-child(2) {
    animation: float-slow 8s ease-in-out infinite;
}

/* Hero image parallax-like effect */
@media (prefers-reduced-motion: no-preference) {
    .group:hover .aspect-\[4\/3\] img {
        transform: scale(1.05);
    }
}

/* Intersection observer animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children animations */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; }
.stagger-children.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Header scroll state */
header.scrolled {
    background: rgba(253, 242, 244, 0.95);
    backdrop-blur-lg;
    box-shadow: 0 1px 20px rgba(128, 24, 51, 0.08);
}

/* Mobile menu animation */
#mobileMenu.open {
    animation: slideDown 0.3s ease forwards;
}
#mobileMenu.close {
    animation: slideUp 0.3s ease forwards;
}

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

/* Pulse animation for dot */
@keyframes pulse-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* 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;
    }
}
