﻿/* ===== RESET & BASE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== CSS VARIABLES ===== */
:root {
    --accent: #00e5ff;
    --accent-dim: rgba(0, 229, 255, .15);
    --accent-glow: rgba(0, 229, 255, .4);
    --bg: #000;
    --bg-card: #0a0a0a;
    --bg-elevated: #111;
    --border: rgba(255, 255, 255, .08);
    --text: #fff;
    --text-secondary: rgba(255, 255, 255, .5);
    --text-tertiary: rgba(255, 255, 255, .3);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: .15s cubic-bezier(.4, 0, .2, 1);
    --max-w: 1200px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes glow-pulse {
    0%, 100% { opacity: .4; transform: scale(1); }
    50% { opacity: .7; transform: scale(1.05); }
}
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(2deg); }
}
@keyframes modelFadeIn {
    0% { opacity: 0; filter: blur(4px); transform: scale(0.95); }
    100% { opacity: 1; filter: blur(0px); transform: scale(1); }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(0, 0, 0, .8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* Logo */
.logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}
.logo-mark {
    font-size: 20px;
    font-weight: 900;
    letter-spacing: 2px;
    color: var(--text);
}
.logo-sub {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 3px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(4px, 1vw, 12px);
    padding: 0 clamp(6px, 1.2vw, 16px);
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}
.header-nav::-webkit-scrollbar {
    display: none;
}
.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: max-content;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: .35px;
    text-transform: none;
    transition: var(--transition);
    border-radius: 10px;
    padding: 8px 10px;
    line-height: 1;
    white-space: nowrap;
    will-change: background-color, color;
}
.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}
.nav-link.active {
    color: var(--accent);
    background: var(--accent-dim);
}

/* Header actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.search-toggle, .header-icon {
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.search-toggle:hover, .header-icon:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}
.cart-icon {
    position: relative;
}
.cart-count {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    background: var(--accent);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Search overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .9);
    backdrop-filter: blur(30px);
    z-index: 200;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 200px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}
.search-overlay.active {
    opacity: 1;
    visibility: visible;
}
.search-overlay-inner {
    width: 100%;
    max-width: 600px;
    position: relative;
}
.search-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid var(--border);
    color: var(--text);
    font-size: 28px;
    font-weight: 300;
    padding: 16px 50px 16px 0;
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}
.search-input::placeholder { color: var(--text-tertiary); }
.search-input:focus { border-bottom-color: var(--accent); }
.search-close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 32px;
    cursor: pointer;
    transition: var(--transition);
}
.search-close:hover { color: var(--text); }

/* ===== BUTTONS ===== */
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 40px;
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
    cursor: pointer;
    background: transparent;
    max-width: 100%;
}
.btn-outline:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 30px var(--accent-glow);
}
.btn-outline--light {
    border-color: rgba(255,255,255,.3);
    color: var(--text);
}
.btn-outline--light:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: #000;
}

/* ===== HERO ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}
.hero-content {
    animation: fadeInUp .8s ease-out;
}
.hero-eyebrow {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 4px;
    color: var(--text-secondary);
    text-transform: uppercase;
    margin-bottom: 24px;
}
.hero-title {
    font-size: clamp(48px, 8vw, 96px);
    /* font-family: 'Cascadia Code', 'Cascadia Mono', 'Fira Code', monospace; */
    font-weight: 700;
    line-height: .9;
    letter-spacing: -1px;
    color: var(--text);
    margin-bottom: 32px;
    overflow-wrap: break-word;
    font-variant-ligatures: none;
}
.hero-title-line {
    display: block;
    position: relative;
    contain: layout paint;
}
.hero-title-line::before {
    content: attr(data-final-text);
    visibility: hidden;
}
.hero-title-text {
    position: absolute;
    inset: 0 auto auto 0;
    display: block;
}
.hero-desc {
    font-size: 16px;
    font-weight: 300;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 400px;
}
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
}
.hero-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    animation: glow-pulse 4s ease-in-out infinite;
    filter: blur(60px);
    pointer-events: none;
}
#hero3d {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    cursor: grab;
    opacity: 0;
    transform: scale(0.95);
    will-change: opacity, transform, filter;
}
#hero3d.model-loaded {
    animation: modelFadeIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
