/* ===== Custom Styles for Saucedo's Super Market ===== */

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

/* Selection color */
::selection {
    background: rgba(200, 150, 62, 0.3);
    color: #E8D5B7;
}

/* ===== Typography ===== */
.font-display {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-body {
    font-family: 'Inter', system-ui, sans-serif;
}

/* ===== Section Labels ===== */
.section-label {
    letter-spacing: 0.25em;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 500;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(26, 18, 9, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 150, 62, 0.1);
}

.nav-link {
    position: relative;
}

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

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

/* ===== Mobile Menu ===== */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-nav-link {
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    transform: translateY(-2px);
}

/* Menu toggle animation */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

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

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ===== Hero ===== */
.hero-image {
    animation: heroImageIn 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-badge {
    animation: heroBadgeIn 0.8s ease-out 0.2s both;
}

h1 {
    animation: heroTextIn 0.8s ease-out 0.3s both;
}

p[class*="text-brand-sand/60"] {
    animation: heroTextIn 0.8s ease-out 0.5s both;
}

.hero-image ~ *,
.order-2 > * {
    animation: heroTextIn 0.8s ease-out 0.6s both;
}

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

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

@keyframes heroTextIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Product Cards ===== */
.product-card {
    transform: translateY(0);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.product-card:hover {
    transform: translateY(-6px);
}

/* ===== About Section ===== */
.about-image {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out;
}

.about-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease-out 0.2s;
}

.about-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Bakery Section ===== */
.bakery-image {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.8s ease-out;
}

.bakery-image.visible {
    opacity: 1;
    transform: translateX(0);
}

.bakery-content {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.8s ease-out 0.2s;
}

.bakery-content.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Info Cards ===== */
.info-card {
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.info-card:hover {
    transform: translateY(-3px);
}

/* ===== Fade-in animations for sections ===== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Back to top button ===== */
#back-to-top {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

#back-to-top:hover {
    transform: translateY(-3px);
}

/* ===== Gold shimmer effect on hover ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-display {
        font-family: 'Playfair Display', Georgia, serif;
    }
}

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