/* ============================================================
   ELEVATOR HUB — PREMIUM STYLE SHEET
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --accent: #22d3ee;
  --accent2: #f59e0b;
  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;

  /* Dark theme (default) */
  --bg: #0a0a0f;
  --bg2: #111118;
  --bg3: #1a1a26;
  --bg4: #222232;
  --surface: rgba(255,255,255,0.04);
  --surface-hover: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.08);
  --border-strong: rgba(255,255,255,0.15);
  --text: #f0f0ff;
  --text2: #a0a0c0;
  --text3: #606080;
  --shadow: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.6);
  --glass: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.1);

  --font: 'Inter', -apple-system, sans-serif;
  --mono: 'JetBrains Mono', monospace;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
  --navbar-h: 64px;
}

[data-theme="light"] {
  --bg: #f4f4f8;
  --bg2: #eeeef4;
  --bg3: #e5e5ef;
  --bg4: #d8d8e8;
  --surface: rgba(0,0,0,0.03);
  --surface-hover: rgba(0,0,0,0.06);
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.18);
  --text: #1a1a2e;
  --text2: #4a4a6a;
  --text3: #8080a0;
  --shadow: 0 8px 32px rgba(0,0,0,0.1);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.15);
  --glass: rgba(255,255,255,0.7);
  --glass-border: rgba(0,0,0,0.1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
a { text-decoration: none; color: inherit; }
button { border: none; background: none; cursor: pointer; font-family: var(--font); }
input { font-family: var(--font); }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ---------- Container ---------- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }

/* ============================================================
   NAVBAR
============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--navbar-h);
  background: rgba(10,10,15,0.8);
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
[data-theme="light"] .navbar {
  background: rgba(244,244,248,0.85);
}
.navbar.scrolled {
  background: rgba(10,10,15,0.95);
  box-shadow: 0 4px 24px rgba(0,0,0,0.3);
}
[data-theme="light"] .navbar.scrolled {
  background: rgba(244,244,248,0.97);
}
.nav-container {
  max-width: 1240px; margin: 0 auto;
  height: 100%; display: flex; align-items: center;
  padding: 0 24px; gap: 32px;
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0;
}
.logo-icon { color: var(--primary); display: flex; align-items: center; }
.logo-text {
  font-size: 20px; font-weight: 800;
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  letter-spacing: -0.5px;
}
.nav-links {
  display: flex; align-items: center; gap: 8px;
  flex: 1;
}
.nav-link {
  padding: 7px 16px; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text2);
  transition: var(--transition);
}
.nav-link:hover { color: var(--text); background: var(--surface-hover); }
.nav-cta {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white !important;
  padding: 8px 20px; border-radius: 10px;
  font-weight: 600;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.5); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.theme-toggle {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition); position: relative; overflow: hidden;
}
.theme-toggle:hover { background: var(--surface-hover); border-color: var(--border-strong); }
.theme-icon { position: absolute; transition: all 0.3s ease; }
[data-theme="dark"] .sun { opacity: 0; transform: translateY(10px); }
[data-theme="dark"] .moon { opacity: 1; transform: translateY(0); }
[data-theme="light"] .sun { opacity: 1; transform: translateY(0); }
[data-theme="light"] .moon { opacity: 0; transform: translateY(-10px); }

.nav-mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 32px; height: 32px; align-items: center; justify-content: center;
}
.nav-mobile-toggle span {
  width: 20px; height: 2px; background: var(--text2); border-radius: 2px;
  transition: var(--transition);
}
.nav-mobile-menu {
  display: none; flex-direction: column; gap: 4px;
  padding: 12px 24px 16px;
  background: var(--bg2); border-bottom: 1px solid var(--border);
}
.nav-mobile-menu a {
  padding: 10px 16px; border-radius: 8px; font-size: 15px; color: var(--text2);
  transition: var(--transition);
}
.nav-mobile-menu a:hover { color: var(--text); background: var(--surface-hover); }
.nav-mobile-menu.open { display: flex; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
}

/* ============================================================
   HERO
============================================================ */
.hero {
  min-height: 100vh;
  padding: calc(var(--navbar-h) + 60px) 24px 80px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  text-align: center;
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
}
#particleCanvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-gradient {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 30%, rgba(99,102,241,0.15) 0%, transparent 70%),
              radial-gradient(ellipse 60% 40% at 20% 80%, rgba(34,211,238,0.08) 0%, transparent 60%),
              radial-gradient(ellipse 50% 40% at 80% 70%, rgba(245,158,11,0.06) 0%, transparent 60%);
}
.hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 30%, transparent 100%);
}
.hero-content {
  position: relative; z-index: 1;
  max-width: 800px; margin: 0 auto;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 40px;
  background: var(--glass); border: 1px solid var(--glass-border);
  backdrop-filter: blur(10px);
  font-size: 13px; font-weight: 500; color: var(--text2);
  margin-bottom: 28px;
  animation: fadeDown 0.6s ease forwards;
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.25);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100%{box-shadow:0 0 0 3px rgba(16,185,129,0.25)}
  50%{box-shadow:0 0 0 6px rgba(16,185,129,0.1)}
}
.hero-title {
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -2px;
  margin-bottom: 20px;
  animation: fadeUp 0.7s 0.1s ease both;
}
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent) 50%, var(--accent2) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  background-size: 200% auto;
  animation: gradientShift 4s ease infinite;
}
@keyframes gradientShift {
  0%{background-position:0%} 50%{background-position:100%} 100%{background-position:0%}
}
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text2); line-height: 1.7;
  margin-bottom: 40px;
  animation: fadeUp 0.7s 0.2s ease both;
}

/* Search */
.search-container {
  position: relative; max-width: 700px; margin: 0 auto 28px;
  animation: fadeUp 0.7s 0.3s ease both;
}
.search-box {
  display: flex; align-items: center;
  background: var(--glass); border: 1.5px solid var(--glass-border);
  backdrop-filter: blur(20px);
  border-radius: 18px; padding: 6px 6px 6px 20px;
  transition: var(--transition);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.05);
}
.search-box:focus-within {
  border-color: var(--primary); background: var(--surface-hover);
  box-shadow: 0 8px 40px rgba(99,102,241,0.25), 0 0 0 4px rgba(99,102,241,0.1);
}
.search-icon { color: var(--text3); flex-shrink: 0; display: flex; align-items: center; margin-right: 12px; }
.search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 10px 0;
}
.search-input::placeholder { color: var(--text3); }
.search-clear {
  width: 28px; height: 28px; border-radius: 6px;
  color: var(--text3); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
  margin-right: 8px;
}
.search-clear:hover { background: var(--surface-hover); color: var(--text); }
.search-btn {
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; font-size: 14px; font-weight: 600;
  padding: 10px 22px; border-radius: 13px;
  transition: var(--transition);
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.search-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(99,102,241,0.5); }
.search-btn:active { transform: scale(0.98); }

