/* MITO Shop — 공용 스타일 v0.2 (2026-08-26)
   기준: design-system/tokens.css v0.1.1 / 적용 강도 "중간"
   v0.2: 검수 반영 — reduced-motion, 모바일 버튼 48px, spec/kicker 14px(랜딩 동기화),
         플레이스홀더 수치 통일, pending 버튼 스타일, summary 카드 중첩 해소
   폰트 웹폰트 연결은 배포 승인 후 활성화 (로컬 설치 폰트 + 시스템 폴백) */

:root {
  --paper: #FFFFFF;
  --surface: #F5F5F5;
  --ink: #1A1A1A;
  --muted: #666666;
  --line: #E0E0E0;
  --line-strong: #8A8A8A;
  --inverse-bg: #1A1A1A;
  --inverse-text: #FFFFFF;
  --error: #B3261E; /* 폼 오류 전용 예외 (design-system 2절) */
  --font-sans: "Pretendard Variable", Pretendard, -apple-system,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", Consolas, monospace;
  --gutter: 28px;
  --page-margin: 60px;
  --container: 1360px;
  --section: 96px;
  --duration: 300ms;
  --ease: ease;
}

/* == Base == */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.container { max-width: var(--container); margin: 0 auto; padding-inline: var(--page-margin); }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.25; }
.page-title { font-size: 36px; font-weight: 700; }   /* 쇼핑몰 최대 스케일 = H2 */
.section-title { font-size: 24px; font-weight: 600; }
.small { font-size: 15px; }
.caption { font-size: 13px; line-height: 1.5; letter-spacing: 0; color: var(--muted); }
.muted { color: var(--muted); }
.spec {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.kicker {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--muted);
  text-transform: uppercase;
  display: block;
  margin-bottom: 24px;
}

/* == Buttons == */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding-inline: 28px;
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  border-radius: 0;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: opacity var(--duration) var(--ease);
}
.btn:hover { opacity: 0.85; }
.btn-primary { background: var(--ink); color: var(--paper); }
/* 컴팩트 변형 44px (design-system 7절) — 헤더·카드용 */
.btn-sm { height: 44px; padding-inline: 20px; font-size: 15px; }
/* 준비 중(disabled) 상태: 저대비 opacity 대신 AA 충족 조합 (muted on surface = 5.27:1) */
.btn[disabled] {
  background: var(--surface);
  color: var(--muted);
  border-color: var(--line-strong);
  cursor: default;
}
.btn[disabled]:hover { opacity: 1; }
.text-link {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity var(--duration) var(--ease);
}
.text-link:hover { opacity: 0.85; }
.text-btn {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  transition: opacity var(--duration) var(--ease);
}
.text-btn:hover { opacity: 0.85; }
.text-btn[disabled] { color: var(--muted); cursor: default; }
.text-btn[disabled]:hover { opacity: 1; }

/* == Forms == */
label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 8px; }
input[type="text"], input[type="search"], input[type="number"], select {
  height: 48px;
  width: 100%;
  padding-inline: 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0;
}
input::placeholder { color: var(--muted); }
select:disabled, input:disabled { background: var(--surface); color: var(--muted); }

/* == Header / Footer == */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 16px;
}
.brand { font-size: 22px; font-weight: 700; letter-spacing: 0.02em; text-decoration: none; }
/* 투트랙 스위처: 일반쇼핑몰 | 세라믹쇼핑몰 (로고는 클릭 불가 워드마크, 옆에 밀착) */
.brand-group { display: flex; align-items: center; gap: 14px; min-width: 0; }
.track-nav { display: flex; align-items: center; gap: 12px; }
.track-nav a {
  font-size: 13px;
  text-decoration: none;
  color: var(--muted);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color var(--duration) var(--ease);
}
.track-nav a:hover { color: var(--ink); }
.track-nav [aria-current="true"] {
  color: var(--ink);
  font-weight: 700;
  border-bottom-color: var(--ink);
}
.nav { display: flex; align-items: center; gap: 32px; }
.nav a { font-size: 15px; text-decoration: none; transition: opacity var(--duration) var(--ease); }
.nav a:hover { opacity: 0.7; }
.nav .btn { height: 44px; padding-inline: 20px; font-size: 15px; }
.nav .active { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; }

