* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Segoe UI', sans-serif;
  background: #fff;
  min-height: 100vh;
  overflow-x: hidden;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #13ace5; border-radius: 4px; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Layout ── */
#circuit-bg {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; width: 100%; height: 100%;
}

.page-wrap {
  width: 100%; max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 5rem;
  text-align: center;
  position: relative; z-index: 1;
}

/* ── Header ── */
.section-label {
  font-size: 22px; font-weight: 700; color: #13ace5; margin-bottom: 0.5rem;
}
.section-divider {
  width: 48px; height: 3px; background: #13ace5;
  border-radius: 2px; margin: 0 auto 2.2rem;
}
.hero-title {
  font-size: clamp(28px, 4vw, 48px); font-weight: 800;
  color: #111; line-height: 1.15; margin-bottom: 1rem;
}
.hero-subtitle {
  display: block; font-size: 0.65em; font-weight: 700;
  color: #333; margin-top: 0.3rem;
}
.hero-desc {
  font-size: 16px; color: #757979;
  margin-bottom: 3rem; line-height: 1.6;
}

/* ── Search ── */
.search-wrap {
  display: flex; justify-content: center; margin-bottom: 1.5rem;
}
.search-inner {
  position: relative; width: 100%; max-width: 520px;
}
.search-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: #13ace5; pointer-events: none;
}
#searchInput {
  width: 100%; height: 48px; padding: 0 44px;
  border: 1.5px solid #e0e0e0; border-radius: 50px;
  font-family: 'Segoe UI', sans-serif; font-size: 14px; color: #333;
  background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
#searchInput:focus {
  border-color: #13ace5;
  box-shadow: 0 0 0 3px rgba(19,172,229,0.15);
}
#clearSearch {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  color: #aaa; cursor: pointer; display: none;
}

