:root {
    --primary: #0D0F12;
    --primary-container: #181B20;
    --on-primary: #ffffff;
    --secondary: #D99E30;
    --secondary-container: #E5AC3E;
    --on-secondary: #0D0F12;
    --surface: #F8F9FA;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #F1F3F6;
    --surface-container: #E7EBEF;
    --surface-container-high: #DEE3E8;
    --surface-container-highest: #D5DCE2;
    --on-surface: #0D0F12;
    --on-surface-variant: #596375;
    --outline: #8C97A8;
    --outline-variant: #E2E6EC;
    --shadow-ambient: 0 4px 20px -2px rgba(13, 15, 18, 0.05);
    --shadow-modal: 0 20px 40px -15px rgba(13, 15, 18, 0.12);
}

.dark {
    --primary: #FFFFFF;
    --primary-container: #171B23;
    --on-primary: #0B0D11;
    --secondary: #D99E30;
    --secondary-container: #E5AC3E;
    --surface: #0B0D11;
    --surface-container-lowest: #12151B;
    --surface-container-low: #171B23;
    --surface-container: #1F242F;
    --surface-container-high: #272E3B;
    --on-surface: #F1F5F9;
    --on-surface-variant: #8491A5;
    --outline-variant: #252B38;
}

html {
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
}

body {
    overflow-x: clip;
    max-width: 100vw;
    width: 100%;
    position: relative;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#app-view {
    max-width: 100%;
}

* {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
}

h1, h2, h3, h4, h5, h6, .font-heading {
    font-family: 'Geist', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: -0.015em;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Glassmorphism Navigation */
.glass-nav {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    background-color: rgba(248, 249, 250, 0.88);
}

/* Smart Sticky Navigation (Slide-up on Scroll Down, Slide-down on Scroll Up) */
.smart-header {
    position: sticky;
    top: 0;
    z-index: 40;
    transform: translateY(0);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.2s ease, box-shadow 0.25s ease;
    will-change: transform;
}
.smart-header.header-hidden {
    transform: translateY(-100%) !important;
    pointer-events: none;
}
.smart-header.header-visible {
    transform: translateY(0) !important;
    pointer-events: auto;
}
.header-scrolled {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.07), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
}
.dark .header-scrolled {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
}

/* Input Focus Resets */
input:focus, select:focus, textarea:focus {
    outline: none !important;
}

input.border-none, input.border-0 {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Social Icons Filter Styling */
.social-icon-btn {
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.social-icon-btn:hover {
    transform: translateY(-2px);
}
.social-icon-btn img {
    opacity: 0.75;
    transition: all 0.2s ease;
}
.dark .social-icon-btn img {
    filter: invert(1) brightness(1.2);
    opacity: 0.8;
}
.social-icon-btn:hover img,
.dark .social-icon-btn:hover img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(67%) sepia(61%) saturate(548%) hue-rotate(6deg) brightness(95%) contrast(87%);
}

.dark .glass-nav {
    background-color: rgba(11, 13, 17, 0.88);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.dark ::-webkit-scrollbar-thumb {
    background: #282E3B;
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: #3A4356;
}

/* Product Card Interactions */
.product-card {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.08);
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-image {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle Shimmer / Glow */
.glow-accent {
    position: relative;
}
.glow-accent::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(217, 158, 48, 0.15) 0%, rgba(217, 158, 48, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Tab active state */
.tab-btn.active {
    color: #D99E30;
    border-bottom: 2px solid #D99E30;
    font-weight: 600;
}

/* Cart Drawer */
#cart-drawer {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#cart-backdrop {
    transition: opacity 0.3s ease;
}

/* Modal Transitions */
.modal-overlay {
    transition: opacity 0.25s ease-out;
}
.modal-content {
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease-out;
}

/* License tier selector */
.license-radio:checked + label {
    border-color: #D99E30;
    background-color: rgba(217, 158, 48, 0.08);
}

/* Mock badge */
.badge-pill {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 9999px;
}

/* Toast Container */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

/* License Certificate Styles */
.certificate-frame {
    position: relative;
    background: radial-gradient(circle at center, #ffffff 0%, #fdfbf7 100%);
    border: 12px double #D99E30;
    box-shadow: 0 25px 50px -12px rgba(217, 158, 48, 0.15), 0 0 0 1px rgba(217, 158, 48, 0.3);
}

.dark .certificate-frame {
    background: radial-gradient(circle at center, #171c26 0%, #0d1017 100%);
    border: 12px double #D99E30;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(217, 158, 48, 0.4);
}

.certificate-corner {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 3px solid #D99E30;
}

.certificate-corner.top-left { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.certificate-corner.top-right { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.certificate-corner.bottom-left { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.certificate-corner.bottom-right { bottom: 8px; right: 8px; border-left: none; border-top: none; }

.certificate-seal {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #D99E30 0%, #B8801E 50%, #F5C767 100%);
    box-shadow: 0 10px 20px -5px rgba(217, 158, 48, 0.4);
}

/* Premium Print Invoice & Certificate Styles */
@media print {
    body {
        background: #ffffff !important;
        color: #000000 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    #app-header,
    #app-view,
    #app-footer,
    #cart-drawer,
    #cart-backdrop,
    #search-modal,
    #quick-view-modal,
    #product-modal,
    #category-modal,
    #review-modal,
    #auth-modal,
    #edit-order-modal,
    #toast-container,
    .no-print,
    #invoice-modal-header,
    #invoice-modal-backdrop {
        display: none !important;
    }

    #invoice-modal {
        display: block !important;
        position: static !important;
        background: #ffffff !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        height: auto !important;
        overflow: visible !important;
    }

    #invoice-modal-card {
        display: block !important;
        position: static !important;
        box-shadow: none !important;
        border: none !important;
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    #invoice-document {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 24px !important;
        background: #ffffff !important;
        color: #111827 !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    #certificate-container {
        display: block !important;
        position: static !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
    }

    @page {
        size: A4 portrait;
        margin: 8mm;
    }
}

/* No Scrollbar Utility */
.no-scrollbar::-webkit-scrollbar {
    display: none !important;
}
.no-scrollbar {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