.search-suggestions {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0;
  background: var(--bg2); border: 1px solid var(--border-strong);
  border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow-lg);
  z-index: 100; display: none;
}
.search-suggestions.show { display: block; animation: fadeDown 0.2s ease; }
.suggestion-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; cursor: pointer; transition: background 0.2s;
}
.suggestion-item:hover { background: var(--surface-hover); }
.suggestion-type {
  font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 5px;
  text-transform: uppercase; letter-spacing: 0.5px; flex-shrink: 0;
}
.suggestion-name { font-size: 14px; color: var(--text); }
.suggestion-brand { font-size: 12px; color: var(--text3); margin-left: auto; }

/* Quick tags */
.quick-tags {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  justify-content: center; margin-bottom: 40px;
  animation: fadeUp 0.7s 0.4s ease both;
}
.tag-label { font-size: 13px; color: var(--text3); font-weight: 500; }
.quick-tag {
  padding: 6px 14px; border-radius: 8px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text2);
  transition: var(--transition);
}
.quick-tag:hover {
  background: rgba(99,102,241,0.15); border-color: var(--primary);
  color: var(--primary-light); transform: translateY(-1px);
}

/* Stats */
.hero-stats {
  display: flex; align-items: center; justify-content: center; gap: 24px;
  animation: fadeUp 0.7s 0.5s ease both;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.stat-num { font-size: 28px; font-weight: 800; background: linear-gradient(135deg, var(--primary-light), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 12px; color: var(--text3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text3); font-size: 12px;
  animation: fadeUp 1s 0.8s ease both;
}
.scroll-arrow {
  width: 20px; height: 20px; border-right: 2px solid var(--text3);
  border-bottom: 2px solid var(--text3);
  transform: rotate(45deg);
  animation: bounceDown 1.5s infinite;
}
@keyframes bounceDown {
  0%,100%{transform:rotate(45deg) translateY(0)} 50%{transform:rotate(45deg) translateY(4px)}
}

/* ============================================================
   CATEGORY SECTION
============================================================ */
.filter-section {
  padding: 80px 0 40px;
}
.section-title {
  font-size: clamp(24px, 3vw, 32px); font-weight: 800;
  letter-spacing: -0.5px; margin-bottom: 8px;
}
.section-subtitle {
  font-size: 15px; color: var(--text2); margin-bottom: 36px;
}
.filter-header { text-align: center; }

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.cat-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; padding: 24px 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); transition: var(--transition);
  cursor: pointer; text-align: center;
}
.cat-card:hover, .cat-card.active {
  background: rgba(99,102,241,0.1); border-color: var(--primary);
  transform: translateY(-3px); box-shadow: 0 8px 24px rgba(99,102,241,0.15);
}
.cat-icon { font-size: 28px; line-height: 1; }
.cat-name { font-size: 13px; font-weight: 600; color: var(--text2); line-height: 1.3; }
.cat-card:hover .cat-name, .cat-card.active .cat-name { color: var(--primary-light); }
.cat-count {
  font-size: 11px; color: var(--text3);
  background: var(--surface); padding: 2px 8px; border-radius: 10px;
}
.cat-card.active .cat-count { background: rgba(99,102,241,0.15); color: var(--primary-light); }

/* ============================================================
  PRODUCT CATALOG (well-electric.com)
============================================================ */
.product-catalog-section {
  padding: 80px 0;
  background: var(--bg2);
  position: relative;
}
.product-catalog-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}
.product-catalog-header {
  text-align: center;
  margin-bottom: 48px;
}
.catalog-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 16px;
}
.catalog-link {
  color: var(--primary-light);
  text-decoration: none;
  border-bottom: 1px dashed var(--primary);
  transition: all 0.2s;
}
.catalog-link:hover {
  color: var(--primary);
  border-bottom-style: solid;
}

/* Product Categories Grid */
.product-categories-section {
  margin-bottom: 64px;
}
.section-header {
  text-align: center;
  margin-bottom: 32px;
}
.section-sub-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--text1);
  margin: 0 0 8px;
}
.section-sub-desc {
  font-size: 14px;
  color: var(--text3);
  margin: 0;
}
.product-categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
}
.product-category-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.product-category-card:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.category-icon {
  font-size: 32px;
  margin-bottom: 8px;
}
.category-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 12px;
}
.category-subs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.category-sub-tag {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg2);
  border-radius: 4px;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.2s;
}
.category-sub-tag:hover {
  background: var(--primary);
  color: white;
}
.category-count {
  font-size: 11px;
  color: var(--text3);
}

