/* 현장에서 장갑 낀 손으로 누르는 것을 전제로 잡았다.
   행 높이와 버튼을 크게, 글자는 확대 없이 읽히게. */
:root {
  --bg: #f6f7f9; --fg: #16181d; --muted: #667;
  --line: #dfe3e8; --brand: #0b3d91; --card: #fff;
  color-scheme: light;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
/* hidden 속성은 어떤 display 선언보다 세야 한다.
   #topbar{display:flex} 같은 규칙이 [hidden]을 덮어써서
   고객모드에서 상단바가 안 사라지는 버그가 있었다. */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg);
  font: 16px/1.5 -apple-system, "Segoe UI", "Malgun Gothic", sans-serif; }

#topbar { position: sticky; top: 0; z-index: 10; display: flex; gap: 10px;
  align-items: center; padding: 10px 12px; background: var(--brand);
  padding-top: calc(10px + env(safe-area-inset-top)); }
#home { color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap; }
#q { flex: 1; min-width: 0; padding: 12px 14px; font-size: 17px;
  border: 0; border-radius: 10px; }
#clear { width: 40px; height: 40px; flex: none; font-size: 22px; line-height: 1;
  border: 0; border-radius: 10px; background: rgba(255,255,255,.2); color: #fff;
  cursor: pointer; }

main { padding: 12px; max-width: 900px; margin: 0 auto; }
h2 { font-size: 13px; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.hint { color: var(--muted); font-size: 13px; margin-top: 24px; }
.hint b { color: var(--fg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; gap: 6px; align-items: baseline;
  padding: 14px 18px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: var(--fg); font-weight: 600; }
.chip b { color: var(--muted); font-size: 13px; font-weight: 500; }
.chip.sub { padding: 10px 14px; font-weight: 500; }

.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; gap: 12px; align-items: center; padding: 10px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; text-decoration: none; color: inherit; min-height: 84px; }
.row img, .row .noimg { width: 84px; height: 64px; object-fit: contain;
  background: #eef1f4; border-radius: 6px; flex: none; }
.rowtext { display: flex; flex-direction: column; min-width: 0; }
.rowtext strong { font-size: 17px; }
.rowtext span { color: var(--muted); font-size: 14px; }
.rowtext em { color: #99a; font-size: 12px; font-style: normal; }
.empty { color: var(--muted); padding: 30px 0; text-align: center; }

/* 제품 상세 */
.phead { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; margin-bottom: 10px; }
.ptitle strong { display: block; font-size: 22px; line-height: 1.2; }
.ptitle span { display: block; color: var(--muted); font-size: 15px; }
.ptitle em { color: #99a; font-size: 12px; font-style: normal; }
.cbtn { flex: none; padding: 14px 18px; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--brand); border: 0; border-radius: 10px; cursor: pointer; }
.pmain { width: 100%; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; display: block; }
.noimg.big { width: 100%; aspect-ratio: 4/3; background: #eef1f4; border-radius: 10px; }
table.spec { width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
table.spec th, table.spec td { padding: 10px 12px; text-align: left;
  border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
table.spec th { width: 38%; color: var(--muted); font-weight: 600; }
table.spec tr:last-child th, table.spec tr:last-child td { border-bottom: 0; }
ul.feat { margin: 0; padding-left: 20px; }
ul.feat li { margin: 3px 0; }
.pricebtn { width: 100%; padding: 16px; font-size: 16px; font-weight: 700;
  background: var(--card); border: 1px dashed var(--line);
  border-radius: 10px; cursor: pointer; color: var(--muted); }
.muted { color: var(--muted); }

/* 고객모드 */
body.customer-on { background: #000; overflow: hidden; }
#customer { position: fixed; inset: 0; background: #000;
  display: flex; align-items: center; justify-content: center; }
#customer img { max-width: 100%; max-height: 100vh; object-fit: contain; }
.cm-close { position: absolute; top: 14px; right: 14px; z-index: 2;
  padding: 12px 18px; font-size: 15px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.9); cursor: pointer; }
.cm-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 56px; height: 96px; font-size: 34px; border: 0; cursor: pointer;
  background: rgba(255,255,255,.25); color: #fff; }
.cm-nav.prev { left: 0; border-radius: 0 10px 10px 0; }
.cm-nav.next { right: 0; border-radius: 10px 0 0 10px; }
.cm-label { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center;
  color: #fff; font-size: 16px; text-shadow: 0 1px 3px #000; }
.cm-label b { opacity: .7; font-weight: 500; margin-left: 6px; }

/* 카탈로그 사진 크게 보기 */
.pmainwrap { display: block; width: 100%; padding: 0; border: 0; background: none;
  cursor: pointer; position: relative; }
.pmainhint { position: absolute; right: 8px; bottom: 8px; padding: 6px 10px;
  font-size: 12px; color: #fff; background: rgba(0,0,0,.55); border-radius: 8px; }
body.viewer-on { overflow: hidden; }
#viewer { position: fixed; inset: 0; z-index: 20; background: #111;
  display: flex; flex-direction: column; }
.vw-bar { display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top)); background: #000; }
.vw-title { flex: 1; color: #fff; font-weight: 700; }
.vw-right { display: flex; gap: 8px; }
.vw-btn { padding: 12px 16px; font-size: 15px; font-weight: 600; border: 0;
  border-radius: 10px; background: rgba(255,255,255,.9); cursor: pointer; }
.vw-btn.primary { background: #ffd54a; }
.vw-btn:disabled { opacity: .6; }
.vw-stage { flex: 1; overflow: auto; display: flex; align-items: center;
  justify-content: center; }
.vw-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.vw-hint { text-align: center; color: #999; font-size: 12px; padding: 8px 0 14px; }

/* 시공사례 */
.installs { display: flex; flex-direction: column; gap: 8px; }
.install { display: flex; gap: 12px; padding: 10px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px;
  text-decoration: none; color: inherit; }
.install img, .install .noimg { width: 110px; height: 84px; object-fit: cover;
  background: #eef1f4; border-radius: 6px; flex: none; }
.itext { min-width: 0; }
.itext strong { display: block; font-size: 16px; }
.itext span { color: var(--muted); font-size: 13px; }
.itext p { margin: 4px 0 0; font-size: 14px; }
.itags { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.itags b { font-size: 12px; font-weight: 600; color: var(--brand);
  background: #eaf0fb; border-radius: 6px; padding: 3px 8px; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }
.chip.on b { color: #cdd9f2; }
.filterbar { color: var(--muted); font-size: 14px; display: flex;
  align-items: center; gap: 10px; }
.filterbar b { color: var(--fg); font-size: 16px; }
.idesc { font-size: 15px; margin: 4px 0 8px; }
.igallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px; }
.igallery img { width: 100%; border-radius: 10px; background: #eef1f4; }
.videos { display: flex; flex-direction: column; gap: 10px; }
.video { position: relative; padding-top: 56.25%; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%;
  border: 0; border-radius: 10px; }
.hint.ver { margin-top: 8px; font-size: 12px; color: #99a; }
.linkbtn { background: none; border: 0; color: var(--brand); font: inherit;
  text-decoration: underline; cursor: pointer; padding: 4px 6px; }
#stale { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  background: #0b3d91; color: #fff; font-size: 15px; }
#stale button { padding: 10px 16px; font: inherit; font-weight: 700; border: 0;
  border-radius: 8px; background: #ffd54a; cursor: pointer; }
