/* ===== 스마트툴 홈페이지 스타일 =====
   색상은 아래 :root 에서만 바꾸면 전체에 반영됩니다. (로고에서 뽑은 브랜드 색) */
:root {
  --brand: #1d2088;        /* METAL PRO 로고 남색 */
  --brand-dark: #141766;
  --brand-ink: #1a2a76;    /* Smart Tool 로고 남색 */
  --brand-soft: #eceefb;
  --point: #f6c200;        /* Smart Tool 로고 노란 점 */
  --bg: #f5f6fa;
  --card: #ffffff;
  --ink: #161a2e;
  --ink-2: #4a5068;
  --muted: #8a90a6;
  --line: #e4e6ee;
  --radius: 16px;
  --font: "Pretendard Variable", Pretendard, -apple-system, system-ui, sans-serif;
}
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; word-break: keep-all; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--brand); color: #fff; padding: 8px 14px; border-radius: 8px; }
.skip:focus-visible { top: 12px; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 50px; padding: 0 22px; border-radius: 12px; font-weight: 700; background: var(--card); color: var(--ink); border: 1px solid var(--line); cursor: pointer; transition: background-color .2s, border-color .2s; }
.btn:hover { border-color: var(--brand); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-light { background: #fff; border-color: #fff; color: var(--brand); }
.btn-light:hover { background: var(--brand-soft); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; }

/* 헤더 */
.hd { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.hd-in { display: flex; align-items: center; gap: 28px; height: 72px; }
.logo img { width: 150px; height: auto; }
.gnb { display: flex; gap: 26px; font-weight: 600; }
.gnb a { color: var(--ink-2); padding: 24px 0; border-bottom: 2px solid transparent; transition: color .2s, border-color .2s; }
.gnb a:hover, .gnb a[aria-current="page"] { color: var(--brand); border-color: var(--brand); }
.hd-search { margin-left: auto; flex: 1; max-width: 300px; }
.hd-search input { width: 100%; height: 42px; border: 0; border-radius: 10px; background: var(--bg); padding: 0 14px; }
.hd-tel { font-weight: 800; color: var(--brand); white-space: nowrap; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; position: relative; }
.menu-btn span, .menu-btn::before, .menu-btn::after { content: ""; position: absolute; left: 11px; right: 11px; height: 2px; background: var(--ink); }
.menu-btn span { top: 21px; } .menu-btn::before { top: 14px; } .menu-btn::after { top: 28px; }

/* 홈 배너 */
.hero { padding-top: 24px; }
.banner { background: var(--brand); color: #fff; border-radius: 24px; display: grid; grid-template-columns: 1.15fr 1fr; overflow: hidden; min-height: 400px; }
.banner-text { padding: 48px; display: flex; flex-direction: column; justify-content: center; }
.banner-logo { width: 44px; height: 44px; background: #fff; border-radius: 50%; padding: 4px; margin-bottom: 22px; }
.banner h1 { font-size: clamp(30px, 4vw, 48px); line-height: 1.22; letter-spacing: -0.035em; font-weight: 800; }
.banner h1 em { font-style: normal; color: var(--point); }
.banner p { color: #c9cdf0; font-size: 17px; margin: 14px 0 28px; }
.banner .btn-primary { background: var(--point); border-color: var(--point); color: #1d1a00; }
.banner .btn-primary:hover { background: #ffd43b; }
.banner-img { background: #000; }
.banner-img img { width: 100%; height: 100%; object-fit: cover; }
.perks { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.perks li { background: var(--card); border-radius: var(--radius); padding: 18px 22px; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.perks b { font-size: 18px; color: var(--brand); } .perks span { color: var(--muted); font-size: 14px; }

/* 섹션 공통 */
.sec { margin-top: 56px; }
.sh { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.sh h2 { font-size: 24px; letter-spacing: -0.03em; }
.more { color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.more:hover { color: var(--brand); }
.fine { color: var(--muted); font-size: 13px; margin-top: 14px; }
.page-head { padding-top: 40px; padding-bottom: 8px; }
.page-head h1 { font-size: clamp(28px, 3.4vw, 40px); letter-spacing: -0.035em; }
.page-head p { color: var(--ink-2); margin-top: 6px; }

/* 카테고리 */
.cats { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 10px; }
.cat { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-size: 14px; color: var(--ink-2); }
.cat-img { width: 100%; aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: #fff; border: 2px solid transparent; transition: border-color .2s; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }
.cat:hover .cat-img { border-color: var(--brand); }
.cat b { font-weight: 600; }

/* 제품 카드 */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pc { background: var(--card); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; border: 1px solid transparent; transition: border-color .2s; }
.pc:hover { border-color: var(--brand); }
.pc-img { position: relative; aspect-ratio: 4 / 3; background: #eef0f4; overflow: hidden; }
.pc-img img { width: 100%; height: 100%; object-fit: cover; }
.tag { position: absolute; left: 10px; top: 10px; background: var(--point); color: #2a2100; font-size: 12px; font-weight: 800; padding: 3px 8px; border-radius: 6px; }
.pc-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pc-cat { font-size: 12px; color: var(--brand); font-weight: 700; }
.pc-code { font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.pc-grade { font-size: 13px; color: var(--muted); }
.pc-price { margin-top: auto; padding-top: 10px; font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.pc-price small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.pc-price.ask { font-size: 15px; color: var(--brand); }

/* 목록 페이지 */
.finder { position: sticky; top: 72px; z-index: 10; background: var(--bg); padding: 16px 0 12px; }
.finder input { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 0 18px; font-size: 16px; }
.finder input:focus-visible { outline: 2px solid var(--brand); }
.chips { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-weight: 600; font-size: 14px; cursor: pointer; transition: background-color .2s; }
.chip:hover { border-color: var(--brand); }
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: #fff; }
.count { color: var(--muted); font-size: 14px; margin: 4px 0 12px; }
.count b { color: var(--ink); }
.empty { background: #fff; border-radius: var(--radius); padding: 40px; text-align: center; display: grid; gap: 8px; justify-items: center; }
.empty p { color: var(--ink-2); margin-bottom: 8px; }

/* 상세 페이지 */
.crumb { display: flex; gap: 8px; padding: 24px 0 16px; color: var(--muted); font-size: 14px; }
.crumb a:hover { color: var(--brand); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; background: #fff; border-radius: 24px; padding: 24px; }
.d-img { border-radius: var(--radius); overflow: hidden; background: #eef0f4; aspect-ratio: 1; }
.d-img img { width: 100%; height: 100%; object-fit: cover; }
.d-info { padding: 12px 8px; display: flex; flex-direction: column; }
.d-info h1 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.03em; line-height: 1.25; margin: 6px 0 14px; overflow-wrap: anywhere; }
.d-desc { color: var(--ink-2); }
.spec { margin: 24px 0 0; border-top: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 100px 1fr; padding: 14px 0; border-bottom: 1px solid var(--line); }
.spec dt { color: var(--muted); } .spec dd { margin: 0; font-weight: 600; }
.d-price { font-size: 24px; letter-spacing: -0.02em; } .d-price.ask { font-size: 18px; color: var(--brand); }
.d-actions { display: grid; gap: 8px; margin-top: 24px; }

/* 박스, 2단 */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.box { background: #fff; border-radius: var(--radius); padding: 28px; }
.box h2 { font-size: 20px; letter-spacing: -0.02em; margin-bottom: 14px; }
.box p { color: var(--ink-2); }
.how { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.how li { display: flex; gap: 14px; align-items: center; }
.how i { width: 44px; height: 44px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-style: normal; font-weight: 800; flex: 0 0 auto; }
.how b { display: block; } .how span { font-size: 14px; color: var(--muted); }
.box-photo { padding: 0; overflow: hidden; position: relative; min-height: 260px; }
.box-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.box-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 24px 20px; background: linear-gradient(transparent, rgba(10, 12, 40, .78)); color: #e6e8ff; font-size: 14px; }
.box-cap b { display: block; color: #fff; font-size: 18px; }

/* 가이드 */
.code-big { font-size: clamp(36px, 7vw, 72px); font-weight: 800; color: var(--brand); letter-spacing: 0.02em; line-height: 1.1; margin: 8px 0 20px; }
.code-big span { border-bottom: 3px solid var(--point); margin-right: 2px; }
.decode { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.decode div { display: grid; grid-template-columns: 40px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.decode dt { font-weight: 800; color: var(--brand); } .decode dd { margin: 0; color: var(--ink-2); }
.grades { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.grade { background: #fff; border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.grade code { font-family: inherit; font-weight: 800; font-size: 17px; color: var(--brand); }
.grade p { font-size: 14px; color: var(--ink-2); flex: 1; }
.grade a { font-size: 14px; font-weight: 700; color: var(--brand); margin-top: 8px; }
.cta { background: var(--brand); color: #fff; border-radius: var(--radius); padding: 32px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.cta b { font-size: 20px; } .cta p { color: #c9cdf0; }
.cta .btn-primary { background: #fff; color: var(--brand); border-color: #fff; }

/* 회사소개 */
.about-hero { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; }
.about-logo { background: #fff; border-radius: var(--radius); display: grid; place-items: center; padding: 40px; }
.about-logo img { width: min(320px, 100%); height: auto; }
.about-text { background: #fff; border-radius: var(--radius); padding: 36px; }
.about-text h2 { font-size: clamp(22px, 2.6vw, 30px); letter-spacing: -0.03em; line-height: 1.35; margin-bottom: 16px; }
.about-text p { color: var(--ink-2); margin-top: 10px; }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 12px; }
.brands { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.brand { background: #fff; border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; align-content: start; }
.brand img { width: 180px; height: auto; }
.brand-name { font-size: 26px; font-weight: 900; color: #e3141b; letter-spacing: -0.01em; line-height: 74px; }
.brand p { color: var(--ink-2); }

/* 오시는 길 */
.big-tel { display: block; font-size: clamp(30px, 4vw, 40px); font-weight: 800; color: var(--brand); letter-spacing: -0.02em; margin-bottom: 18px; }
.info { margin: 0 0 22px; }
.notice { text-align: center; padding: 56px 28px; display: grid; gap: 10px; justify-items: center; }
.notice h2 { margin: 0; }
.notice .btn { margin-top: 10px; }
.info div { display: grid; grid-template-columns: 80px 1fr; padding: 10px 0; border-bottom: 1px solid var(--line); }
.info dt { color: var(--muted); } .info dd { margin: 0; font-weight: 600; }
.map-box { padding: 0; overflow: hidden; min-height: 360px; }
.map-box iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }

/* 푸터 */
.ft { background: #fff; margin-top: 72px; padding: 40px 0 24px; border-top: 1px solid var(--line); }
.ft-in { display: grid; grid-template-columns: 220px 1fr auto; gap: 32px; align-items: start; }
.ft-brand img { width: 180px; height: auto; }
.ft-info { color: var(--ink-2); font-size: 14px; }
.ft-info b { color: var(--ink); font-size: 16px; display: block; margin-bottom: 4px; }
.ft-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, auto); gap: 6px 24px; font-size: 14px; color: var(--ink-2); }
.ft-links a:hover { color: var(--brand); }
.ft-copy { color: var(--muted); font-size: 13px; margin-top: 24px; }

/* 하단 고정 문의 바 (휴대폰) */
.bar { display: none; }

@media (max-width: 1080px) {
  .hd-search { display: none; }
  .hd-tel { margin-left: auto; }
  .cats { grid-template-columns: repeat(5, minmax(0, 1fr)); row-gap: 16px; }
  .grades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .gnb { display: none; position: absolute; left: 0; right: 0; top: 72px; background: #fff; flex-direction: column; gap: 0; padding: 8px 24px 16px; border-bottom: 1px solid var(--line); }
  .gnb.open { display: flex; }
  .gnb a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .menu-btn { display: block; }
  .hd-tel { margin-left: auto; }
  .banner { grid-template-columns: 1fr; }
  .banner-text { padding: 32px 28px; }
  .banner-img { height: 220px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split, .about-hero, .brands, .detail { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ft-in { grid-template-columns: 1fr; gap: 20px; }
  .bar { display: grid; grid-template-columns: 1fr 1fr 2fr; gap: 8px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #fff; border-top: 1px solid var(--line); padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); }
  .bar a { height: 50px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; background: var(--bg); }
  .bar .bar-main { background: var(--brand); color: #fff; }
  body.has-bar { padding-bottom: 76px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 14px; }
  .hd-in { height: 60px; gap: 12px; }
  .gnb { top: 60px; }
  .finder { top: 60px; }
  .logo img { width: 124px; }
  .hd-tel { font-size: 14px; }
  .perks { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .perks li { padding: 12px; flex-direction: column; gap: 0; }
  .perks b { font-size: 15px; } .perks span { font-size: 12px; }
  .cats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid { gap: 8px; }
  .pc-body { padding: 10px 12px 14px; }
  .pc-code { font-size: 14px; }
  .pc-price { font-size: 17px; }
  .decode { grid-template-columns: 1fr; }
  .detail { padding: 14px; gap: 16px; }
  .box, .about-text { padding: 22px; }
  .sec { margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