/* Featured Products Grid */
.featured-products-section {
  margin-top: 48px;
}
.featured-products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.featured-product-card {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}
.featured-product-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.15);
}
.featured-product-card.category-highlight {
  animation: categoryPulse 0.5s ease;
  border-color: var(--primary);
  box-shadow: 0 0 20px rgba(99,102,241,0.3);
}
@keyframes categoryPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.fp-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.fp-type {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.fp-brand {
  font-size: 11px;
  color: var(--text3);
}
.fp-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text1);
  margin-bottom: 8px;
  line-height: 1.4;
}
.fp-card-desc {
  font-size: 12px;
  color: var(--text3);
  line-height: 1.5;
  margin-bottom: 12px;
  flex-grow: 1;
}
.fp-card-specs {
  background: var(--bg2);
  border-radius: 6px;
  padding: 10px;
  margin-bottom: 12px;
}
.fp-spec-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--text3);
  margin-bottom: 4px;
  text-transform: uppercase;
}
.fp-specs {
  font-size: 11px;
  color: var(--text2);
  line-height: 1.5;
}
.fp-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.fp-price-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fp-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-light);
}
.fp-moq {
  font-size: 10px;
  color: var(--text3);
}
.fp-actions {
  display: flex;
  gap: 8px;
}
.fp-btn {
  font-size: 11px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.fp-btn-quote {
  background: var(--primary);
  color: white;
}
.fp-btn-quote:hover {
  background: var(--primary-dark);
}

/* Product Detail Modal */
.product-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.product-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}
.product-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 640px;
  max-height: 85vh;
  background: var(--bg1);
  border-radius: 16px;
  border: 1px solid var(--border);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  overflow: hidden;
}
.product-modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.product-modal-content {
  padding: 32px;
  max-height: 85vh;
  overflow-y: auto;
}
.product-detail-header {
  margin-bottom: 24px;
}
.product-detail-badges {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}
.pd-brand {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  background: rgba(99,102,241,0.15);
  border-radius: 4px;
  color: var(--primary-light);
}
.pd-category {
  font-size: 12px;
  color: var(--text3);
  padding: 4px 10px;
  background: var(--bg2);
  border-radius: 4px;
}
.product-detail-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text1);
  margin: 0 0 12px;
}
.product-detail-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.6;
  margin: 0;
}
.product-detail-specs {
  background: var(--bg2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.product-detail-specs h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text1);
  margin: 0 0 16px;
}
.specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.spec-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-key {
  font-size: 11px;
  color: var(--text3);
  text-transform: uppercase;
}
.spec-value {
  font-size: 13px;
  color: var(--text1);
  font-weight: 500;
}
.product-detail-pricing {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(99,102,241,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
}
.pricing-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pricing-item:last-of-type {
  border-bottom: none;
}
.pricing-label {
  font-size: 13px;
  color: var(--text2);
}
.pricing-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-light);
}
.pricing-note {
  font-size: 11px;
  color: var(--text3);
  margin-top: 12px;
  font-style: italic;
}
.related-docs-section {
  margin-bottom: 20px;
}
.related-docs-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 12px;
}
.related-docs-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.related-doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.related-doc-item:hover {
  background: var(--primary);
  color: white;
}
.related-doc-icon {
  font-size: 16px;
}
.related-doc-name {
  font-size: 12px;
  font-weight: 500;
  flex-grow: 1;
}
.related-doc-brand {
  font-size: 10px;
  padding: 2px 6px;
  background: rgba(255,255,255,0.2);
  border-radius: 3px;
}
.product-detail-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.pd-btn {
  flex: 1;
  min-width: 120px;
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.pd-btn-whatsapp {
  background: #25D366;
  color: white;
}
.pd-btn-whatsapp:hover {
  background: #20BD5A;
}
.pd-btn-email {
  background: var(--bg2);
  color: var(--text1);
  border: 1px solid var(--border);
}
.pd-btn-email:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.pd-btn-close {
  background: transparent;
  color: var(--text3);
  border: 1px solid var(--border);
}
.pd-btn-close:hover {
  background: var(--bg2);
}

/* ============================================================
  BRAND PILLS
============================================================ */
.brands-section { padding: 24px 0 60px; }
.brands-section .section-title { text-align: center; margin-bottom: 20px; }
.brand-scroll {
  display: flex; flex-wrap: nowrap; gap: 10px;
  justify-content: flex-start;
  overflow-x: auto;
  padding: 4px 8px 12px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary) transparent;
}
.brand-scroll::-webkit-scrollbar { height: 4px; }
.brand-scroll::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }
.brand-pill {
  flex-shrink: 0;
  padding: 8px 20px; border-radius: 40px;
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--text2);
  transition: var(--transition); letter-spacing: 0.3px;
}
.brand-pill:hover, .brand-pill.active {
  background: rgba(99,102,241,0.15); border-color: var(--primary);
  color: var(--primary-light);
}

/* ============================================================
   KNOWLEDGE GRID
============================================================ */
.knowledge-section { padding: 0 0 80px; }
.results-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 28px; flex-wrap: wrap; gap: 12px;
}
.results-info { display: flex; align-items: baseline; gap: 14px; }
.results-count {
  font-size: 13px; color: var(--text3);
  background: var(--surface); padding: 4px 12px; border-radius: 20px;
}
.view-toggle {
  display: flex; gap: 4px; background: var(--surface);
  padding: 4px; border-radius: 10px; border: 1px solid var(--border);
}
.view-btn {
  width: 32px; height: 32px; border-radius: 7px; display: flex;
  align-items: center; justify-content: center; color: var(--text3);
  transition: var(--transition);
}
.view-btn.active, .view-btn:hover {
  background: var(--primary); color: white;
}

/* Grid cards */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  transition: var(--transition);
}
.knowledge-grid.list-view {
  grid-template-columns: 1fr;
}
.knowledge-grid.list-view .doc-card {
  flex-direction: row; align-items: center;
  padding: 16px 24px;
}
.knowledge-grid.list-view .doc-card-header { flex-direction: row; align-items: center; gap: 16px; flex: 1; }
.knowledge-grid.list-view .doc-card-body { display: none; }
.knowledge-grid.list-view .doc-card-footer { border-top: none; padding-top: 0; flex-direction: row; align-items: center; gap: 12px; flex-shrink: 0; }