.notice-bar { background: var(--surface); border-bottom: 1px solid var(--line); }
.notice-bar .container { padding-block: 10px; }

.site-footer { border-top: 1px solid var(--line); padding-block: 48px; margin-top: var(--section); }
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 48px;
  justify-content: space-between;
  align-items: baseline;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.footer-nav a { font-size: 15px; text-decoration: none; transition: opacity var(--duration) var(--ease); }
.footer-nav a:hover { opacity: 0.7; }
.ph-tag { font-family: var(--font-mono); font-size: 12px; color: var(--muted); letter-spacing: 0.06em; }

/* == Placeholder 이미지 (실사 수령 전) — 수치는 랜딩과 동일 기준 == */
.ph-img {
  background: var(--surface);
  background-image: repeating-linear-gradient(
    45deg, transparent, transparent 24px,
    rgba(26, 26, 26, 0.04) 24px, rgba(26, 26, 26, 0.04) 25px);
  border: 1px dashed var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
}
.ph-note {
  border: 1px dashed var(--line-strong);
  padding: 48px 32px;
  text-align: center;
  color: var(--muted);
}

/* == Breadcrumb == */
.breadcrumb { padding-block: 20px 0; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.breadcrumb li { font-size: 13px; color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 4px; }
.breadcrumb [aria-current] { color: var(--ink); }

/* == 목록: 페이지 헤드 · 탭 · 툴바 == */
.page-head { padding-block: 48px 0; }
.page-head .page-title { margin-bottom: 8px; }
.page-head .kicker { margin-bottom: 16px; }

.tabs { border-bottom: 1px solid var(--line); margin-top: 32px; }
.tabs ul { list-style: none; display: flex; flex-wrap: wrap; gap: 32px; }
.tabs a {
  display: inline-block;
  padding-block: 14px;
  font-size: 15px;
  text-decoration: none;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: opacity var(--duration) var(--ease);
}
.tabs a:hover { opacity: 0.7; }
.tabs [aria-current="page"] { color: var(--ink); font-weight: 600; border-bottom-color: var(--ink); }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 24px;
}
.toolbar .result-count { font-size: 14px; color: var(--muted); }
.toolbar .controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.toolbar select { width: auto; min-width: 160px; }
.toolbar .search input { width: 240px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding-inline: 14px;
  font-size: 13px;
  color: var(--muted);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}

/* == 상품 그리드 == */
.grid-products {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 56px var(--gutter);
  padding-block: 24px 0;
}
.p-card { display: flex; flex-direction: column; }
.p-card > a { text-decoration: none; display: block; }
.p-card .ph-img { aspect-ratio: 4 / 5; margin-bottom: 20px; padding: 16px; }
.p-card .cat { margin-bottom: 4px; }
.p-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 6px; }
.p-card h3 a { text-decoration: none; }
.p-card h3 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.p-card .spec { color: var(--muted); margin-bottom: 12px; }
.p-card .status-row { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--ink);
  padding: 3px 8px;
  letter-spacing: 0.04em;
}
.p-card .cta-row { display: flex; align-items: center; gap: 16px; margin-top: auto; }

.pagination { display: flex; justify-content: center; align-items: center; gap: 8px; padding-block: 64px 0; }
.pagination a, .pagination span {
  font-family: var(--font-mono);
  font-size: 14px;
  min-width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid transparent;
}
.pagination [aria-current="page"] { border-color: var(--ink); font-weight: 500; }
.pagination a:hover { border-color: var(--line-strong); }
.pagination .ph-tag { min-width: auto; height: auto; margin-left: 12px; }

/* == 상세 == */
.detail-grid {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 64px;
  padding-block: 40px 0;
}
.gallery-main.ph-img { aspect-ratio: 4 / 3; margin-bottom: 16px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; list-style: none; }
.thumbs .ph-img { aspect-ratio: 1 / 1; padding: 8px; }

