/* PC 견적 맞추기 (build.html) */
.b-hero { padding-bottom: 64px; }
.b-sec { padding-top: 70px; }
.wide-est { max-width: 1180px; }
.b-est { margin-top: 0; grid-template-columns: minmax(0, 1fr) 340px; }
.b-left { padding-bottom: 30px; }

.q-sub { clear: both; font-size: 14px; font-weight: 600; color: var(--gray); margin: 4px 0 10px; }
.q-sub + .opts + .q-sub { margin-top: 18px; }
.bud-custom { margin-top: 12px; font-size: 15px; color: var(--gray); }
.bud-custom input {
  width: 96px; margin: 0 4px 0 8px; padding: 9px 12px; border: 0; border-radius: 12px;
  box-shadow: inset 0 0 0 1px var(--line); font: inherit; font-size: 16px; color: var(--ink);
}
.bud-custom input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.q[hidden] { display: none; }

/* 결과 */
.b-result { margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.r-empty { color: var(--gray); font-size: 16px; padding: 10px 0; }
.b-tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 980px; background: var(--tile); }
.b-tabs button {
  border: 0; background: transparent; cursor: pointer; padding: 9px 18px; border-radius: 980px;
  font-size: 15px; font-weight: 600; color: var(--gray);
}
.b-tabs button[aria-selected="true"] { background: var(--white); color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.b-note { margin-top: 14px; background: #fff6e8; color: #8a4b00; border-radius: 14px; padding: 12px 16px; font-size: 15px; }

.b-parts { list-style: none; margin: 18px 0 0; padding: 0; }
.b-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) auto; gap: 6px 16px; padding: 16px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.b-cat { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 13px; font-weight: 700; color: var(--accent); }
.b-ico {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px;
  background: linear-gradient(145deg, #f5f5f7, #e8e8ed); color: var(--ink);
}
.b-ico svg { width: 26px; height: 26px; }
.b-row-opt .b-ico { color: var(--gray-2); }
.b-row-opt .b-main b { color: var(--gray); font-weight: 500; }
.b-main { min-width: 0; }
.b-main b { display: block; font-size: 16px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.b-main > span { display: block; font-size: 14px; color: var(--gray); margin-top: 2px; }
.b-price { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.b-links { display: flex !important; flex-wrap: wrap; gap: 4px 12px; margin-top: 6px !important; font-size: 13px !important; }
.b-links a { color: var(--blue-link); }
.b-links a::after { content: " ↗"; font-size: 11px; }
.b-links a:hover { text-decoration: underline; }
.b-links em { font-style: normal; color: #1a7f37; font-weight: 600; }
.b-swap { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--gray); min-width: 0; }
.b-swap span { flex: none; }
.b-swap select {
  min-width: 0; width: 100%; max-width: 100%; flex: 1 1 0; text-overflow: ellipsis; padding: 8px 30px 8px 12px; border: 0; border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--line); background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e6e73' stroke-width='1.6'/%3E%3C/svg%3E") right 10px center/11px no-repeat;
  -webkit-appearance: none; appearance: none; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer;
}
.b-swap select:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.b-basis { margin-top: 12px; font-size: 13px; color: var(--gray); }

/* 다른 부품 고르기 버튼 */
.b-pick-btn {
  margin-top: 10px; border: 0; cursor: pointer; padding: 8px 14px; border-radius: 980px;
  background: #f2f8ff; color: var(--blue-link); font-size: 14px; font-weight: 600;
  box-shadow: inset 0 0 0 1px #cfe3ff; transition: background .15s ease;
}
.b-pick-btn:hover { background: #e3f0ff; }
.b-pick-btn small { color: var(--gray); font-weight: 500; margin-left: 2px; }

/* 부품 고르기 창 */
.bp-pick {
  width: min(860px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; border: 0; border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.25); color: var(--ink); background: var(--white); overflow: hidden;
  display: flex; flex-direction: column;
}
.bp-pick:not([open]) { display: none; }
.bp-pick::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(2px); }
.pk-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px 10px; }
.pk-head h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; }
.pk-head .b-ico { width: 38px; height: 38px; border-radius: 12px; }
.pk-head .b-ico svg { width: 22px; height: 22px; }
.pk-close { border: 0; background: var(--tile); width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 16px; color: var(--gray); }
.pk-tools { display: flex; gap: 8px; padding: 0 22px 10px; }
.pk-q, .pk-sort {
  font: inherit; font-size: 15px; border: 0; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); padding: 10px 14px; color: var(--ink); background: var(--white);
}
.pk-q { flex: 1; min-width: 0; }
.pk-q:focus, .pk-sort:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue); }
.pk-body { overflow-y: auto; padding: 0 22px 22px; flex: 1; overscroll-behavior: contain; }
.pk-facets { display: grid; gap: 8px; padding: 6px 0 4px; border-bottom: 1px solid var(--line-2); padding-bottom: 12px; }
.pk-facet { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; align-items: start; }
.pk-fk { font-size: 13px; font-weight: 700; color: var(--gray); padding-top: 6px; }
.pk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pk-chips button {
  border: 0; cursor: pointer; padding: 6px 11px; border-radius: 980px; background: var(--tile); font-size: 13px; font-weight: 500; color: var(--ink);
}
.pk-chips button small { color: var(--gray-2); font-size: 11px; margin-left: 1px; }
.pk-chips button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.pk-chips button[aria-pressed="true"] small { color: #c7c7cc; }
.pk-chips button:disabled { opacity: .35; cursor: default; }
.pk-count { font-size: 13px; color: var(--gray); margin: 10px 0 6px; }
.pk-list { list-style: none; margin: 0; padding: 0; }
.pk-item {
  width: 100%; display: flex; justify-content: space-between; gap: 14px; text-align: left; border: 0; background: none; cursor: pointer;
  padding: 12px 10px; border-radius: 12px; font: inherit; color: inherit;
}
.pk-item:hover { background: #f5f5f7; }
.pk-item.is-cur { background: #f2f8ff; box-shadow: inset 0 0 0 1.5px var(--blue); }
.pk-main { min-width: 0; }
.pk-main b { display: block; font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.pk-main small { display: block; font-size: 13px; color: var(--gray); margin-top: 2px; }
.pk-price { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pk-price b { display: block; font-size: 15px; }
.pk-price small { display: block; font-size: 12px; color: var(--gray); }
.pk-empty { padding: 30px 0; text-align: center; color: var(--gray); }
.pk-group {
  position: sticky; top: 0; z-index: 1; margin-top: 8px; padding: 8px 10px; font-size: 13px; font-weight: 700;
  color: var(--accent); background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line-2);
}
@media (max-width: 640px) {
  .bp-pick { width: 100vw; max-width: 100vw; height: 92vh; max-height: 92vh; margin: auto 0 0; border-radius: 22px 22px 0 0; }
  .pk-head, .pk-tools { padding-left: 16px; padding-right: 16px; }
  .pk-body { padding: 0 12px 20px 16px; }
  .pk-facet { grid-template-columns: 1fr; gap: 4px; }
  .pk-fk { padding-top: 0; }
  .pk-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .pk-chips::-webkit-scrollbar { display: none; }
  .pk-chips button { flex: none; }
}

.b-fit { margin-top: 22px; background: var(--tile); border-radius: 18px; padding: 18px 20px; }
.b-fit-k { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.b-fit ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 18px; }
.b-fit li { display: flex; justify-content: space-between; gap: 10px; font-size: 15px; }
.b-fit i { font-style: normal; font-weight: 700; font-size: 13px; padding: 2px 10px; border-radius: 980px; white-space: nowrap; }
.fit-great { background: #e3f1ff; color: #0058b0; }
.fit-good { background: #e6f6ea; color: #1a7f37; }
.fit-ok { background: #fff4d6; color: #8a5a00; }
.fit-low { background: #ffe5e5; color: #b42318; }

@media (max-width: 900px) {
  .b-est { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .b-row { grid-template-columns: minmax(0, 1fr) auto; }
  .b-cat { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 10px; }
  .b-ico { width: 38px; height: 38px; border-radius: 12px; }
  .b-ico svg { width: 22px; height: 22px; }
  .b-main { grid-column: 1 / 2; }
  .b-price { grid-column: 2 / 3; grid-row: 2; }
  .b-tabs { display: flex; }
  .b-tabs button { flex: 1; padding: 9px 8px; font-size: 14px; }
}