.doc-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  animation: fadeIn 0.4s ease both;
}
.doc-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(99,102,241,0.2);
  background: var(--surface-hover);
}
.doc-card-header { padding: 20px 20px 0; }
.doc-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 12px;
}
.doc-type-badge {
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  text-transform: uppercase; letter-spacing: 0.8px;
}
.badge-manual   { background: rgba(99,102,241,0.15); color: #818cf8; }
.badge-fault    { background: rgba(239,68,68,0.15);  color: #f87171; }
.badge-selection{ background: rgba(16,185,129,0.15); color: #34d399; }
.badge-wiring   { background: rgba(245,158,11,0.15); color: #fbbf24; }
.badge-installation{ background: rgba(34,211,238,0.15); color: #67e8f9; }
.badge-parameter{ background: rgba(168,85,247,0.15); color: #c084fc; }
.badge-spec     { background: rgba(249,115,22,0.15); color: #fb923c; }

.doc-brand {
  font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
  background: var(--bg3); color: var(--text2);
}
.doc-card-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  line-height: 1.3; margin-bottom: 6px;
}
.doc-card-model {
  font-size: 12px; color: var(--primary-light); font-family: var(--mono);
  font-weight: 500; margin-bottom: 8px;
}
.doc-card-body { padding: 12px 20px; flex: 1; }
.doc-card-desc {
  font-size: 13px; color: var(--text2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.doc-card-footer {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px;
}
.doc-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.doc-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--text3); }
.doc-card-meta .product-price { color: var(--success); font-weight: 700; }

/* Product Card (in search results) */
.doc-card.product-card {
  border-color: rgba(99,102,241,0.3);
}
.doc-card.product-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 30px rgba(99,102,241,0.2);
}
.doc-card-specs {
  font-size: 12px; color: var(--text3); margin-top: 8px;
  font-family: var(--mono);
  line-height: 1.5;
}

/* Product badge type */
.badge-product { border: 1px solid rgba(99,102,241,0.3); }
.doc-tag {
  font-size: 11px; padding: 3px 8px; border-radius: 5px;
  background: var(--bg3); color: var(--text3);
}
.doc-card-actions { display: flex; gap: 8px; }
.doc-btn {
  display: flex; align-items: center; gap: 5px;
  padding: 6px 12px; border-radius: 8px;
  font-size: 12px; font-weight: 600; transition: var(--transition);
}
.doc-btn-view {
  background: rgba(99,102,241,0.15); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.3);
}
.doc-btn-view:hover { background: var(--primary); color: white; }
.doc-btn-download {
  background: rgba(16,185,129,0.12); color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
}
.doc-btn-download:hover { background: var(--success); color: white; }
/* Keep legacy quote style for any remaining usage */
.doc-btn-quote {
  background: rgba(16,185,129,0.12); color: #34d399;
  border: 1px solid rgba(16,185,129,0.25);
}
.doc-btn-quote:hover { background: var(--success); color: white; }

/* Modal action buttons */
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.modal-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: var(--transition); font-family: var(--font);
  border: none;
}
.modal-btn-primary {
  background: var(--primary); color: #fff;
}
.modal-btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.modal-btn-download {
  background: rgba(16,185,129,0.15); color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}
.modal-btn-download:hover { background: var(--success); color: white; }
.modal-btn-whatsapp {
  background: rgba(37,211,102,0.12); color: #25d366;
  border: 1px solid rgba(37,211,102,0.25);
}
.modal-btn-whatsapp:hover { background: #25d366; color: white; }
.modal-btn-email {
  background: rgba(99,102,241,0.12); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.25);
}
.modal-btn-email:hover { background: var(--primary); color: white; }
.modal-btn-back {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border);
}
.modal-btn-back:hover { background: var(--surface-hover); color: var(--text); }

/* No results */
.empty-state {
  text-align: center; padding: 80px 24px; color: var(--text2);
}
.empty-icon { font-size: 60px; margin-bottom: 16px; opacity: 0.5; }
.empty-state h3 { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-state p { color: var(--text3); }
.contact-link { color: var(--primary-light); font-weight: 600; }
.contact-link:hover { text-decoration: underline; }

/* Load more */
.load-more-wrap { text-align: center; margin-top: 40px; }
.load-more-btn {
  padding: 12px 36px; border-radius: 12px;
  background: var(--surface); border: 1.5px solid var(--border);
  color: var(--text2); font-size: 14px; font-weight: 600;
  transition: var(--transition);
}
.load-more-btn:hover {
  background: var(--primary); color: white; border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(99,102,241,0.3);
}

/* ============================================================
   CONTACT SECTION
============================================================ */
.contact-section { padding: 80px 0; }
.contact-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 28px; padding: 56px;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.contact-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent), var(--accent2));
}
.contact-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 8px;
  background: rgba(99,102,241,0.15); color: var(--primary-light);
  margin-bottom: 20px; letter-spacing: 0.3px;
}
.contact-title {
  font-size: clamp(22px, 3vw, 30px); font-weight: 800;
  line-height: 1.25; margin-bottom: 16px; letter-spacing: -0.5px;
}
.contact-desc { font-size: 15px; color: var(--text2); line-height: 1.7; margin-bottom: 28px; }
.contact-info-list { display: flex; flex-direction: column; gap: 12px; }
.contact-info-item { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--text2); }
.info-icon { font-size: 16px; flex-shrink: 0; }
.contact-right { display: flex; flex-direction: column; justify-content: center; gap: 16px; }

.contact-btn {
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px; border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface-hover);
  transition: var(--transition);
}
.contact-btn:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.email-btn:hover { border-color: var(--primary); box-shadow: 0 8px 32px rgba(99,102,241,0.25); }
.whatsapp-btn:hover { border-color: var(--success); box-shadow: 0 8px 32px rgba(16,185,129,0.2); }
.btn-icon {
  width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.email-btn .btn-icon { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.whatsapp-btn .btn-icon { background: rgba(16,185,129,0.15); color: #34d399; }
.btn-text { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.btn-label { font-size: 16px; font-weight: 700; }
.btn-sub { font-size: 12px; color: var(--text3); font-family: var(--mono); }
.btn-arrow { font-size: 18px; color: var(--text3); transition: transform 0.3s ease; }
.contact-btn:hover .btn-arrow { transform: translateX(4px); color: var(--text); }
.contact-note {
  padding: 16px; border-radius: 12px;
  background: rgba(245,158,11,0.08); border: 1px solid rgba(245,158,11,0.2);
  font-size: 13px; color: var(--text2); line-height: 1.6;
}
.contact-note strong { color: var(--accent2); }

@media (max-width: 900px) {
  .contact-card { grid-template-columns: 1fr; gap: 36px; padding: 32px 24px; }
}

/* ============================================================
   FOOTER
============================================================ */
.footer {
  background: var(--bg2); border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 48px;
}
.footer-logo {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
}
.footer-logo .logo-icon { color: var(--primary); }
.footer-logo span { font-size: 18px; font-weight: 800; color: var(--text); }
.footer-desc { font-size: 13px; color: var(--text3); line-height: 1.7; margin-bottom: 20px; }
.footer-social { display: flex; gap: 10px; }
.social-link {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; transition: var(--transition);
}
.social-link:hover { background: var(--surface-hover); border-color: var(--primary); transform: translateY(-2px); }
.footer-col h4 { font-size: 13px; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.footer-col a, .footer-col p {
  display: block; font-size: 13px; color: var(--text3); margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; flex-wrap: wrap;
  font-size: 12px; color: var(--text3); gap: 8px;
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MODAL
============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(8px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal {
  position: fixed; inset: 5vw; z-index: 2001;
  background: var(--bg2); border: 1.5px solid var(--border-strong);
  border-radius: 24px; overflow: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95); opacity: 0; pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.modal.show { transform: scale(1); opacity: 1; pointer-events: auto; }
.modal-close {
  position: sticky; top: 16px; float: right; margin: 16px 16px 0 0;
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: var(--transition); z-index: 10;
}
.modal-close:hover { background: var(--danger); color: white; border-color: transparent; }
.modal-content { padding: 32px 40px; clear: both; }

/* Modal interior styles */
.modal-header { margin-bottom: 28px; }
.modal-badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.modal-title { font-size: 26px; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 6px; }
.modal-model { font-size: 14px; color: var(--primary-light); font-family: var(--mono); margin-bottom: 14px; }
.modal-desc { font-size: 15px; color: var(--text2); line-height: 1.7; }
.modal-meta { font-size: 13px; color: var(--text3); margin-top: 12px; display: flex; gap: 16px; }
.modal-preview { background: var(--bg2); border-radius: 8px; padding: 16px; }
.preview-chunk { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.preview-chunk:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.modal-divider { height: 1px; background: var(--border); margin: 28px 0; }

.modal-section-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 16px; }

/* Specs table */
.specs-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.specs-table tr { border-bottom: 1px solid var(--border); }
.specs-table td { padding: 10px 16px; font-size: 14px; vertical-align: top; }
.specs-table td:first-child { color: var(--text3); font-weight: 600; width: 36%; }
.specs-table td:last-child { color: var(--text); font-family: var(--mono); font-size: 13px; }

/* Fault codes */
.fault-list { display: flex; flex-direction: column; gap: 8px; }
.fault-item {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  transition: var(--transition);
}
.fault-item:hover { background: var(--surface-hover); }
.fault-code {
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  color: var(--danger); background: rgba(239,68,68,0.1);
  padding: 3px 8px; border-radius: 6px; flex-shrink: 0;
}
.fault-desc { font-size: 13px; color: var(--text2); }
.fault-cause { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* Feature list */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 24px;
}
.feature-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--text2);
}
.feature-item::before { content: '✓'; color: var(--success); font-weight: 700; flex-shrink: 0; }

/* Selection table */
.selection-table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 12px; border: 1px solid var(--border); }
.selection-table th {
  background: rgba(99,102,241,0.1); color: var(--primary-light);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
  padding: 12px 16px; text-align: left;
}
.selection-table td { padding: 11px 16px; font-size: 13px; border-bottom: 1px solid var(--border); color: var(--text2); }
.selection-table td:first-child { font-family: var(--mono); color: var(--text); font-weight: 500; }
.selection-table tr:last-child td { border-bottom: none; }
.selection-table tr:hover td { background: var(--surface); }

/* Modal actions */
.modal-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.modal-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 12px;
  font-size: 14px; font-weight: 600; transition: var(--transition);
}
.modal-btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; box-shadow: 0 4px 16px rgba(99,102,241,0.4);
}
.modal-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(99,102,241,0.5); }
.modal-btn-whatsapp {
  background: rgba(16,185,129,0.15); color: #34d399;
  border: 1px solid rgba(16,185,129,0.3);
}
.modal-btn-whatsapp:hover { background: var(--success); color: white; }
.modal-btn-email {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border);
}
.modal-btn-email:hover { background: var(--surface-hover); color: var(--text); }