.detail-info .cat { margin-bottom: 8px; }
.detail-info .page-title { margin-bottom: 12px; }
.detail-info .desc { color: var(--muted); margin-bottom: 20px; }
.detail-info .status-row { display: flex; align-items: center; gap: 12px; margin-bottom: 32px; }
.opt-group { margin-bottom: 20px; }
.qty-row { display: flex; align-items: end; gap: 16px; margin-bottom: 32px; }
.qty-row .opt-group { margin-bottom: 0; flex: 1; }
.qty-row input { width: 120px; }
.cta-stack { display: flex; flex-direction: column; gap: 12px; }
.cta-stack .text-btn { align-self: flex-start; font-size: 15px; margin-top: 8px; }
.detail-info .note { margin-top: 24px; }

.detail-section { padding-top: var(--section); }
.detail-section .section-title { margin-bottom: 32px; }

.spec-table { width: 100%; border-collapse: collapse; max-width: 720px; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table th { font-size: 14px; font-weight: 600; width: 180px; color: var(--muted); }
.spec-table td { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0; }

.related-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.related-grid .p-card .ph-img { aspect-ratio: 1 / 1; }

/* == 견적함 == */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 64px;
  align-items: start;
  padding-block: 40px 0;
}
.cart-list { list-style: none; }
.cart-row {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 20px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.cart-list .cart-row:first-child { border-top: 1px solid var(--ink); }
.cart-row .ph-img { aspect-ratio: 1 / 1; padding: 8px; }
.cart-row h3 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.cart-row .spec { color: var(--muted); display: block; margin-bottom: 8px; }
.cart-row .row-actions { display: flex; flex-direction: column; align-items: end; gap: 12px; }
.cart-row .qty { width: 88px; height: 40px; }

/* 카드 중첩 해소: surface 패널 대신 상단 룰 구분 (design-system 5절) */
.summary { border-top: 1px solid var(--ink); padding-top: 24px; }
.summary .section-title { margin-bottom: 16px; }
.summary .info-row {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  padding-block: 10px;
  border-bottom: 1px solid var(--line);
}
.summary .info-row .spec { font-size: 14px; }
.summary .hint { margin-block: 20px 24px; }
.summary .cta-stack { gap: 12px; }
.summary .cta-stack .text-btn { align-self: flex-start; font-size: 15px; margin-top: 8px; }
.upload-box {
  border: 1px dashed var(--line-strong);
  background: var(--paper);
  padding: 24px;
  text-align: center;
  margin-block: 24px;
}
.upload-box .caption { display: block; margin-top: 6px; }

/* == 견적·상담 요청 폼 (Phase 2 — 검증·로컬 저장까지, 전송은 승인 후) == */
.req-form { margin-top: 24px; }
.req-form .field { margin-bottom: 16px; }
.req-form fieldset { border: 0; margin-bottom: 20px; }
.req-form legend { font-size: 14px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.radio-group { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
  font-size: 14px;
  margin-bottom: 0;
  cursor: pointer;
}
input[type="radio"], input[type="checkbox"] {
  height: auto;
  width: auto;
  accent-color: var(--ink);
}
textarea {
  width: 100%;
  min-height: 96px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 0;
  resize: vertical;
}
textarea:disabled { background: var(--surface); color: var(--muted); }
.consent-row { display: flex; align-items: flex-start; gap: 8px; }
.consent-row label { font-weight: 400; font-size: 13px; color: var(--muted); margin-bottom: 0; cursor: pointer; }
.field-error { color: var(--error); font-size: 13px; margin-top: 6px; }
input.has-error, textarea.has-error { border-color: var(--error); }
.file-hint { display: block; margin-top: 6px; }
.request-done { border: 1px solid var(--ink); padding: 24px; margin-top: 24px; }
.request-done h3 { font-size: 18px; font-weight: 600; margin-bottom: 8px; }
.request-done .spec { display: block; margin-block: 8px 12px; color: var(--muted); }

/* == 빈 상태 == */
.empty-state {
  border: 1px dashed var(--line-strong);
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
}
.empty-state .title { font-size: 18px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }

/* == Reduced motion (design-system 6절) == */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .text-link, .text-btn, .nav a, .footer-nav a, .tabs a { transition: none; }
}

/* == 반응형 (검수 기준 360px) == */
@media (max-width: 1024px) {
  .grid-products { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: repeat(2, 1fr); gap: 40px var(--gutter); }
  .detail-grid { grid-template-columns: 1fr; gap: 48px; }
  .cart-layout { grid-template-columns: 1fr; gap: 48px; }
}
@media (max-width: 768px) {
  :root { --page-margin: 20px; --gutter: 16px; --section: 64px; }
  html { scroll-padding-top: 76px; }
  .page-title { font-size: 28px; }
  .section-title { font-size: 20px; }
  .spec { font-size: 13px; }
  .kicker { font-size: 13px; }
  .btn { height: 48px; }
  .nav .btn, .btn-sm { height: 44px; }
  /* 모바일: 헤더 2줄 — 1줄 로고+트랙 스위처, 2줄 메뉴 전체 표시 */
  .site-header .container { height: auto; flex-wrap: wrap; padding-block: 10px; row-gap: 8px; }
  .brand-group { width: 100%; justify-content: flex-start; gap: 12px; }
  .brand { font-size: 19px; }
  .nav { width: 100%; justify-content: flex-end; gap: 14px; }
  .nav a { font-size: 14px; }
  .page-head { padding-block: 32px 0; }
  .tabs ul { gap: 20px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .controls { flex-direction: column; align-items: stretch; }
  .toolbar .search input, .toolbar select { width: 100%; }
  .grid-products { grid-template-columns: 1fr; gap: 48px; }
  .related-grid { grid-template-columns: 1fr; }
  .cta-stack .btn { width: 100%; }
  .cart-row { grid-template-columns: 88px 1fr; }
  .cart-row .row-actions { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .thumbs { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}


/* == 일반쇼핑몰 홈 (v0.3 — 2026-08-26) == */
.home-hero { border-bottom: 1px solid var(--line); }
.home-hero .container { padding-block: 88px; }
.home-hero .lead { max-width: 560px; color: var(--muted); font-size: 17px; line-height: 1.7; margin-top: 16px; }
.home-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.home-section { padding-top: var(--section); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px 32px; flex-wrap: wrap; margin-bottom: 32px; }
.section-head .section-title { margin-bottom: 0; }
.more-link {
  font-size: 15px; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px;
  transition: opacity 300ms ease;
}
.more-link:hover { opacity: 0.7; }

.cat-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gutter); }
.cat-card { display: block; text-decoration: none; }
.cat-card .ph-img { aspect-ratio: 4 / 3; margin-bottom: 14px; }
.cat-card .name { display: block; font-size: 17px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.cat-card:hover .name { text-decoration: underline; text-underline-offset: 4px; }

.home-picks { grid-template-columns: repeat(4, 1fr); }

.guide-grid { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gutter); }
.guide-cell { border: 1px solid var(--line); padding: 28px 24px; }
.guide-cell .title { font-size: 17px; font-weight: 600; margin-bottom: 8px; }
.guide-cell p { font-size: 15px; color: var(--muted); line-height: 1.7; margin-bottom: 8px; }
.guide-cell p:last-child { margin-bottom: 0; }

.cross-band {
  margin-top: var(--section);
  border: 1px solid var(--line); background: var(--surface);
  padding: 44px 40px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px 40px; flex-wrap: wrap;
}
.cross-band .title { font-size: 22px; font-weight: 600; margin-bottom: 8px; }
.cross-band p { color: var(--muted); font-size: 15px; line-height: 1.7; }

@media (max-width: 1024px) {
  .cat-grid { grid-template-columns: repeat(2, 1fr); gap: 32px var(--gutter); }
  .home-picks { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .home-hero .container { padding-block: 56px; }
  .home-cta .btn { width: 100%; }
  .home-picks { grid-template-columns: 1fr; gap: 48px; }
  .cross-band { padding: 32px 24px; }
  .cross-band .btn { width: 100%; }
}
@media (max-width: 480px) {
  .cat-grid { grid-template-columns: 1fr; }
}