/* ===== Digital Engine Design System - Base Styles ===== */

/* Material Symbols */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #10141a;
    color: #dfe2eb;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: rgba(0, 218, 243, 0.3);
    color: #dfe2eb;
}

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

::-webkit-scrollbar-track {
    background: #10141a;
}

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

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

/* Links */
a {
    color: inherit;
    text-decoration: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
}

/* Loading Spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #262a31;
    border-top: 3px solid #00daf3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-spinner-small {
    width: 20px;
    height: 20px;
    border: 2px solid #262a31;
    border-top: 2px solid #00daf3;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Fade in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fadeIn {
    animation: fadeIn 0.3s ease-out;
}

/* Hero carousel slide animation */
@keyframes heroSlideIn {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes heroImageIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateX(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

.hero-slide-text {
    animation: heroSlideIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-slide-image {
    animation: heroImageIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

/* Pulse glow for primary elements */
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 218, 243, 0.2); }
    50% { box-shadow: 0 0 16px 4px rgba(0, 218, 243, 0.15); }
}

/* Cart notification animation */
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cart-notification-animate {
    animation: slideDown 0.3s ease-out;
}

/* Blazor error UI */
#blazor-error-ui {
    background: #93000a;
    color: #ffdad6;
    bottom: 0;
    box-shadow: 0 -4px 16px rgba(0,0,0,0.4);
    display: none;
    left: 0;
    padding: 12px 24px;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 16px;
    top: 8px;
    color: #ffdad6;
}

#blazor-error-ui .reload {
    color: #00daf3;
    margin-left: 8px;
}

/* Lightbox */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #8b90a0;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #00daf3;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(28, 32, 38, 0.8);
    border: 1px solid rgba(65, 71, 84, 0.3);
    color: #dfe2eb;
    cursor: pointer;
    padding: 12px;
    transition: all 0.2s;
}

.lightbox-nav:hover {
    background: rgba(0, 218, 243, 0.1);
    border-color: rgba(0, 218, 243, 0.3);
}

.lightbox-prev {
    left: -60px;
}

.lightbox-next {
    right: -60px;
}

.lightbox-counter {
    text-align: center;
    margin-top: 12px;
    color: #8b90a0;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Mobile overlay for menu */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.7);
    z-index: 40;
    backdrop-filter: blur(4px);
}

/* Product description HTML content styling */
.description-html-content h1,
.description-html-content h2,
.description-html-content h3,
.description-html-content h4 {
    font-family: 'Space Grotesk', sans-serif;
    color: #dfe2eb;
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    font-weight: 600;
}

.description-html-content p {
    color: #c1c6d7;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.description-html-content ul, .description-html-content ol {
    color: #c1c6d7;
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.description-html-content li {
    margin-bottom: 0.5rem;
}

.description-html-content table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.description-html-content td, .description-html-content th {
    padding: 8px 12px;
    border-bottom: 1px solid #262a31;
    text-align: left;
}

.description-html-content img {
    border-radius: 4px;
    margin: 1rem 0;
}

/* Form inputs default styling for dark theme */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="tel"],
input[type="password"],
input[type="search"],
textarea,
select {
    background-color: #181c22;
    color: #dfe2eb;
    border: 1px solid #414754;
    font-family: 'Inter', sans-serif;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #00daf3;
    box-shadow: 0 0 0 2px rgba(0, 218, 243, 0.15);
}

input[type="checkbox"] {
    accent-color: #00daf3;
}

/* Number input - hide spin buttons */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Dual range slider */
.dual-range-wrap {
    position: relative;
    height: 20px;
    display: flex;
    align-items: center;
}

.dual-range-wrap input[type="range"] {
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    margin: 0;
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    pointer-events: none;
    z-index: 1;
}

.dual-range-wrap input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00daf3;
    border: 2px solid #10141a;
    cursor: pointer;
    pointer-events: all;
    position: relative;
    z-index: 2;
    box-shadow: 0 0 6px rgba(0, 218, 243, 0.3);
    transition: box-shadow 0.2s, transform 0.15s;
}

.dual-range-wrap input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(0, 218, 243, 0.5);
}

.dual-range-wrap input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00daf3;
    border: 2px solid #10141a;
    cursor: pointer;
    pointer-events: all;
    box-shadow: 0 0 6px rgba(0, 218, 243, 0.3);
}

.dual-range-track {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: #31353c;
    border-radius: 2px;
}

.dual-range-fill {
    position: absolute;
    height: 4px;
    background: linear-gradient(90deg, #009fb2, #00daf3);
    border-radius: 2px;
}

/* Product images - mix-blend-mode to handle white backgrounds */
.product-img-wrap {
    background: #f3f4f6;
    border-radius: 4px;
}

.product-img-blend {
    mix-blend-mode: multiply;
}