@media (max-width: 600px) {
  .modal { inset: 0; border-radius: 0; }
  .modal-content { padding: 20px 20px; }
}

/* ============================================================
   FAB
============================================================ */
.fab-group {
  position: fixed; bottom: 28px; right: 28px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
  z-index: 900;
}
.fab-label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 4px;
}
.fab {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  transition: var(--transition);
}
.fab:hover { transform: scale(1.1) translateY(-2px); }
.fab-whatsapp { background: #25D366; color: white; }
.fab-whatsapp:hover { box-shadow: 0 12px 30px rgba(37,211,102,0.5); }
.fab-email {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
}
.fab-email:hover { box-shadow: 0 12px 30px rgba(99,102,241,0.5); }

/* ============================================================
   ANIMATIONS
============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}
.animate-on-scroll {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-on-scroll.in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   HIGHLIGHT (search match)
============================================================ */
mark {
  background: rgba(245,158,11,0.3); color: var(--accent2);
  border-radius: 3px; padding: 0 2px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 768px) {
  .hero { padding: calc(var(--navbar-h) + 40px) 20px 60px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .stat-divider { display: none; }
  .category-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .knowledge-grid { grid-template-columns: 1fr; }
  .filter-section, .brands-section, .knowledge-section, .contact-section { padding: 48px 0; }
  .search-btn span { display: none; }
  
  /* Product Catalog Mobile */
  .product-catalog-section { padding: 60px 0; }
  .product-categories-grid { grid-template-columns: 1fr; }
  .featured-products-grid { grid-template-columns: 1fr; }
  .product-modal { width: 95%; max-height: 90vh; }
  .product-modal-content { padding: 20px; }
  .specs-grid { grid-template-columns: 1fr; }
  .product-detail-actions { flex-direction: column; }
  .pd-btn { min-width: 100%; }
  .fp-card-footer { flex-direction: column; align-items: flex-start; gap: 12px; }
  .fp-actions { width: 100%; }
  .fp-btn { flex: 1; }
}

/* ============================================================
   INQUIRY FORM MODAL
============================================================ */
.iq-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.iq-overlay.show { opacity: 1; pointer-events: all; }

.iq-modal {
  position: fixed; z-index: 2001;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(620px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  padding: 36px 36px 32px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1),
              transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.iq-modal.show {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

/* Scrollbar inside modal */
.iq-modal::-webkit-scrollbar { width: 4px; }
.iq-modal::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

.iq-close {
  position: absolute; top: 16px; right: 16px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
}
.iq-close:hover { background: var(--surface-hover); color: var(--text); }

/* Header */
.iq-header { text-align: center; margin-bottom: 28px; }
.iq-icon { font-size: 36px; margin-bottom: 10px; }
.iq-title {
  font-size: 22px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.iq-subtitle { font-size: 14px; color: var(--text2); }

/* Section labels */
.iq-section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--primary-light);
  margin-bottom: 14px; display: flex; align-items: center; gap: 8px;
}
.iq-required-hint {
  font-size: 11px; font-weight: 400; letter-spacing: 0;
  text-transform: none; color: var(--text3);
}

/* Row / Field */
.iq-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.iq-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.iq-row .iq-field { margin-bottom: 0; }

.iq-label {
  font-size: 13px; font-weight: 500; color: var(--text2);
}
.iq-star { color: var(--danger); margin-left: 2px; }

.iq-input {
  width: 100%; padding: 10px 14px;
  background: var(--bg3);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px;
  font-family: var(--font);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}
.iq-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.18);
}
.iq-input::placeholder { color: var(--text3); }

.iq-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23808090' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}
.iq-select option { background: var(--bg2); }

.iq-textarea { resize: vertical; min-height: 80px; }

/* Buttons */
.iq-actions {
  display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap;
}
.iq-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition); flex: 1; min-width: 140px;
  font-family: var(--font);
}
.iq-btn-wa {
  background: #25d366; color: #fff; border: none;
}
.iq-btn-wa:hover { background: #1fba58; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(37,211,102,0.3); }

.iq-btn-email {
  background: var(--primary); color: #fff; border: none;
}
.iq-btn-email:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

.iq-btn-cancel {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border); flex: 0;
  min-width: 90px; padding: 12px 18px;
}
.iq-btn-cancel:hover { background: var(--surface-hover); color: var(--text); }

/* Mobile tweaks */
@media (max-width: 520px) {
  .iq-modal { padding: 28px 20px 24px; }
  .iq-row { grid-template-columns: 1fr; }
  .iq-actions { flex-direction: column; }
  .iq-btn { flex: unset; width: 100%; }
}

