/* 에이스팩 전자 카탈로그 — 화면 스타일
   톤: 흰 배경·넉넉한 여백·다크블루 포인트, 장식 최소. 카드의 사양 칸(용량·외경·높이)을
   도면 표제란처럼 정돈된 숫자로 보여 주는 것이 이 화면의 중심 요소다. */

/* ───────── 토큰 ───────── */
:root {
  --primary: #0B2A4A;      /* 포인트 다크블루 */
  --accent: #1F5FA8;       /* 보조 블루(코드·포커스) */
  --text: #1D2935;         /* 본문 1단계 */
  --muted: #687482;        /* 보조 텍스트 2단계 */
  --line: #E3E7EC;         /* 얇은 구분선 */
  --line-strong: #C7D0DA;  /* 호버·입력 테두리 */
  --surface: #F5F7F9;      /* 푸터 등 옅은 면 */
  --bg: #FFFFFF;

  --font-ko: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', system-ui, sans-serif;
  --font-en: 'Inter', 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --radius-card: 8px;
  --radius-ctl: 6px;
  --gutter: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.2, .6, .2, 1);
}

/* ───────── 기본 ───────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ko);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
html[lang="en"] body { font-family: var(--font-en); }
h1, h2, p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

.num, .card__code, .brand__mark { font-variant-numeric: tabular-nums; }

.wrap {
  width: 100%;
  max-width: calc(1240px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  padding: 8px 14px; border-radius: var(--radius-ctl);
  background: var(--primary); color: #fff; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ───────── 헤더 ───────── */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 12px 24px;
  min-height: 64px;
  padding-top: 12px; padding-bottom: 12px;
}
.brand {
  display: flex; align-items: baseline; gap: 12px;
  text-decoration: none; margin-right: auto;
}
.brand__mark {
  font-family: var(--font-en);
  font-weight: 700; font-size: 19px; letter-spacing: .16em;
  color: var(--primary);
}
.brand__tagline {
  font-size: 13px; color: var(--muted);
  padding-left: 12px; border-left: 1px solid var(--line-strong);
  line-height: 1.1;
}
.site-header__tools { display: flex; align-items: center; gap: 10px; }

.search { position: relative; display: block; }
.search__icon {
  position: absolute; left: 12px; top: 50%; translate: 0 -50%;
  width: 17px; height: 17px; color: var(--muted); pointer-events: none;
}
.search input {
  width: 320px; height: 40px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
  background: #fff; font-size: 14.5px;
  transition: border-color .15s, box-shadow .15s;
}
.search input::placeholder { color: #98A2AE; }
.search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(31, 95, 168, .14); }

