:root {
  /* products_selection 허브 공통 디자인 시스템 (AUTHORING_GUIDE.md §6) */
  --navy: #1F4E79;
  --border: #E1E5EA;
  --bg: #F5F7F9;
  --text: #1C2733;
  --text-sub: #6B7580;

  /* 아래는 이 가이드 내부에서만 쓰는 파생 토큰(위 5개의 별칭/틴트일 뿐, 새 색 추가 아님) */
  --navy-dark: #163A5C;
  --blue: #1F4E79;
  --blue-light: #EAF1F8;
  --amber: #B26A00;
  --gray-50: #F5F7F9;
  --gray-100: #F5F7F9;
  --gray-200: #E1E5EA;
  --gray-300: #C7CDD6;
  --gray-500: #6B7580;
  --gray-700: #1C2733;
  --gray-900: #1C2733;
  --green: #1E7A46;
  --red: #C0392B;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(31, 78, 121, 0.08), 0 1px 2px rgba(31, 78, 121, 0.06);
  --shadow-lg: 0 10px 30px rgba(31, 78, 121, 0.18);
  font-size: 15px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--gray-50);
  color: var(--gray-900);
  font-family: "Pretendard", "Malgun Gothic", "Segoe UI", -apple-system, sans-serif;
  min-height: 100vh;
}

h1, h2, h3 { margin: 0; }

/* 헤더 - gas-filter/gas-mixer와 동일한 공통 패턴 (AUTHORING_GUIDE.md §7-1) */
header.app-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 14px 24px; position: sticky; top: 0; z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.home-btn {
  display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-sub);
  padding: 6px 10px; border-radius: 6px; transition: background .15s, color .15s;
}
.home-btn:hover { background: var(--bg); color: var(--navy); }
.home-btn svg { width: 16px; height: 16px; stroke: currentColor; }
.logo-box {
  width: 36px; height: 36px; border-radius: 6px; background: var(--navy);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
}
.app-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.header-right { text-align: right; font-size: 12px; color: var(--text-sub); }
.header-right .company { font-size: 14px; font-weight: 600; color: var(--text); }

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
}
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--gray-500);
  min-height: 20px;
  flex: 1 1 auto;
}
.crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--gray-200);
  padding: 5px 10px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--gray-700);
  font-weight: 600;
}
.crumb:hover { border-color: var(--blue); color: var(--blue); }
.crumb .k { color: var(--gray-500); font-weight: 500; margin-right: 2px; }
.crumb-sep { color: var(--gray-300); }
.crumb.home { color: var(--navy); }

.search-bar {
  position: relative;
  flex: 0 1 280px;
  min-width: 200px;
}
.search-input {
  width: 100%;
  border: 1px solid var(--gray-200);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  background: #fff;
  font-family: inherit;
}
.search-input:focus { outline: none; border-color: var(--blue); }
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 30;
}
.search-results.hidden { display: none; }
.search-result-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-bottom: 1px solid var(--gray-100);
  padding: 10px 14px;
  cursor: pointer;
  font-family: inherit;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: var(--blue-light); }
.search-result-item .sr-title { font-weight: 700; color: var(--navy); font-size: 13.5px; }
.search-result-item .sr-meta { font-size: 11.5px; color: var(--gray-500); margin-top: 2px; }
.search-result-item .sr-meta mark { background: var(--blue-light); color: inherit; border-radius: 2px; padding: 0 1px; }
.search-empty { padding: 14px; text-align: center; color: var(--gray-500); font-size: 12.5px; }