/* ============================================================
   DOWNLOAD FORM MODAL
============================================================ */
.dl-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.dl-overlay.show { opacity: 1; pointer-events: all; }

.dl-modal {
  position: fixed; z-index: 2001;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(580px, calc(100vw - 32px));
  max-height: 90vh;
  overflow-y: auto;
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg), 0 0 0 1px var(--border);
  padding: 32px 32px 28px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1),
              transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.dl-modal.show {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.dl-modal::-webkit-scrollbar { width: 4px; }
.dl-modal::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

.dl-header { text-align: center; margin-bottom: 20px; }
.dl-icon { font-size: 36px; margin-bottom: 10px; }
.dl-title {
  font-size: 20px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.dl-subtitle { font-size: 14px; color: var(--text2); }

/* Document preview in modal */
.dl-doc-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 20px;
  text-align: center;
}
.dl-doc-name {
  font-weight: 600; font-size: 15px;
  color: var(--text);
  margin-bottom: 6px;
}
.dl-doc-meta {
  font-size: 12px; color: var(--text3);
}

.dl-section-label {
  font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--primary-light);
  margin-bottom: 14px;
}
.dl-required-hint { color: var(--text3); font-weight: 400; text-transform: none; }
.dl-star { color: #ef4444; }

.dl-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
  margin-bottom: 14px;
}
.dl-field { display: flex; flex-direction: column; gap: 6px; }
.dl-label { font-size: 13px; font-weight: 500; color: var(--text2); }
.dl-input {
  padding: 11px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text);
  font-size: 14px; font-family: var(--font);
  transition: var(--transition);
}
.dl-input:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.dl-input::placeholder { color: var(--text3); }
.dl-select { cursor: pointer; }
.dl-textarea { resize: vertical; min-height: 60px; }

.dl-actions {
  display: flex; gap: 12px; margin-top: 24px;
}
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition); flex: 1; min-width: 140px;
  font-family: var(--font);
}
.dl-btn-submit {
  background: var(--primary); color: #fff; border: none;
}
.dl-btn-submit:hover {
  background: var(--primary-dark); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.dl-btn-submit:disabled {
  background: var(--text3); cursor: not-allowed; transform: none;
}
.dl-btn-cancel {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border); flex: 0;
  min-width: 90px; padding: 12px 18px;
}
.dl-btn-cancel:hover { background: var(--surface-hover); color: var(--text); }

/* Success state */
.dl-success { text-align: center; padding: 20px 0; }
.dl-success-icon { font-size: 48px; margin-bottom: 16px; }
.dl-success h3 { font-size: 20px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.dl-success-text { font-size: 14px; color: var(--text2); margin-bottom: 20px; }
.dl-download-area { margin-bottom: 20px; }
.dl-download-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 32px; background: var(--success); color: #fff;
  border-radius: var(--radius); font-size: 15px; font-weight: 700;
  text-decoration: none; transition: var(--transition);
}
.dl-download-btn:hover {
  background: #059669; transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16,185,129,0.35);
}
.dl-download-note { font-size: 12px; color: var(--text3); margin-top: 10px; }
.dl-success-actions { margin-top: 16px; }
.dl-btn-close {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border); padding: 10px 24px;
}
.dl-btn-close:hover { background: var(--surface-hover); }

@media (max-width: 520px) {
  .dl-modal { padding: 24px 18px 20px; }
  .dl-row { grid-template-columns: 1fr; }
  .dl-actions { flex-direction: column; }
  .dl-btn { flex: unset; width: 100%; }
}

/* ============================================================
   PDF PREVIEW MODAL
============================================================ */
.pdf-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(0,0,0,0.8);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
}
.pdf-overlay.show { opacity: 1; pointer-events: all; }

.pdf-modal {
  position: fixed; z-index: 2001;
  top: 50%; left: 50%;
  transform: translate(-50%, -48%) scale(0.96);
  width: min(900px, calc(100vw - 32px));
  height: min(85vh, 800px);
  background: var(--bg2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16,1,0.3,1),
              transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.pdf-modal.show {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.pdf-close {
  position: absolute; top: 14px; right: 14px;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); font-size: 14px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition);
  z-index: 1;
}
.pdf-close:hover { background: var(--surface-hover); color: var(--text); }

.pdf-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.pdf-icon { font-size: 24px; }
.pdf-title {
  font-size: 16px; font-weight: 600;
  color: var(--text);
}

.pdf-content {
  flex: 1;
  overflow: hidden;
  background: var(--bg);
}
#pdfFrame {
  border: none;
  width: 100%;
  height: 100%;
  min-height: 500px;
}

.pdf-actions {
  display: flex; gap: 12px; justify-content: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
}
.pdf-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 24px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: var(--transition);
  font-family: var(--font);
}
.pdf-btn-download {
  background: var(--primary); color: #fff; border: none;
}
.pdf-btn-download:hover {
  background: var(--primary-dark); transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(99,102,241,0.3);
}
.pdf-btn-close {
  background: var(--surface); color: var(--text2);
  border: 1px solid var(--border);
}
.pdf-btn-close:hover { background: var(--surface-hover); color: var(--text); }

@media (max-width: 768px) {
  .pdf-modal {
    width: calc(100vw - 16px);
    height: 90vh;
  }
  #pdfFrame { min-height: 400px; }
}

/* ============================================================
   AI KNOWLEDGE ASSISTANT
============================================================ */
.ai-section {
  padding: 80px 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.ai-header {
  text-align: center;
  margin-bottom: 48px;
}

.ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(99,102,241,0.1);
  border: 1px solid rgba(99,102,241,0.25);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--primary-light);
  margin-bottom: 16px;
}

/* Main Grid */
.ai-grid {
  display: grid;
  grid-template-columns: 400px 1fr;
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto 48px;
  height: 580px;
}

