:root {
    --primary-blue: #f8fafc;
    --light-blue: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.05);
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --bg-main: transparent;
    --white: rgba(30, 41, 59, 0.4);
    --glass-bg: rgba(30, 41, 59, 0.6);
    --shadow-soft: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-hover: 0 10px 30px rgba(56,189,248,0.3);
    --transition-speed: 0.3s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Inter', sans-serif;
    background: radial-gradient(circle at top right, #0f172a, #020617);
    color: var(--text-main);
    line-height: 1.5; min-height: 100vh; background-attachment: fixed;
}
body::before {
    content: ''; position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 80vw; height: 80vh; background: radial-gradient(circle, rgba(56,189,248,0.1) 0%, rgba(15,23,42,0) 70%);
    z-index: -1; pointer-events: none; filter: blur(100px); animation: pulse-glow 8s infinite alternate;
}
@keyframes pulse-glow {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    100% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.8; }
}

/* ── TOP BAR ───────────────────────────────── */
#topbar {
    position: sticky;
    top: 0;
    height: 72px;
    background: rgba(15, 19, 28, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.09);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    gap: 1.5rem;
    z-index: 200;
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-shrink: 0;
}
.topbar-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.version-badge {
    font-size: 0.75rem;
    font-family: monospace;
    color: #64748b;
    background: rgba(30,41,59,0.5);
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    font-style: italic;
}
.logo-link {
    display: flex;
    align-items: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    border: none;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
}
.logo-link:hover {
    transform: scale(1.05);
}
.logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    display: block;
}
.app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    padding-left: 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.09);
    white-space: nowrap;
    color: #ffffff;
}

.main-container { max-width: 1200px; margin: 40px auto; padding: 0 20px; position: relative; z-index: 10; }

.filter-section {
    background: rgba(30,41,59,0.4); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px 32px; box-shadow: var(--shadow-soft); margin-bottom: 30px;
}
.filter-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; border-bottom: 1px solid var(--border-color); padding-bottom: 16px; }
.filter-title-wrap { display: flex; align-items: center; gap: 8px; }
.filter-title-wrap h2 { font-size: 18px; font-weight: 600; color: #fff; }
.info-icon { display: flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.2); font-size: 12px; color: rgba(255,255,255,0.5); }
.info-icon:hover { color: #fff; border-color: #fff; background: rgba(255,255,255,0.1); }
.reset-btn { background: none; border: none; color: var(--primary-blue); font-size: 14px; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.3s; }
.reset-btn:hover { color: #7dd3fc; }

.filter-grid { display: flex; flex-direction: column; gap: 16px; }
.filter-row { display: flex; align-items: flex-start; }
.filter-label { width: 180px; font-size: 14px; color: var(--text-main); font-weight: 500; padding-top: 6px; }
.filter-options { display: flex; flex-wrap: wrap; gap: 12px; flex: 1; }
.filter-option { background: rgba(15,23,42,0.4); border: 1px solid var(--border-color); padding: 6px 14px; border-radius: 8px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.filter-option:hover { color: var(--primary-blue); border-color: rgba(56,189,248,0.3); background: rgba(56,189,248,0.05); }
.filter-option.active { color: #0f172a; background-color: var(--primary-blue); font-weight: 600; border-color: var(--primary-blue); box-shadow: 0 0 15px rgba(56,189,248,0.4); }
.filter-footer { display: flex; justify-content: center; margin-top: 24px; }
.more-filters-btn { background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); padding: 8px 16px; border-radius: 20px; font-size: 13px; color: var(--text-muted); cursor: pointer; transition: all 0.3s; }
.more-filters-btn:hover { background: rgba(255,255,255,0.1); color: var(--text-main); }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.product-card {
    background: rgba(30,41,59,0.4); backdrop-filter: blur(16px);
    border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 24px; display: flex; flex-direction: column; align-items: center; cursor: pointer; position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175,0.885,0.32,1.275);
}
.product-card::before { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.03), transparent); transform: skewX(-20deg); transition: left 0.7s; }
.product-card:hover { transform: translateY(-8px) scale(1.02); border-color: rgba(56,189,248,0.3); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.7), 0 0 20px rgba(56,189,248,0.2); }
.product-card:hover::before { left: 200%; }
.product-image { width: 200px; height: 150px; object-fit: contain; margin-bottom: 20px; filter: drop-shadow(0 10px 10px rgba(0,0,0,0.5)); }
.product-name { font-size: 16px; font-weight: 700; color: var(--primary-blue); margin-bottom: 16px; text-align: center; }
.product-specs { width: 100%; font-size: 13px; color: var(--text-muted); }
.spec-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.spec-row:last-child { border-bottom: none; }
.spec-value { font-weight: 500; color: var(--text-main); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(2,6,23,0.8); backdrop-filter: blur(8px); display: flex; justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: rgba(15,23,42,0.85); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 1.5rem; width: 1100px; max-width: 95%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: 0 30px 60px rgba(0,0,0,0.6); }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border-color); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 18px; color: var(--text-main); font-weight: 600; margin: 0; }
.close-btn { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text-muted); }
.close-btn:hover { color: #ef4444; }
.modal-body { padding: 24px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border-color); text-align: right; }
.primary-btn { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); color: #fff; border: none; padding: 10px 24px; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; box-shadow: 0 4px 15px rgba(245,158,11,0.3); transition: all 0.3s; }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(245,158,11,0.5); }
.cable-option { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px; margin-bottom: 10px; cursor: pointer; background: rgba(255,255,255,0.02); transition: all 0.3s; }
.cable-option:hover { border-color: rgba(56,189,248,0.5); background: rgba(56,189,248,0.05); }
.cable-option:has(input:checked) {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transform: scale(1.01);
}
.cable-option:has(input:checked) span {
    color: #fff;
    font-weight: 600;
}
.code-badge {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b !important;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
    margin-left: 5px;
    border: 1px solid rgba(245, 158, 11, 0.15);
    font-size: 11px;
    vertical-align: middle;
}
.cable-option input { accent-color: #38bdf8; }
@media (max-width: 768px) { .filter-row { flex-direction: column; } .filter-label { width: 100%; margin-bottom: 8px; } }