/* ===== Custom Styles for A To Z Discount Grocery ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF0DE;
}
::-webkit-scrollbar-thumb {
    background: #D49A4A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C4654A;
}

/* ===== Hero Background Shapes ===== */
.hero-shape {
    position: absolute;
    pointer-events: none;
}

.shape-circle-1 {
    width: 500px;
    height: 500px;
    border: 2px solid rgba(196, 101, 74, 0.1);
    border-radius: 50%;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 154, 74, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: 10%;
    left: 5%;
    animation: float 10s ease-in-out infinite reverse;
}

.shape-rect-1 {
    width: 120px;
    height: 120px;
    background: rgba(196, 101, 74, 0.06);
    border-radius: 24px;
    top: 25%;
    right: 5%;
    transform: rotate(45deg);
    animation: spin-slow 20s linear infinite;
}

.shape-dot {
    width: 12px;
    height: 12px;
    background: rgba(212, 154, 74, 0.4);
    border-radius: 50%;
    top: 35%;
    left: 48%;
    animation: pulse 3s ease-in-out infinite;
}

.shape-line {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(196, 101, 74, 0.3), transparent);
    bottom: 30%;
    right: 15%;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes spin-slow {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* ===== Marquee ===== */
.marquee-track {
    animation: marquee 30s linear infinite;
}

.marquee-content {
    flex-shrink: 0;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* ===== Reveal Animations ===== */
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.visible,
.reveal-right.visible,
.reveal-up.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Stagger children */
.reveal-up:nth-child(1) { transition-delay: 0ms; }
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }
.reveal-up:nth-child(4) { transition-delay: 300ms; }
.reveal-up:nth-child(5) { transition-delay: 400ms; }
.reveal-up:nth-child(6) { transition-delay: 500ms; }

/* ===== Navigation ===== */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #C4654A;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.menu-line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 20px;
    transform: translateX(4px);
}

/* ===== Navbar scroll state ===== */
nav.scrolled {
    background: rgba(253, 249, 243, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(42, 31, 26, 0.06);
}

/* ===== Button hover effects ===== */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* ===== Department card hover ===== */
.group:hover .group-hover\:bg-terra-500 {
    transition: background-color 0.3s ease;
}

.group:hover .group-hover\:bg-sand-400 {
    transition: background-color 0.3s ease;
}

/* ===== Image hover ===== */
.rounded-3xl.overflow-hidden {
    will-change: transform;
}

.rounded-3xl.overflow-hidden img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.03);
}

/* ===== Back to top ===== */
#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* ===== Mobile menu active state ===== */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

/* ===== Form focus styles ===== */
input:focus,
textarea:focus {
    outline: none;
}

/* ===== 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;
    }
    .reveal-left,
    .reveal-right,
    .reveal-up {
        opacity: 1;
        transform: none;
    }
}