/* Panel Shared */
.ai-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Upload Panel */
.upload-zone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 24px 16px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--surface);
  flex-shrink: 0;
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary);
  background: rgba(99,102,241,0.05);
}
.upload-icon { font-size: 32px; margin-bottom: 8px; }
.upload-text { font-size: 14px; font-weight: 500; color: var(--text2); }
.upload-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.upload-formats {
  font-size: 11px;
  color: var(--text3);
  margin: 8px 0 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px;
  line-height: 1.8;
}
.fmt-group {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  color: var(--text3);
  white-space: nowrap;
}
.fmt-sep {
  color: var(--border-strong);
  font-size: 10px;
}
.upload-btn {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.upload-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Progress */
.upload-progress {
  margin-top: 12px;
  flex-shrink: 0;
}
.progress-file { font-size: 12px; color: var(--text2); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-bar-wrap { background: var(--bg3); border-radius: 4px; height: 6px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 4px; transition: width 0.3s ease; }
.progress-text { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* Doc List */
.doc-list { overflow-y: auto; flex: 1; min-height: 0; }
.doc-list::-webkit-scrollbar { width: 4px; }
.doc-list::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }
.doc-list-empty { text-align: center; padding: 32px 16px; color: var(--text3); font-size: 13px; }
.doc-list-empty span { font-size: 28px; display: block; margin-bottom: 8px; }

.doc-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  margin-bottom: 8px;
  transition: var(--transition);
}
.doc-item:hover { background: var(--surface-hover); }
.doc-item-icon { font-size: 24px; flex-shrink: 0; }
.doc-item-info { flex: 1; min-width: 0; }
.doc-item-name { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 3px; font-size: 11px; color: var(--text3); }
.doc-brand-tag { background: rgba(99,102,241,0.15); color: var(--primary-light); padding: 1px 6px; border-radius: 4px; }
.doc-item-del { background: none; border: none; cursor: pointer; font-size: 14px; padding: 4px; opacity: 0.5; transition: opacity 0.2s; flex-shrink: 0; }
.doc-item-del:hover { opacity: 1; }

/* Chat Panel */
.chat-status {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 11px;
  color: var(--text3);
  font-weight: 400;
}
.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text3);
  animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; } 50% { opacity: 0.4; }
}

.chat-messages { flex: 1; overflow-y: auto; padding: 4px 0 12px; min-height: 0; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 2px; }

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 12px;
  color: var(--text2);
}
.chat-welcome-icon { font-size: 36px; margin-bottom: 12px; }
.chat-welcome-text { font-size: 13px; line-height: 1.6; color: var(--text2); max-width: 340px; }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chat-suggestion {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 12px;
  color: var(--text2);
  cursor: pointer;
  transition: var(--transition);
}
.chat-suggestion:hover { background: var(--surface-hover); color: var(--text); border-color: var(--primary); }

.chat-msg { display: flex; gap: 10px; margin-bottom: 14px; animation: fadeInUp 0.3s ease; }
.chat-msg-user { flex-direction: row-reverse; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.chat-msg-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--bg3); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.chat-msg-bubble { max-width: 80%; padding: 10px 14px; border-radius: 14px; font-size: 13px; line-height: 1.6; word-break: break-word; }
.chat-msg-user .chat-msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg-assistant .chat-msg-bubble { background: var(--bg3); color: var(--text); border-bottom-left-radius: 4px; border: 1px solid var(--border); }

/* Thinking dots */
.thinking-dots { display: flex; gap: 4px; align-items: center; padding: 4px 0; }
.thinking-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--text3); animation: thinking 1.2s infinite; }
.thinking-dots span:nth-child(2) { animation-delay: 0.2s; }
.thinking-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes thinking { 0%, 60%, 100% { transform: scale(1); opacity: 0.4; } 30% { transform: scale(1.3); opacity: 1; } }

/* Sources */
.chat-sources { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 10px; }
.sources-label { font-size: 11px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.source-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 8px; background: var(--surface); border-radius: 8px;
  margin-bottom: 6px; font-size: 12px;
}
.source-rank { width: 18px; height: 18px; border-radius: 50%; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; flex-shrink: 0; }
.source-info { flex: 1; min-width: 0; }
.source-name { color: var(--text); font-weight: 500; }
.source-brand { background: rgba(99,102,241,0.15); color: var(--primary-light); padding: 1px 5px; border-radius: 3px; font-size: 10px; margin-left: 4px; }
.source-rel { color: var(--success); font-size: 10px; margin-left: 4px; }
.source-excerpt { color: var(--text3); font-size: 11px; margin-top: 3px; line-height: 1.5; }
.source-quote-btn { background: var(--primary); color: #fff; border: none; border-radius: 6px; padding: 4px 10px; font-size: 11px; font-weight: 600; cursor: pointer; flex-shrink: 0; transition: var(--transition); }
.source-quote-btn:hover { background: var(--primary-dark); }

/* Markdown Formatting in Chat */
.chat-h2 { font-size: 15px; font-weight: 700; color: var(--primary); margin: 8px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.chat-h3 { font-size: 13px; font-weight: 600; color: var(--text); margin: 10px 0 4px; }
.chat-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
.chat-quote { 
  background: rgba(99,102,241,0.08); 
  border-left: 3px solid var(--primary); 
  padding: 8px 12px; 
  margin: 8px 0; 
  border-radius: 0 6px 6px 0;
  font-style: italic;
  color: var(--text2);
}
.chat-p { margin: 6px 0; line-height: 1.6; }
.chat-p:first-child { margin-top: 0; }
.chat-p:last-child { margin-bottom: 0; }

/* Code blocks for specs and tables */
.chat-code, pre.chat-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text2);
}

/* Key specs highlight */
.chat-p:has(strong) {
  background: linear-gradient(90deg, rgba(99,102,241,0.05) 0%, transparent 100%);
  padding: 4px 8px;
  border-radius: 4px;
  margin-left: -8px;
  margin-right: -8px;
}

/* Lists in chat */
.chat-bubble ul {
  margin: 8px 0;
  padding-left: 20px;
}
.chat-bubble li {
  margin: 4px 0;
  color: var(--text2);
}
.chat-bubble li::marker {
  color: var(--primary);
}

