/* ============================================
   Legacy Smoke Shop — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(116, 26, 26, 0.15);
    color: #741a1a;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: rgba(254, 253, 251, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(245, 184, 184, 0.3);
}

#navbar.scrolled {
    box-shadow: 0 4px 40px rgba(61, 10, 10, 0.08);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #c43939;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.mobile-link:hover::after {
    width: 80%;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Menu button animation */
.menu-line {
    display: block;
}

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

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

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

/* ============================================
   Product Cards
   ============================================ */
.product-card {
    position: relative;
}

.product-card .aspect-\[4\/3\] {
    position: relative;
    overflow: hidden;
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Reduced motion - ensure everything is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

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

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

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

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

/* ============================================
   Focus styles
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #c43939;
    outline-offset: 4px;
    border-radius: 4px;
}

/* ============================================
   Image placeholder fallback
   ============================================ */
img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    #navbar,
    #menuBtn,
    #mobileMenu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .product-card .aspect-\[4\/3\] {
        page-break-inside: avoid;
    }
}
