/* ENC Appliances — Custom Styles */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: rgba(212, 160, 23, 0.3);
    color: #2D1A22;
}

/* Focus Styles */
:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* Navbar Scroll State */
.nav-scrolled {
    background-color: rgba(26, 15, 20, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Mobile Menu Transitions */
#mobile-menu {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#mobile-menu.active {
    opacity: 1;
    pointer-events: auto;
}

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

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

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

/* Select Dropdown Arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E2D40' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem !important;
}

/* Input Autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #F9F0F2 inset !important;
    -webkit-text-fill-color: #2D1A22 !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Image Loading Placeholder */
img {
    background: linear-gradient(135deg, #F3DDE4 0%, #E8BEC8 100%);
    min-height: 4px;
}

/* Subtle Grain Texture Overlay (optional for hero) */
.hero-grain::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* Smooth hover for product cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Back to top button transition */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    translate: 0;
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
    translate: 0 1rem;
}

/* Loading shimmer for images */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Print styles */
@media print {
    nav, #back-to-top, #contact-form, .reveal {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-plum-900, .bg-plum-950 {
        background-color: #2D1A22 !important;
        color: #fff !important;
    }
}