/* Selection requirement table */
.chat-bubble .selection-req {
  margin: 10px 0;
}
.chat-bubble .selection-req table,
.chat-bubble table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 12px;
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}
.chat-bubble table th {
  background: var(--bg3);
  color: var(--text);
  font-weight: 600;
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.chat-bubble table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.chat-bubble table tr:last-child td {
  border-bottom: none;
}
.chat-bubble table tr:hover td {
  background: var(--surface-hover);
}

/* Product card enhancement */
.chat-bubble [align="center"] {
  text-align: center;
  padding: 8px;
  background: linear-gradient(135deg, rgba(99,102,241,0.1) 0%, rgba(34,211,238,0.05) 100%);
  border-radius: 12px;
  margin: 10px 0;
}
.chat-bubble [align="center"] h2 {
  color: var(--primary);
  font-size: 16px;
  margin: 4px 0;
}

/* Recommended model badge */
.chat-bubble table td strong {
  color: var(--primary);
  font-weight: 600;
}

/* Chat Input */
.chat-input-area {
  display: flex; gap: 8px; padding-top: 12px;
  border-top: 1px solid var(--border); flex-shrink: 0;
}
.chat-input {
  flex: 1; padding: 10px 14px;
  background: var(--bg3); border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); color: var(--text); font-size: 13px;
  font-family: var(--font); outline: none; transition: border-color 0.2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-input::placeholder { color: var(--text3); }
.chat-send {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: var(--primary); border: none; color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: var(--transition); flex-shrink: 0;
}
.chat-send:hover { background: var(--primary-dark); transform: scale(1.05); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* How it works */
.ai-features {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; max-width: 900px; margin: 0 auto;
  flex-wrap: wrap;
}
.ai-feature {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 24px;
  text-align: center; flex: 1; min-width: 160px;
}
.ai-feature-icon { font-size: 28px; margin-bottom: 8px; }
.ai-feature-title { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.ai-feature-desc { font-size: 12px; color: var(--text3); line-height: 1.5; }
.ai-feature-arrow { font-size: 20px; color: var(--text3); flex-shrink: 0; }

/* Responsive AI */
@media (max-width: 900px) {
  .ai-grid { grid-template-columns: 1fr; height: auto; }
  .ai-chat-panel { height: 500px; }
  .ai-upload-panel { height: auto; max-height: 400px; }
  .ai-features { flex-direction: column; }
  .ai-feature-arrow { transform: rotate(90deg); }
}

/* ============================================================
   PWA — BOTTOM NAVIGATION (Mobile)
============================================================ */
:root {
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --bnav-h: 64px;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bnav-h);
  padding-bottom: var(--safe-bottom);
  background: rgba(17, 17, 24, 0.95);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 1000;
  justify-content: space-around;
  align-items: flex-end;
  padding-top: 4px;
}

@media (max-width: 1024px) {
  .bottom-nav { display: flex; }
}

.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  flex: 1;
  padding: 6px 4px 8px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.45);
  transition: color 0.2s ease, transform 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  min-width: 0;
}

.bnav-item:active { transform: scale(0.92); }
.bnav-item.active { color: var(--primary-light); }
.bnav-item.active .bnav-icon { filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6)); }
.bnav-icon { width: 24px; height: 24px; }
.bnav-item span { font-size: 10px; font-weight: 500; white-space: nowrap; }

.bnav-center { flex: 1; }
.bnav-center-btn {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex; align-items: center; justify-content: center;
  margin-top: -20px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.5);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bnav-center .bnav-icon { width: 22px; height: 22px; color: white; }
.bnav-center:active .bnav-center-btn { transform: scale(0.9); box-shadow: 0 2px 10px rgba(99, 102, 241, 0.3); }
.bnav-center span { color: var(--primary-light); }

/* ============================================================
   PWA — INSTALL BANNER
============================================================ */
.pwa-install-banner {
  display: none;
  position: fixed;
  bottom: calc(var(--bnav-h) + var(--safe-bottom) + 12px);
  left: 16px;
  right: 16px;
  background: linear-gradient(135deg, rgba(30, 30, 50, 0.98), rgba(20, 20, 35, 0.98));
  border: 1px solid rgba(99, 102, 241, 0.4);
  border-radius: 16px;
  padding: 14px 16px;
  z-index: 1100;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.pwa-install-banner.show { display: flex; align-items: center; gap: 12px; justify-content: space-between; }
@keyframes slideUpBanner { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.pwa-install-content { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pwa-install-icon { font-size: 28px; flex-shrink: 0; }
.pwa-install-text { display: flex; flex-direction: column; gap: 2px; }
.pwa-install-text strong { font-size: 14px; font-weight: 600; color: #f0f0ff; }
.pwa-install-text small { font-size: 11px; color: rgba(255, 255, 255, 0.5); }
.pwa-install-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.pwa-install-btn {
  background: var(--primary); color: #fff; border: none;
  border-radius: 10px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: var(--font);
  transition: background 0.2s, transform 0.15s;
}
.pwa-install-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.pwa-install-btn:active { transform: scale(0.96); }
.pwa-dismiss-btn {
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5); border-radius: 8px;
  width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  font-size: 12px; cursor: pointer;
}
.pwa-dismiss-btn:hover { background: rgba(255, 255, 255, 0.15); }

/* ============================================================
   PWA — OFFLINE TOAST
============================================================ */
.offline-toast {
  display: none;
  position: fixed; top: 80px; left: 50%;
  transform: translateX(-50%);
  background: rgba(30, 30, 50, 0.98);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 100px; padding: 10px 20px;
  font-size: 13px; color: rgba(255, 255, 255, 0.8);
  z-index: 3000; align-items: center; gap: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  animation: fadeDownToast 0.3s ease; white-space: nowrap;
}
.offline-toast.show { display: flex; }
@keyframes fadeDownToast { from { opacity: 0; transform: translateX(-50%) translateY(-10px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ============================================================
   PWA — MOBILE LAYOUT ADJUSTMENTS
============================================================ */
@media (max-width: 1024px) {
  body { padding-bottom: calc(var(--bnav-h) + var(--safe-bottom) + 20px); }
  .hero { padding: calc(var(--navbar-h) + 24px) 20px 48px; }
  .ai-grid { grid-template-columns: 1fr; height: auto; max-height: none; }
  .ai-upload-panel, .ai-chat-panel { height: 420px; max-height: 420px; }
  .modal { inset: 0; border-radius: 0; }
  .search-bar { flex-direction: column; border-radius: 16px; padding: 12px; }
  .search-input-wrap { width: 100%; }
  .search-btn { width: 100%; border-radius: 12px; justify-content: center; margin-top: 8px; }
  .fab-group { display: none; }
  .footer { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: clamp(26px, 8vw, 40px); }
  .hero-subtitle { font-size: 15px; }
  .ai-section, .knowledge-section { padding: 48px 0; }
}

/* ============================================================
   PWA — TOUCH & ACCESSIBILITY
============================================================ */
.bnav-item, .pwa-install-btn, .pwa-dismiss-btn {
  user-select: none;
  -webkit-user-select: none;
}
* { -ms-touch-action: manipulation; touch-action: manipulation; }
.bnav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; border-radius: 8px; }

/* Light theme overrides */
[data-theme="light"] .pwa-install-banner { background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(245,245,255,0.98)); border-color: rgba(99,102,241,0.3); }
[data-theme="light"] .pwa-install-text strong { color: #1a1a26; }
[data-theme="light"] .bottom-nav { background: rgba(255,255,255,0.95); border-top-color: rgba(0,0,0,0.08); }
[data-theme="light"] .bnav-item { color: rgba(0,0,0,0.45); }
[data-theme="light"] .offline-toast { background: rgba(255,255,255,0.98); color: rgba(0,0,0,0.8); border-color: rgba(99,102,241,0.3); }