/* ---- 고객용 조건별 검색(facet search) - 상단 가로 바 ---- */
.facet-sidebar {
  max-width: 1180px;
  margin: 0 auto 4px;
  padding: 16px 24px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
}
.facet-sidebar.hidden { display: none; }
.facet-sidebar-title { font-size: 14px; font-weight: 800; color: var(--navy); margin-bottom: 10px; }
.facet-mode-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--gray-200); }
.facet-mode-tab {
  border: none; background: transparent; padding: 8px 14px;
  cursor: pointer; font-weight: 700; color: var(--gray-500);
  border-bottom: 2px solid transparent; font-size: 13px;
}
.facet-mode-tab.active { color: var(--navy); border-color: var(--blue); }
.facet-text-mode { padding-top: 2px; }
.facet-text-input { max-width: 320px; margin-bottom: 10px; }
.facet-selected-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px dashed var(--gray-200); }
.facet-selected-chip {
  background: var(--blue); color: #fff; border: none; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.facet-reset-btn { background: none; border: none; color: var(--gray-500); font-size: 12px; cursor: pointer; text-decoration: underline; margin-left: auto; }
.facet-group {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 10px;
}
.facet-group-label { flex: 0 0 60px; font-size: 12px; font-weight: 700; color: var(--gray-500); }
.facet-chip-row { flex: 1 1 auto; display: flex; flex-wrap: wrap; gap: 6px; }
.facet-chip {
  background: #fff; border: 1.5px solid var(--gray-200); border-radius: 999px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--gray-900);
  cursor: pointer; transition: all .12s ease;
}
.facet-chip:hover { border-color: var(--blue); color: var(--blue); }
.facet-chip.selected { background: var(--blue); border-color: var(--blue); color: #fff; }
.facet-chip-count { font-weight: 500; opacity: .7; margin-left: 4px; font-size: 11px; }
.facet-results {
  border-top: 1px solid var(--gray-200);
  margin-top: 8px;
  padding-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}
.facet-results .search-empty { grid-column: 1 / -1; }
.facet-results .search-result-item {
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 10px 12px;
}
.facet-results .search-result-item:hover { border-color: var(--blue); }
@media (max-width: 700px) {
  .facet-group { flex-direction: column; align-items: flex-start; gap: 6px; }
  .facet-group-label { flex-basis: auto; }
}

.app {
  padding: 8px 24px 60px;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---- Step: 유형/모델 카드 그리드 ---- */
.step-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--navy);
  margin: 18px 0 4px;
}
.step-desc { color: var(--gray-500); font-size: 13.5px; margin-bottom: 18px; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
}
.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 26px 22px;
  cursor: pointer;
  text-align: left;
  transition: all .12s ease;
  box-shadow: var(--shadow);
}
.card:hover {
  border-color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
.card .card-title { font-size: 19px; font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.card .card-meta { font-size: 13px; color: var(--gray-500); }
.card .card-icon {
  width: 48px; height: 48px; border-radius: 11px;
  background: var(--blue-light); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; margin-bottom: 14px;
}

/* ---- 시리즈 그룹 카드 (같은 시리즈의 여러 모델을 한 카드에 묶어 표시) ---- */
.card.series-card {
  cursor: default;
  grid-column: span 2;
  border-width: 1.5px;
  border-color: var(--blue-light);
}
.series-card .card-title { font-size: 21px; }
.series-models {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--gray-200);
}
.series-model-btn {
  background: var(--blue-light);
  color: var(--blue);
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  transition: all .12s ease;
}
.series-model-btn:hover { background: var(--blue); color: #fff; }
@media (max-width: 640px) {
  .card.series-card { grid-column: span 1; }
}

/* ---- Step: chip filter ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: #fff;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  padding: 12px 18px;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  color: var(--gray-900);
  transition: all .12s ease;
  min-width: 120px;
  text-align: center;
}
.chip:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }
.chip .chip-sub { display: block; font-weight: 500; font-size: 11.5px; color: var(--gray-500); margin-top: 3px; }

/* ---- Spec table ---- */
.spec-header {
  display: flex;
  gap: 20px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
  box-shadow: var(--shadow);
}
.spec-img-wrap {
  flex: 0 0 auto;
  width: 120px; height: 120px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--gray-100);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gray-200);
}
.spec-header.customer .spec-img-wrap { width: 260px; height: 260px; }
.spec-img-wrap img { width: 100%; height: 100%; object-fit: contain; }
.spec-img-placeholder { color: var(--gray-300); font-size: 12px; text-align: center; padding: 8px; }
.spec-info { flex: 1; min-width: 0; }
.spec-info h2 { font-size: 22px; color: var(--navy); font-weight: 800; }
.spec-info .spec-type { color: var(--gray-500); font-size: 12.5px; margin-bottom: 8px; }
.spec-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  background: var(--blue-light); color: var(--blue);
  font-size: 12px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
}
.tag.material { background: var(--gray-100); color: var(--gray-500); }

.inquiry-btn {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--navy);
  color: #fff;
  padding: 11px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}
.inquiry-btn:hover { background: var(--navy-dark); }

.catalog-btn {
  margin-top: 14px;
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}
.catalog-btn:hover { background: var(--blue-light); }

.table-wrap {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: var(--shadow);
}
table.spec-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
table.spec-table th {
  background: var(--navy);
  color: #fff;
  padding: 10px 12px;
  text-align: left;
  font-weight: 700;
  white-space: nowrap;
  position: sticky; top: 0;
}
table.spec-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  white-space: nowrap;
  color: var(--gray-900);
}
table.spec-table tbody tr:hover { background: var(--gray-50); }
table.spec-table td.wrap { white-space: normal; min-width: 160px; }
table.spec-table td.dim { color: var(--gray-300); }

.remark-box {
  margin-top: 14px;
  font-size: 12.5px;
  color: var(--gray-500);
  background: var(--gray-50);
  border: 1px dashed var(--gray-200);
  border-radius: 8px;
  padding: 10px 14px;
}

.empty-state {
  text-align: center;
  color: var(--gray-500);
  padding: 60px 20px;
}

/* ---- Toast ---- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--navy-dark);
  color: #fff;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: all .2s ease;
  z-index: 200;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

footer.footer {
  padding: 36px 24px 32px;
  font-size: 12px;
  color: var(--text-sub);
  border-top: 1px solid var(--border);
  background: #fff;
}
footer.footer .footer-inner{max-width:640px;margin:0 auto;text-align:center;}
footer.footer .footer-brand{
  display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:700;color:var(--navy);margin-bottom:16px;
}
footer.footer .footer-brand .mark{
  width:24px;height:24px;border-radius:6px;background:var(--navy);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:800;flex-shrink:0;
}
footer.footer .footer-contact-grid{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 24px;margin-bottom:18px;}
footer.footer .footer-contact-grid .item{display:flex;align-items:center;gap:7px;font-size:13px;color:var(--text);}
footer.footer .footer-contact-grid .item svg{width:15px;height:15px;stroke:var(--navy);flex-shrink:0;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;}
footer.footer .footer-contact-grid .item a{color:var(--text);transition:color .15s;}
footer.footer .footer-contact-grid .item a:hover{color:var(--navy);}
footer.footer .footer-notice{color:var(--text-sub);font-size:11.5px;padding-top:14px;border-top:1px solid var(--border);}
footer.footer .footer-credit{display:inline-block;margin-top:10px;font-size:11px;color:var(--text-sub);opacity:.7;}

@media (max-width: 720px) {
  header.app-header { padding: 12px 14px; }
  .app-title { font-size: 15px; }
  .app { padding: 8px 14px 40px; }
  .spec-header { flex-direction: column; }
  .spec-header.customer .spec-img-wrap { width: 100%; height: 200px; }
}
