/* ========================================
   Bake Your Cake Supplies — Custom Styles
   ======================================== */

/* Base */
*, *::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: #C4574A;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1A1A1A;
}
::-webkit-scrollbar-thumb {
    background: #C4574A;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B8473E;
}

/* Reveal Animations — Progressive Enhancement */
.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);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar transition */
.navbar-scrolled {
    background: rgba(26, 26, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-logo-text,
.navbar-scrolled .nav-logo-sub,
.navbar-scrolled .nav-link {
    color: #fff !important;
}

/* Smooth anchor offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Mobile nav link underline animation */
.mobile-nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #C4574A;
    transition: width 0.3s ease;
}
.mobile-nav-link:hover::after {
    width: 100%;
}

/* Product card image overlay transition */
.group:hover .absolute.inset-0 {
    opacity: 1 !important;
}

/* Input autofill style */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FAF6F1 inset !important;
    -webkit-text-fill-color: #2D2D2D !important;
}

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

/* Image loading placeholder */
img {
    background-color: #EDE0D0;
}

/* Print styles */
@media print {
    nav, #contact-form, .reveal { display: none; }
    body { color: #000; background: #fff; }
}