#hero3d:active {
    cursor: grabbing;
}

/* ===== FEATURES STRIP ===== */
.features-strip {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 60px 32px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
}
.feature-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition);
    will-change: border-color, color, background-color;
}
.feature-pill svg {
    flex-shrink: 0;
    color: var(--accent);
}
.feature-pill:hover {
    border-color: var(--accent);
    color: var(--text);
    background: var(--accent-dim);
}

/* ===== SECTIONS ===== */
.section {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 80px 32px;
}
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 48px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    overflow-wrap: break-word;
    min-width: 0;
}
.section-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: .5px;
    transition: var(--transition);
}
.section-link:hover {
    color: var(--accent);
}

/* ===== CATEGORIES ===== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
}
.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 18px;
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    will-change: border-color, background-color, transform;
}
.category-card:hover {
    border-color: var(--accent);
    background: var(--bg-elevated);
    transform: translate3d(0, -4px, 0);
}
.category-card-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: var(--accent-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--accent);
    will-change: background-color, color;
    transition: var(--transition);
}
.category-card:hover .category-card-icon {
    background: var(--accent);
    color: #000;
}
.category-card h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.category-card p {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.empty-msg {
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ===== PRODUCTS GRID ===== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
}
.product-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    will-change: border-color, box-shadow;
    transition: var(--transition);
}
.product-card:hover {
    border-color: rgba(0, 229, 255, .3);
    /* transform: translateY(-4px); */
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.product-card .card-img {
    aspect-ratio: 1/1;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}
.product-card .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.product-card:hover .card-img img {
    /* transform: scale(1.05); */
}
.card-img-placeholder {
    color: var(--text-tertiary);
}
.card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.card-price {
    margin-top: auto;
}
.price-value {
    font-size: 22px;
    font-weight: 800;
    color: var(--accent);
}
.card-btn {
    width: 100%;
    height: 42px;
    padding: 0;
    background: var(--accent);
    color: #000;
    border: 1px solid var(--accent);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    margin-top: 0;
    display: flex;
    will-change: background-color, box-shadow;
    align-items: center;
    justify-content: center;
}
.card-btn:hover {
    background: #00c8e0;
    border-color: #00c8e0;
    color: #000;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== CTA BANNER ===== */
.cta-banner {
    padding: 0 32px;
    margin-bottom: 80px;
}
.cta-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 80px 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 300px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    filter: blur(80px);
    opacity: .3;
}
.cta-inner h2 {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}
.cta-inner p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* ===== FOOTER ===== */
.footer {
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 60px 32px 40px;
}
.footer-top {
    display: flex;
    justify-content: space-between;
    gap: 60px;
    margin-bottom: 40px;
}
.footer-brand {
    max-width: 320px;
}
.footer-logo {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 16px;
}
.footer-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}
.footer-links {
    display: flex;
    gap: 80px;
}
.footer-col h4 {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 20px;
}
.footer-col a {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
    padding: 5px 0;
    transition: var(--transition);
}
.footer-col a:hover {
    color: var(--accent);
}
.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 12px;
    color: var(--text-tertiary);
}
.footer-socials {
    display: flex;
    gap: 16px;
}
.footer-socials a {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
}
.footer-socials a:hover {
    color: var(--accent);
}