.lang-toggle {
  display: inline-flex; height: 40px; padding: 3px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
  background: #fff; cursor: pointer;
  font-family: var(--font-en); font-size: 12.5px; font-weight: 600; letter-spacing: .06em;
}
.lang-toggle span {
  display: inline-flex; align-items: center; padding: 0 10px;
  border-radius: 4px; color: var(--muted);
  transition: background-color .2s, color .2s;
}
.lang-toggle span.is-current { background: var(--primary); color: #fff; }

/* ───────── 소개 ───────── */
.intro { padding: clamp(36px, 6vw, 64px) 0 clamp(24px, 3.5vw, 36px); }
.intro h1 {
  font-size: clamp(30px, 1.6rem + 1.8vw, 44px);
  line-height: 1.15; font-weight: 700; letter-spacing: -.025em;
  color: var(--primary);
}
.intro__lead { margin-top: 12px; max-width: 34em; font-size: 16px; color: var(--muted); }

/* ───────── 범주 탭 ───────── */
.tabs {
  display: flex; gap: 28px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab {
  flex: none; display: inline-flex; align-items: baseline; gap: 6px;
  padding: 12px 0 13px; margin-bottom: -1px;
  border: 0; border-bottom: 2px solid transparent; background: none;
  font-size: 15px; font-weight: 500; color: var(--muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-pressed="true"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tabs__count { font-size: 12px; color: #98A2AE; font-weight: 500; }
.tabs__tab[aria-pressed="true"] .tabs__count { color: var(--accent); }

/* ───────── 보조 필터 ───────── */
.filters {
  display: grid; gap: 14px 48px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.filter { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; }
html[lang="en"] .filter { grid-template-columns: 96px minmax(0, 1fr); }
.filter__label { font-size: 13px; font-weight: 500; color: var(--muted); }
.filter__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  height: 32px; padding: 0 13px;
  border: 1px solid var(--line-strong); border-radius: 4px;
  background: #fff; color: var(--text);
  font-size: 13.5px; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.chip:hover { border-color: var(--primary); }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip[data-key="mat"] { font-family: var(--font-en); letter-spacing: .01em; }

/* ───────── 결과 줄 ───────── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0 20px;
}
.toolbar__count { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
/* 로딩 실패 시 건수 자리의 [다시 시도] 버튼 */
.toolbar__count #retry { height: 32px; padding: 0 12px; margin-left: 8px; font-size: 13px; vertical-align: middle; }
.sort { display: inline-flex; align-items: center; gap: 8px; }
.sort__label { font-size: 13px; color: var(--muted); }
.sort select {
  height: 36px; padding: 0 32px 0 12px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl);
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23687482' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right 12px center;
  appearance: none; font-size: 13.5px; cursor: pointer;
}

/* ───────── 제품 그리드 ───────── */
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 601px)  { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }
@media (min-width: 901px)  { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; } }
@media (min-width: 1201px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative;
  display: flex; flex-direction: column;
  container-type: inline-size;
  background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  overflow: hidden; cursor: pointer;
  box-shadow: 0 1px 2px rgba(11, 42, 74, .04);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover { border-color: var(--line-strong); box-shadow: 0 10px 24px -14px rgba(11, 42, 74, .28); }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.card__img {
  position: relative; aspect-ratio: 1 / 1; overflow: hidden;
  background: #fff;
}
.card__img img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain;
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.card__img img.bottom { opacity: 0; }
.card__img.is-flipped img.top { opacity: 0; }
.card__img.is-flipped img.bottom { opacity: 1; }
.card__img.is-flipped img { transform: scale(1.04); }

.card__badge {
  position: absolute; left: 12px; top: 12px;
  padding: 2px 8px; border-radius: 3px;
  font-size: 12px; font-weight: 600;
  background: var(--surface); color: var(--muted); border: 1px solid var(--line);
}
.card__badge--sample { color: var(--accent); }

.card__body {
  display: flex; flex-direction: column; flex: 1;
  padding: 14px 18px 18px;
  border-top: 1px solid var(--line);
}
.card__code {
  font-family: var(--font-en);
  font-size: 12.5px; font-weight: 500; letter-spacing: .03em;
  color: var(--accent);
}
.card__name {
  margin: 3px 0 16px;
  font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em;
  color: var(--text);
}

/* 사양 칸 — 용량·외경·높이를 표제란처럼 */
.card__chips {
  display: grid; grid-template-columns: auto auto auto; /* 내용 폭 + 남는 폭 균등 분배 */
  margin: auto 0 0; padding-top: 12px;
  border-top: 1px solid var(--line);
}
.spec { min-width: 0; padding: 0 10px; border-left: 1px solid var(--line); }
.spec:first-child { padding-left: 0; border-left: 0; }
.spec__label {
  contain: inline-size; /* 라벨은 칸 폭 계산에서 제외(값 기준으로 폭 결정) */
  font-size: 11.5px; line-height: 1.3; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.spec__value {
  margin: 3px 0 0;
  font-family: var(--font-en);
  font-size: 15.5px; font-weight: 600; letter-spacing: -.01em;
  color: var(--primary); white-space: nowrap;
}
.spec__unit { margin-left: 2px; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
/* 원형 + 손잡이 포함 폭 같은 보조 표기(값 아래 한 줄) */
.spec__note {
  display: block; margin-top: 1px;
  font-family: var(--font-ko); font-size: 11px; line-height: 1.3; font-weight: 500; letter-spacing: 0;
  color: var(--muted); white-space: normal;
}
html[lang="en"] .spec__note { font-family: var(--font-en); }

/* 좁은 카드(3·4열 경계 부근)에서는 사양 숫자를 한 단계 줄인다 */
@container (max-width: 270px) {
  .card__body { padding-left: 14px; padding-right: 14px; }
  .spec { padding: 0 7px; }
  .spec__value { font-size: 14px; }
}

/* ───────── 빈 상태 ───────── */
.empty {
  padding: 72px 24px; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-card);
}
.empty__title { font-size: 18px; font-weight: 600; color: var(--primary); }
.empty__body { margin: 6px 0 22px; color: var(--muted); }
.button {
  height: 40px; padding: 0 18px;
  border: 1px solid var(--primary); border-radius: var(--radius-ctl);
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color .15s;
}
.button:hover { background: #12385F; }

/* ───────── 푸터 ───────── */
.site-footer {
  margin-top: clamp(56px, 8vw, 96px);
  padding: 36px 0 44px;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 13.5px; color: var(--muted);
}
.site-footer__inner { display: grid; gap: 20px; }
.site-footer__name { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 4px; }
.site-footer address { font-style: normal; display: grid; gap: 2px; }
.site-footer address p { display: flex; flex-wrap: wrap; gap: 0 18px; }
.site-footer a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line-strong); }
.site-footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.site-footer__meta { font-size: 12.5px; }
@media (min-width: 901px) {
  .site-footer__inner { grid-template-columns: 1fr 1.4fr auto; align-items: start; gap: 40px; }
}

/* ───────── 공용 버튼 변형·아이콘 버튼 ───────── */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; white-space: nowrap; }
.button:disabled { background: #AEB7C2; border-color: #AEB7C2; cursor: not-allowed; }
.button--ghost { background: #fff; color: var(--primary); border-color: var(--line-strong); }
.button--ghost:hover { background: var(--surface); border-color: var(--primary); }
.button--ghost[aria-pressed="true"] { background: #EEF3F9; border-color: var(--accent); color: var(--accent); }
.button--text { background: none; border-color: transparent; color: var(--muted); font-weight: 500; padding: 0 10px; }
.button--text:hover { background: none; color: var(--primary); }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--text); cursor: pointer;
  transition: background-color .15s;
}
.icon-btn:hover { background: var(--surface); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }

/* 대화상자가 열린 동안 뒤 화면 스크롤 잠금 */
html:has(dialog[open]) { overflow: hidden; }

/* ───────── 상세 모달 ───────── */
.modal {
  width: min(1060px, calc(100vw - 48px));
  max-width: none; max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: 12px;
  background: #fff; color: var(--text);
  box-shadow: 0 30px 80px -24px rgba(11, 42, 74, .45);
  overflow: hidden;
}
.modal::backdrop, .cpanel::backdrop { background: rgba(11, 26, 42, .52); }
.modal[open] .modal__sheet, .cpanel[open] .cpanel__sheet { animation: sheet-in .26s var(--ease); }
.modal[open]::backdrop, .cpanel[open]::backdrop, .lightbox[open]::backdrop { animation: fade-in .2s ease-out; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes fade-in { from { opacity: 0; } }

.modal__sheet {
  /* 시트 전체가 한 번에 스크롤(왼쪽 사진·도식, 오른쪽 사양) — 닫기 버튼은 대화상자 기준이라 고정 */
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  max-height: calc(100dvh - 48px);
  overflow-y: auto; overscroll-behavior: contain;
}
.modal__close { position: absolute; top: 14px; right: 14px; z-index: 2; background: rgba(255, 255, 255, .9); }

/* 왼쪽: 사진 + 치수 도식 */
.modal__media {
  display: flex; flex-direction: column; gap: 14px;
  padding: 28px 28px 32px;
  border-right: 1px solid var(--line);
}
.modal__media .modal__section { padding: 14px 0 0; }
.modal__zoom {
  position: relative; display: block; width: 100%;
  aspect-ratio: 1 / 1; padding: 0;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background: #fff; cursor: zoom-in; overflow: hidden;
}
.modal__img-main { width: 100%; height: 100%; object-fit: contain; }
.modal__zoom-icon {
  position: absolute; right: 12px; bottom: 12px;
  display: grid; place-items: center; width: 34px; height: 34px;
  border-radius: 50%; background: rgba(255, 255, 255, .92); border: 1px solid var(--line);
  color: var(--muted); transition: color .15s, border-color .15s;
}
.modal__zoom:hover .modal__zoom-icon { color: var(--primary); border-color: var(--line-strong); }
.modal__zoom-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }

.modal__thumbs { display: flex; gap: 10px; }
.modal__thumbs button {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  width: 76px; padding: 4px 4px 5px;
  border: 1px solid var(--line); border-radius: var(--radius-ctl);
  background: #fff; cursor: pointer;
  font-size: 12px; color: var(--muted);
  transition: border-color .15s, color .15s;
}
.modal__thumbs button:hover { border-color: var(--line-strong); }
.modal__thumbs button[aria-pressed="true"] { border-color: var(--primary); color: var(--primary); font-weight: 600; box-shadow: inset 0 0 0 1px var(--primary); }
.modal__thumbs img { width: 66px; height: 66px; object-fit: contain; }

/* 오른쪽: 정보(버튼 줄은 화면 아래에 붙어 따라온다) */
.modal__info { display: flex; flex-direction: column; min-width: 0; }
.modal__head { padding: 30px 64px 4px 32px; }
.modal__code {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-en); font-size: 13px; font-weight: 500; letter-spacing: .03em; color: var(--accent);
}
.modal__badge {
  padding: 1px 7px; border-radius: 3px; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-family: var(--font-ko); font-size: 11.5px; font-weight: 600; letter-spacing: 0;
}
.modal__head h2 {
  margin-top: 4px;
  font-size: clamp(21px, 1.2rem + .6vw, 26px); line-height: 1.3; font-weight: 700; letter-spacing: -.02em;
  color: var(--primary);
}
.modal__head h2:focus { outline: none; }

.modal__section { padding: 22px 32px 0; }
/* 내용과 버튼 줄 사이 최소 28px, 남는 높이는 여기서 흡수(버튼 줄을 맨 아래로) */
.modal__info::after { content: ''; order: 1; flex: 1 0 28px; }
.modal__info > .modal__actions { order: 2; }
.modal__h { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--muted); }

/* 사양 표 — 라벨/값 2열, 묶음 사이만 진한 구분선 */
.modal__spec table { width: 100%; border-collapse: collapse; font-size: 14px; }
.modal__spec th, .modal__spec td { padding: 7px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: baseline; }
.modal__spec tr:first-child > * { border-top-color: var(--line-strong); }
.modal__spec tr.is-group > * { border-top-color: var(--line-strong); }
.modal__spec tr:last-child > * { border-bottom: 1px solid var(--line-strong); }
.modal__spec th { width: 46%; padding-right: 16px; font-weight: 400; color: var(--muted); }
.modal__spec td { font-family: var(--font-en); font-weight: 600; color: var(--text); }
html[lang="ko"] .modal__spec td { font-family: var(--font-ko); }

.modal__features { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.modal__features li {
  padding: 4px 10px; border-radius: 4px;
  background: #EEF3F9; color: var(--primary);
  font-size: 13px; line-height: 1.4;
}
.modal__desc { max-width: 38em; color: var(--text); white-space: pre-line; }

/* 치수 도식 — 모눈 도면지 위에 */
.modal__figure { margin: 0; }
.modal__dim {
  padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--radius-card);
  background-color: #fff;
  background-image:
    linear-gradient(rgba(31, 95, 168, .055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 95, 168, .055) 1px, transparent 1px);
  background-size: 12px 12px; background-position: -1px -1px;
  color: var(--primary);
}
.modal__dim svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; overflow: visible; }
.modal__figure figcaption { margin-top: 6px; font-size: 12px; color: var(--muted); }
.dim-body { fill: rgba(11, 42, 74, .05); stroke: currentColor; stroke-width: 1.4; stroke-linejoin: round; }
.dim-shape { fill: #fff; stroke: currentColor; stroke-width: 1.4; }
.dim-inner { fill: none; stroke: currentColor; stroke-width: .8; opacity: .45; }
.dim-center { stroke: var(--accent); stroke-width: .7; stroke-dasharray: 8 3 2 3; opacity: .7; }
.dim-line, .dim-ext { stroke: currentColor; stroke-width: 1; }
.dim-ext { opacity: .55; }
.dim-arrow { fill: currentColor; }
.dim-text {
  fill: currentColor; font-family: var(--font-en); font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; letter-spacing: .01em;
  paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round;
}
.dim-unit { font-size: 10px; font-weight: 500; fill: var(--muted); }

.modal__actions {
  position: sticky; bottom: 0; z-index: 1;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 32px 18px;
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
}
.modal__actions #btn-quote { flex: 1 1 auto; }

/* ───────── 라이트박스 ───────── */
.lightbox {
  width: 100vw; height: 100dvh; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0;
  background: transparent; cursor: zoom-out;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 18, 30, .86); }
.lightbox__img {
  width: 90vmin; height: 90vmin; object-fit: contain;
  background: #fff; border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
.lightbox__close { position: fixed; top: 16px; right: 16px; color: #fff; background: rgba(255, 255, 255, .12); }
.lightbox__close:hover { background: rgba(255, 255, 255, .22); }

/* ───────── 토스트 ───────── */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 30;
  translate: -50% 0;
  max-width: calc(100vw - 32px);
  padding: 11px 18px; border-radius: 8px;
  background: var(--primary); color: #fff;
  font-size: 14px; font-weight: 500; text-align: center;
  box-shadow: 0 12px 32px -10px rgba(11, 42, 74, .55);
  pointer-events: none;
}
.toast.is-in { animation: toast-in .22s var(--ease); }
@keyframes toast-in { from { opacity: 0; translate: -50% 8px; } }
body.has-compare > .toast { bottom: 104px; }

/* ───────── 비교 바 ───────── */
body.has-compare { padding-bottom: 92px; }
.compare-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: saturate(1.4) blur(8px);
  border-top: 1px solid var(--line-strong);
  box-shadow: 0 -8px 24px -16px rgba(11, 42, 74, .35);
}
.compare-bar__inner { display: flex; align-items: center; gap: 12px 20px; min-height: 76px; padding-top: 10px; padding-bottom: 10px; }
.compare-bar__title { display: flex; flex-direction: column; font-size: 14px; font-weight: 600; color: var(--primary); line-height: 1.3; }
.compare-bar__count { font-family: var(--font-en); font-size: 12.5px; font-weight: 500; color: var(--muted); }
.compare-bar__list { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.compare-bar__list li { position: relative; width: 56px; height: 56px; flex: none; }
.compare-bar__list .slot { border: 1px dashed var(--line-strong); border-radius: var(--radius-ctl); }
.thumb__open {
  display: block; width: 100%; height: 100%; padding: 2px;
  border: 1px solid var(--line-strong); border-radius: var(--radius-ctl); background: #fff; cursor: pointer;
}
.thumb__open:hover { border-color: var(--primary); }
.thumb__open img { width: 100%; height: 100%; object-fit: contain; }
.thumb__remove {
  position: absolute; top: -7px; right: -7px;
  display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; color: var(--muted); cursor: pointer;
}
.thumb__remove:hover { color: #fff; background: var(--primary); border-color: var(--primary); }
.thumb__remove svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.compare-bar__hint { font-size: 13px; color: var(--muted); }
.compare-bar__actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ───────── 비교 패널 ───────── */
.cpanel {
  width: min(1180px, calc(100vw - 48px)); max-width: none;
  max-height: calc(100dvh - 48px);
  padding: 0; border: 0; border-radius: 12px; background: #fff; color: var(--text);
  box-shadow: 0 30px 80px -24px rgba(11, 42, 74, .45);
  overflow: hidden;
}
.cpanel__sheet { display: flex; flex-direction: column; max-height: calc(100dvh - 48px); }
.cpanel__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 22px 18px 16px 28px; border-bottom: 1px solid var(--line);
}
.cpanel__head h2 { font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--primary); }
.cpanel__head h2:focus { outline: none; }
.cpanel__legend { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.cpanel__swatch { width: 14px; height: 14px; border-radius: 3px; background: #EAF1FA; box-shadow: inset 3px 0 0 var(--accent); }
.cpanel__scroll { overflow: auto; overscroll-behavior: contain; padding: 0 28px 24px; }

.ctable { width: 100%; min-width: calc(180px + var(--cols, 2) * 170px); border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.ctable th, .ctable td { padding: 9px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.ctable thead th { position: sticky; top: 0; z-index: 1; background: #fff; border-bottom: 1px solid var(--line-strong); padding-top: 20px; padding-bottom: 14px; }
.ctable tbody th { width: 180px; padding-left: 12px; font-weight: 400; color: var(--muted); background: #fff; }
/* 가로 스크롤 때 항목 칸은 왼쪽에 고정 */
.ctable tbody th, .ctable .ctable__corner { position: sticky; left: 0; z-index: 1; }
.ctable thead .ctable__corner { z-index: 2; }
.ctable .ctable__corner { width: 180px; }
.ctable td { font-weight: 600; font-variant-numeric: tabular-nums; }
html[lang="en"] .ctable td { font-family: var(--font-en); }
.ctable tr.diff > * { background: #EAF1FA; }
.ctable tr.diff th { color: var(--primary); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.ctable tr.diff td { color: var(--primary); }
.ctable__img { width: 100%; max-width: 104px; aspect-ratio: 1 / 1; margin-bottom: 10px; border: 1px solid var(--line); border-radius: var(--radius-ctl); overflow: hidden; }
.ctable__img img { width: 100%; height: 100%; object-fit: contain; }
.ctable__code { font-family: var(--font-en); font-size: 12.5px; font-weight: 500; letter-spacing: .03em; color: var(--accent); }
.ctable__name { margin: 2px 0 8px; font-size: 14.5px; font-weight: 600; line-height: 1.4; color: var(--text); }
.ctable__remove {
  padding: 0; border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 400; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-strong);
}
.ctable__remove:hover { color: var(--primary); text-decoration-color: currentColor; }

/* ───────── 반응형 ───────── */
@media (min-width: 1000px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .site-header__tools { width: 100%; }
  .search { flex: 1; }
  .search input { width: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 14.5px; }
  .brand__tagline { font-size: 12px; }
  /* 칩 그룹: 라벨 위, 칩은 가로 스크롤 */
  .filter, html[lang="en"] .filter { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .filter__chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-right: calc(-1 * var(--gutter)); padding-right: var(--gutter); }
  .filter__chips::-webkit-scrollbar { display: none; }
  .filters { gap: 16px; }
  .card__body { padding: 14px 16px 16px; }
  /* 1열에서는 사진이 지나치게 커지지 않도록 가로 배치 */
  .card { flex-direction: row; }
  .card__img { flex: 0 0 42%; aspect-ratio: 1 / 1; align-self: flex-start; }
  .card__body { border-top: 0; border-left: 1px solid var(--line); min-width: 0; }
  .card__chips { grid-template-columns: minmax(0, 1fr); gap: 6px; padding-top: 10px; }
  .spec { display: flex; justify-content: space-between; align-items: baseline; padding: 0; border-left: 0; }
  .spec__label { contain: none; }
  .spec__value { margin: 0; font-size: 14.5px; text-align: right; }

  /* 상세 모달: 전체 화면 시트, 사진 → 정보 순으로 한 줄 */
  .modal, .cpanel { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  /* 두 열을 풀어 제목 → 사진 → 사양 → 특성 → 설명 → 치수 도식 → 버튼 순으로 */
  .modal__sheet { display: flex; flex-direction: column; height: 100dvh; max-height: none; }
  .modal__media, .modal__info { display: contents; }
  .modal__head { order: 1; padding: 16px 64px 0 16px; }
  .modal__zoom { order: 2; width: min(calc(100% - 32px), 60vh); margin: 14px auto 0; flex: none; }
  .modal__thumbs { order: 3; justify-content: center; margin-top: 10px; }
  .modal__spec { order: 4; }
  .modal__section--features { order: 5; }
  .modal__section--desc { order: 6; }
  .modal__section--dim { order: 7; }
  .modal__info > .modal__actions { order: 8; margin-top: 24px; }
  .modal__close { top: 8px; right: 8px; box-shadow: 0 2px 10px rgba(11, 42, 74, .15); }
  .modal__thumbs button { width: 72px; }
  .modal__thumbs img { width: 62px; height: 62px; }
  .modal__section, .modal__media .modal__section { padding: 20px 16px 0; }
  .modal__info::after { display: none; }
  .modal__section--dim { padding-bottom: 4px; }
  .modal__actions { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal__actions .button { flex: 1 1 0; padding: 0 10px; }
  .modal__actions #btn-quote { flex-basis: 100%; }

  .cpanel__sheet { height: 100dvh; max-height: none; }
  .cpanel__head { padding: 16px 10px 12px 16px; }
  .cpanel__scroll { padding: 0 16px 20px; }
  .ctable { min-width: calc(112px + var(--cols, 2) * 150px); }
  .ctable tbody th, .ctable .ctable__corner { width: 112px; }
  .ctable th, .ctable td { padding-left: 8px; padding-right: 8px; }

  /* 비교 바: 제목 숨기고 썸네일·버튼만 */
  body.has-compare { padding-bottom: 84px; }
  .compare-bar__inner { gap: 10px; min-height: 68px; }
  .compare-bar__title, .compare-bar__hint { display: none; }
  .compare-bar__list { gap: 6px; }
  .compare-bar__list li { width: 46px; height: 46px; }
  .compare-bar__actions .button { padding: 0 12px; }
}

/* 움직임 줄이기 설정 존중 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  .card__img.is-flipped img { transform: none; }
}

/* ───────── 인쇄 ───────── */
@media print {
  @page { margin: 14mm 12mm; }
  body { font-size: 11pt; }
  .site-header { position: static; border: 0; backdrop-filter: none; }
  .site-header__tools, .tabs, .filters, .toolbar .sort, .skip-link, #reset, .compare-bar, .toast { display: none !important; }
  .intro { padding: 0 0 12px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10mm; }
  .card { flex-direction: column; break-inside: avoid; box-shadow: none; }
  .card__img { flex: none; }
  .card__body { border-left: 0; border-top: 1px solid var(--line); }
  .card__img img.bottom { display: none; }
  .card__img img.top { opacity: 1 !important; transform: none !important; }
  .site-footer { background: none; margin-top: 10mm; }
}