/* ── Filters ── */
.filters-row {
  display: flex; align-items: flex-start;
  justify-content: center;
  gap: 1.25rem; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.filter-group { display: flex; flex-direction: column; gap: 6px; position: relative; }
.filter-label {
  font-size: 11px; font-weight: 600; color: #13ace5;
  text-transform: uppercase; letter-spacing: 0.07em; padding-left: 4px;
}
.filter-trigger {
  display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 16px;
  border: 1.5px solid #e0e0e0; border-radius: 50px;
  background: #fff; color: #757979;
  font-family: 'Segoe UI', sans-serif; font-size: 14px;
  cursor: pointer; user-select: none; white-space: nowrap;
  width: 260px; box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.filter-trigger.wide { width: 340px; }
.filter-trigger.open {
  border-color: #13ace5; border-radius: 16px 16px 0 0;
  box-shadow: 0 0 0 3px rgba(19,172,229,0.15);
}
.filter-trigger-icon { color: #13ace5; flex-shrink: 0; }
.filter-trigger-text { flex: 1; text-align: left; overflow: hidden; text-overflow: ellipsis; }
.filter-count {
  background: #13ace5; color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 50%; width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.filter-chevron {
  color: #757979; flex-shrink: 0;
  transition: transform 0.2s;
}
.filter-chevron.open { transform: rotate(180deg); }
.filter-dropdown {
  position: absolute; top: calc(100% - 1px); left: 0; right: 0;
  background: #fff; border: 1.5px solid #13ace5; border-top: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 8px 24px rgba(19,172,229,0.12);
  z-index: 100; max-height: 260px; overflow-y: auto;
  display: none; text-align: left;
}
.filter-dropdown.open { display: block; }
.filter-option {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; cursor: pointer;
  font-size: 13.5px; color: #444;
  transition: background 0.15s;
}
.filter-option:hover { background: #f0f9fe; }
.filter-option input[type="checkbox"] {
  accent-color: #13ace5; width: 15px; height: 15px;
  cursor: pointer; flex-shrink: 0;
}
.filter-option.checked { background: #f0f9fe; }

/* ── Clear button ── */
#clearBtn {
  margin-top: 1rem; background: none;
  border: 1.5px solid #e0e0e0; color: #757979;
  border-radius: 50px; padding: 8px 22px; font-size: 13px;
  cursor: pointer; transition: all 0.2s;
  font-family: 'Segoe UI', sans-serif;
}
#clearBtn:hover { border-color: #13ace5; color: #13ace5; }

/* ── Results header ── */
.results-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin: 2.5rem 0 1.2rem; padding: 0 4px;
  text-align: left;
}
.results-title { font-size: 16px; font-weight: 600; color: #111; }
.results-count {
  font-size: 13px; color: #757979;
  background: #f5f5f5; padding: 4px 12px; border-radius: 50px;
}

/* ── Grid ── */
#grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.2rem; text-align: left;
}

/* ── Tile ── */
.tile {
  background: #fff; border: 1.5px solid #e8e8e8;
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  animation: fadeIn 0.25s ease;
  display: flex; flex-direction: column;
}
.tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(19,172,229,0.13);
  border-color: #13ace5;
}
.tile-image {
  width: 100%; height: 160px; overflow: hidden;
  border-bottom: 1px solid #e8f4fb;
  background: #f0f8fc; flex-shrink: 0;
}
.tile-image img {
  width: 100%; height: 100%; object-fit: cover;
  display: block; transition: transform 0.4s ease;
}
.tile:hover .tile-image img { transform: scale(1.05); }
.tile-body {
  padding: 1.2rem 1.5rem 1.4rem;
  display: flex; flex-direction: column; flex: 1;
}
.tile-top {
  display: flex; align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.8rem; gap: 8px;
}
.tile-product { font-size: 15px; font-weight: 700; color: #111; line-height: 1.3; }
.tile-family {
  font-size: 11px; font-weight: 600; color: #13ace5;
  background: rgba(19,172,229,0.1); border-radius: 50px;
  padding: 3px 10px; white-space: nowrap; flex-shrink: 0;
}
.tile-desc { font-size: 13px; color: #555; line-height: 1.6; margin-bottom: 1rem; }
.tile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 0.8rem; }
.tag-func {
  font-size: 11px; padding: 3px 10px; border-radius: 50px;
  font-weight: 500; background: #f0f9fe;
  color: #0e8fb8; border: 1px solid #c8eaf7;
}
.tile-footer {
  border-top: 1px solid #f0f0f0; padding-top: 0.7rem;
  font-size: 12px; color: #999; margin-top: auto;
}
.tile-footer span { color: #13ace5; font-weight: 600; }
.enquire-btn {
  display: inline-block; margin-top: 14px;
  padding: 7px 20px; background: #13ace5;
  color: #fff; font-size: 12.5px; font-weight: 600;
  border-radius: 50px; text-decoration: none;
  font-family: 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(19,172,229,0.25);
  transition: background 0.18s, transform 0.15s, box-shadow 0.18s;
  align-self: flex-start;
}
.enquire-btn:hover {
  background: #0e8fb8;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(19,172,229,0.35);
}

/* ── Explore More button ── */
#exploreMoreWrap {
  grid-column: 1 / -1;
  display: flex; flex-direction: column; align-items: center;
  padding: 1.5rem 0 0.5rem; gap: 0.75rem;
}
#exploreMoreBtn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 32px;
  background: #fff;
  color: #13ace5;
  border: 1.5px solid #13ace5;
  border-radius: 50px;
  font-family: 'Segoe UI', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(19,172,229,0.12);
  transition: background 0.18s, color 0.18s, box-shadow 0.18s, transform 0.15s;
}
#exploreMoreBtn:hover {
  background: #13ace5; color: #fff;
  box-shadow: 0 4px 18px rgba(19,172,229,0.3);
  transform: translateY(-1px);
}
#exploreMoreBtn svg { transition: transform 0.2s; }
#exploreMoreBtn:hover svg { transform: translateY(2px); }
.explore-hint {
  font-size: 12px; color: #aaa;
}

/* ── Empty state ── */
.empty-state {
  grid-column: 1 / -1; text-align: center;
  padding: 4rem 2rem; color: #aaa;
}
.empty-state svg { margin-bottom: 1rem; opacity: 0.4; }
.empty-state p { font-size: 15px; }

/* ── Chat widget ── */
#chatFab {
  position: fixed; bottom: 28px; right: 28px;
  width: 54px; height: 54px; border-radius: 50%;
  background: #13ace5; border: none; cursor: pointer;
  box-shadow: 0 4px 18px rgba(19,172,229,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 1000; transition: transform 0.2s, box-shadow 0.2s;
}
#chatFab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(19,172,229,0.55);
}
#chatWindow {
  position: fixed; bottom: 94px; right: 28px; width: 300px;
  background: #fff; border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.14);
  z-index: 999; overflow: hidden;
  transform: scale(0.85) translateY(20px); opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  transform-origin: bottom right;
}
#chatWindow.open {
  transform: scale(1) translateY(0); opacity: 1;
  pointer-events: all;
}
.chat-header {
  background: #13ace5; padding: 14px 18px;
  display: flex; align-items: center; gap: 10px;
}
.chat-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.chat-name { font-size: 14px; font-weight: 700; color: #fff; }
.chat-status {
  font-size: 11px; color: rgba(255,255,255,0.8);
  display: flex; align-items: center; gap: 4px;
}
.chat-dot {
  width: 7px; height: 7px; background: #7fffb0;
  border-radius: 50%; display: inline-block;
}
.chat-body { padding: 18px 16px 20px; }
.chat-bubble {
  background: #f3f8fd; border-radius: 4px 14px 14px 14px;
  padding: 11px 14px; font-size: 13.5px; color: #333;
  line-height: 1.5; margin-bottom: 16px; border: 1px solid #e4f3fb;
}
.chat-options { display: flex; flex-direction: column; gap: 10px; }
.chat-option {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 12px;
  border: 1.5px solid #e0e0e0; background: #fff;
  cursor: pointer; text-decoration: none;
  transition: border-color 0.18s, background 0.18s, transform 0.15s;
}
.chat-option:hover {
  border-color: #13ace5; background: #f0f9fe;
  transform: translateX(3px);
}
.chat-option-icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(19,172,229,0.12);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #13ace5;
}
.chat-option-label { font-size: 13px; font-weight: 600; color: #111; display: block; }
.chat-option-desc { font-size: 11px; color: #888; display: block; margin-top: 1px; }
.chat-option-arrow { margin-left: auto; color: #ccc; font-size: 16px; }