/* ===== SCROLL TO TOP ===== */
.scroll-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    opacity: 0;
    will-change: opacity, transform;
    transform: translateY(20px);
    z-index: 99;
}
.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}
.scroll-top:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== MOBILE MENU ===== */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}
.mobile-menu-toggle:hover {
    color: var(--text);
    background: rgba(255, 255, 255, .06);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .header-inner { padding: 0 20px; }
    .header-nav {
        gap: 4px;
        padding: 0 4px;
    }
    .nav-link {
        padding: 8px 8px;
        font-size: 12px;
        letter-spacing: .2px;
    }
    .hero-inner { grid-template-columns: 1fr; gap: 40px; }
    .hero-visual { min-height: 300px; }
    .hero-title { font-size: 64px; }
}
@media (max-width: 768px) {
    .header-inner { padding: 0 16px; }
    .mobile-menu-toggle { display: flex; }
    .header-nav {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: rgba(0, 0, 0, .95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 8px 0;
        border-bottom: 1px solid var(--border);
        gap: 0;
        z-index: 99;
    }
    .header-nav.mobile-open {
        display: flex;
    }
    .header-nav .nav-link {
        width: 100%;
        padding: 14px 24px;
        min-width: 0;
        max-width: none;
        justify-content: flex-start;
        font-size: 14px;
        border-radius: 0;
        background: transparent;
        border-bottom: 1px solid var(--border);
    }
    .header-nav .nav-link:last-child {
        border-bottom: none;
    }
    .hero { min-height: auto; padding-top: 120px; padding-bottom: 60px; }
    .hero-inner { padding: 0 16px; }
    .hero-title { font-size: 48px; }
    .hero-visual { display: none; }
    .features-strip { padding: 40px 16px; gap: 10px; }
    .feature-pill { padding: 10px 16px; font-size: 12px; }
    .section { padding: 60px 16px; }
    .section-title { font-size: 24px; }
    .section-header { margin-bottom: 32px; }
    .categories-grid { grid-template-columns: repeat(3, 1fr); }
    .products-grid { grid-template-columns: 1fr 1fr; }
    .cta-banner { padding: 0 16px; margin-bottom: 60px; }
    .cta-inner { padding: 50px 24px; }
    .cta-inner h2 { font-size: 24px; }
    .cta-inner .btn-outline { padding: 12px 28px; font-size: 11px; }
    .footer-top { flex-direction: column; gap: 32px; }
    .footer-links { gap: 40px; }
    .footer-inner { padding: 40px 16px 24px; }
    .search-overlay { padding-top: 120px; }
    .search-input { font-size: 20px; }
    .search-overlay-inner { padding: 0 16px; }
    .scroll-top { bottom: 20px; right: 20px; width: 42px; height: 42px; }
}
@media (max-width: 480px) {
    .hero-title { font-size: 36px; }
    .hero-desc { font-size: 14px; }
    .categories-grid { grid-template-columns: 1fr 1fr; }
    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .feature-pill span { display: none; }
    .footer-links { flex-direction: column; gap: 24px; }
    .footer-bottom { justify-content: center; text-align: center; }
    .btn-outline { padding: 12px 24px; font-size: 11px; letter-spacing: 1px; }
    .product-card .card-body { padding: 14px; }
    .product-card .card-btn { margin: 0 16px 16px; font-size: 12px; }
    .product-card .cart-action-wrapper { margin: 0 16px 16px; }
}

/* ===== PRODUCT CARD LINK (non-button area) ===== */
.product-card-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    color: inherit;
    text-decoration: none;
}
.product-card .card-btn {
    width: 100%;
    margin: 0;
}
.product-card .card-btn:disabled {
    opacity: .35;
    cursor: not-allowed;
}

/* ===== CART COUNTER (product cards) ===== */
.cart-action-wrapper {
    margin: 0 20px 20px;
}
.cart-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--accent);
    border-radius: 8px;
    overflow: hidden;
    height: 42px;
}
.counter-btn {
    width: 42px;
    height: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}
.counter-btn:hover {
    background: #00c8e0;
}
.counter-value {
    flex: 1;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    user-select: none;
}

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    bottom: 32px;
    right: 32px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 20px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .5);
    animation: toastIn .3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 340px;
}
.toast--success { border-color: rgba(0, 229, 255, .3); }
.toast--error { border-color: rgba(255, 82, 82, .3); }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; }
.toast--success .toast-icon { color: var(--accent); }
.toast--error .toast-icon { color: #ff5252; }
@keyframes toastIn {
    from { opacity: 0; transform: translateY(20px) scale(.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to   { opacity: 0; transform: translateY(20px) scale(.95); }
}
