/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #C4654A;
    color: white;
}

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

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

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

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

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

.reveal[data-reveal-delay="1"] {
    transition-delay: 0.1s;
}

.reveal[data-reveal-delay="2"] {
    transition-delay: 0.2s;
}

.reveal[data-reveal-delay="3"] {
    transition-delay: 0.3s;
}

.reveal[data-reveal-delay="4"] {
    transition-delay: 0.4s;
}

.reveal[data-reveal-delay="5"] {
    transition-delay: 0.5s;
}

.reveal[data-reveal-delay="6"] {
    transition-delay: 0.6s;
}

.reveal[data-reveal-delay="7"] {
    transition-delay: 0.7s;
}

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

/* Mobile Menu Animation */
.menu-line {
    display: block;
}

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

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

#mobileMenuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Navbar Transition States */
.nav-scrolled {
    background-color: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

.nav-scrolled .nav-link {
    color: #3A322C !important;
}

.nav-scrolled .nav-link:hover {
    color: #C4654A !important;
}

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

/* Button Hover Effects */
a {
    text-decoration: none;
}

/* Image Loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

img[data-src].loaded {
    opacity: 1;
}

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #C4654A;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    #mobileMenu,
    .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-darkbrown,
    .bg-terracotta-500 {
        background: #333 !important;
    }
}
