/* 차가유 공통 스타일 */
:root {
  --brand: #0288d1;
  --brand-dark: #01639a;
  --accent: #f57c00;
  --ok: #388e3c;
  --danger: #d32f2f;
  --bg: #f4f7fa;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #1f2937;
  --muted: #64748b;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Malgun Gothic", -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

header.topbar {
  background: var(--brand);
  color: #fff;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow);
}
header.topbar h1 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 8px; }
header.topbar nav { display: flex; align-items: center; }
header.topbar nav a { color: #fff; text-decoration: none; margin-left: 14px; opacity: .85; font-size: 14px; transition: opacity .15s; }
header.topbar nav a:hover { opacity: 1; }
header.topbar nav a.active { opacity: 1; font-weight: 700; border-bottom: 2px solid #fff; padding-bottom: 2px; }
header.topbar nav .greeting { margin-left: 14px; font-size: 14px; opacity: .95; }

/* 파트너 '직접 예약' 상단 안내 배너 (호수카 등) */
.direct-banner {
  background: linear-gradient(90deg, var(--brand), var(--brand-dark));
  color: #fff;
  font-weight: 700;
  text-align: center;
  padding: 12px 14px;
  border-radius: 10px;
  margin: -4px 0 14px;
  font-size: 15px;
  letter-spacing: -0.2px;
}

/* 호수카 전용: 비로그인 회원가입/로그인 게이트 */
.direct-gate-msg { font-size: 15px; font-weight: 600; color: var(--text, #1a1a1a); margin: 8px 0 14px; }
.direct-gate-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.direct-gate-actions button { min-width: 140px; flex: 1 1 160px; }

/* 호수카 전용: 로그인 회원 컨트롤 바 (인사말 · 정보수정 · 로그아웃) */
.direct-member-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 10px 14px; margin-bottom: 14px;
  background: #f5f7fa; border: 1px solid var(--line); border-radius: 10px;
}
.direct-member-bar .greeting { font-weight: 700; margin: 0; }
.direct-member-actions { display: flex; gap: 14px; }
.direct-member-actions a { font-size: 14px; font-weight: 600; color: var(--brand, #0a84ff); text-decoration: none; }
.direct-member-actions a:hover { text-decoration: underline; }

.hero { margin-bottom: 8px; }
.hero h2 { font-size: 22px; margin: 0 0 6px; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}
.card h2 { margin-top: 0; font-size: 18px; }
.card h3 { font-size: 15px; color: var(--muted); }

label { display: block; font-size: 14px; font-weight: 600; margin: 12px 0 6px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 70px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }

.checkgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; margin-top: 8px; }
/* 접힘 상태에서는 정비 항목 목록 전체를 숨김 (더보기 버튼만 노출) */
#itemGrid.collapsed { display: none; }
/* '정비 항목 더보기/접기' 토글 버튼 */
.toggle-items { margin-top: 10px; }
/* 폼 하단 액션 버튼 영역 */
.form-actions { margin-top: 18px; }
.form-actions button { min-width: 160px; }

/* 미오픈 지역 안내 */
.region-notice {
  margin-top: 8px; padding: 10px 14px; border-radius: 8px;
  background: #fff3e0; border: 1px solid #ffcc80; color: #e65100;
  font-size: 13px; font-weight: 500;
}

/* 지역(시/군/구) 서비스 관리 */
.region-group { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; overflow: hidden; }
.region-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f8fafc; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.region-head b { font-size: 15px; }
.region-head .region-bulk { margin-left: auto; display: flex; gap: 6px; }
.region-head .region-bulk button { padding: 6px 12px; font-size: 12px; }
.region-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 14px; }
.region-toggle { display: flex; align-items: center; gap: 6px; margin: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 500; background: #fff; }
.region-toggle input[type=checkbox] { width: auto; }
.region-toggle.on { border-color: var(--ok); background: #e8f5e9; color: #1b5e20; }
@media (max-width: 560px) {
  .region-items { grid-template-columns: repeat(2, 1fr); }
}
.checkgrid label {
  display: flex; align-items: center; gap: 8px; margin: 0;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; font-weight: 500; background: #fafcff;
}
.checkgrid input[type=checkbox] { width: auto; }
.checkgrid label.checked { border-color: var(--brand); background: #e6f4fd; }

/* 타이어교환 체크 시 항목 바로 밑에 인라인으로 뜨는 사이즈 입력창
   (라벨 + 단일 input 만 노출. 감싸는 박스 장식/이중 테두리 없음) */
.checkgrid .tire-inline {
  grid-column: 1 / -1;              /* 그리드 전체 폭 차지 → 타이어 항목 바로 아래 줄에 배치 */
  margin-top: 4px;
  padding: 0;
  border: none;
  background: none;
}
/* .checkgrid label 의 칩(박스) 스타일이 상속되지 않도록 라벨 초기화 */
.checkgrid .tire-inline label {
  display: block;
  margin: 0 0 6px;
  padding: 0;
  border: none;
  background: none;
  cursor: default;
  font-weight: 600;
}
.checkgrid .tire-inline input { background: #fff; }

button, .btn {
  background: var(--brand);
  color: #fff; border: none; border-radius: 8px;
  padding: 11px 18px; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background .15s;
}
button:hover, .btn:hover { background: var(--brand-dark); }
button.secondary { background: #eef2f6; color: var(--text); }
button.accent { background: var(--accent); }
button.danger { background: var(--danger); }
button:disabled { opacity: .5; cursor: not-allowed; }

.bid {
  border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.bid .price b { font-size: 20px; color: var(--accent); }
.bid .breakdown { font-size: 13px; color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.dom { background: #e3f2fd; color: #1565c0; }
.badge.imp { background: #fce4ec; color: #c2185b; }
.badge.req { background: #fff3e0; color: #ef6c00; }
.badge.resv { background: #e8f5e9; color: #2e7d32; }
.badge.done { background: #eceff1; color: #455a64; }
.badge.exp { background: #ffebee; color: #c62828; }
.badge.cancel { background: #f3e5f5; color: #6a1b9a; }

/* ── 버튼 로딩 스피너 ───────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px;
  border: 2px solid rgba(255,255,255,.45); border-top-color: #fff;
  border-radius: 50%; animation: spin .6s linear infinite; vertical-align: -2px;
}
button.secondary .spinner { border-color: rgba(0,0,0,.2); border-top-color: var(--text); }
button.loading { pointer-events: none; opacity: .8; }

/* ── 카드 헤더 (제목 + 우측 토글 버튼) ───────────── */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-head h2 { margin: 0; }
.card-head button { flex: 0 0 auto; padding: 8px 14px; font-size: 13px; }

/* ── 정비소 오늘의 요약 바 ───────────────────────── */
.summary-bar { display: flex; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.summary-item {
  flex: 1 1 160px; background: #fff; border: 1px solid var(--line);
  border-radius: 10px; padding: 16px; box-shadow: var(--shadow); text-align: center;
}
.summary-item .v { font-size: 26px; font-weight: 800; color: var(--brand); }
.summary-item .k { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* ── 특정일 휴무 칩 ──────────────────────────────── */
.holiday-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef2f6; border: 1px solid var(--line); border-radius: 999px;
  padding: 6px 8px 6px 12px; font-size: 13px; font-weight: 600;
}
.chip button {
  background: none; color: var(--danger); border: none; padding: 0 2px;
  font-size: 16px; line-height: 1; cursor: pointer; font-weight: 700;
}
.chip button:hover { background: none; }

/* ── 결제 방식 선택 버튼 (예약 모달) ─────────────── */
.pay-choice { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pay-choice button { width: 100%; padding: 13px; font-size: 15px; }
/* 현장 방문결제: 초록색 강조 */
button.onsite-btn { background: var(--ok); color: #fff; }
button.onsite-btn:hover { background: #2e7d32; }
.onsite-guide {
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: #fff3e0; border: 1px solid #ffcc80; color: #e65100;
  font-size: 13px; font-weight: 500;
}

/* ── 결제 방식 태그 (카센터 완료 모달) ──────────── */
.pay-tag {
  margin: 4px 0 14px; padding: 12px 14px; border-radius: 8px;
  font-size: 14px; font-weight: 700; line-height: 1.4;
}
.pay-tag.onsite { background: #fff3e0; border: 1px solid #ffb74d; color: #e65100; }
.pay-tag.prepaid { background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; }

/* ── 확인(confirm) 다이얼로그 ───────────────────── */
.confirm-msg { font-size: 15px; margin: 4px 0 20px; white-space: pre-line; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; }
.confirm-actions button { min-width: 92px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 600; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.stat .v { font-size: 24px; font-weight: 700; color: var(--brand); }
.stat .k { font-size: 13px; color: var(--muted); }

.modal-bg {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: none; align-items: center; justify-content: center; z-index: 50; padding: 16px;
}
.modal-bg.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius); padding: 24px; max-width: 440px; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal h2 { margin-top: 0; }

.qr-box { text-align: center; }
.qr-box img { width: 200px; height: 200px; }
.pin { font-size: 34px; letter-spacing: 6px; font-weight: 800; color: var(--brand-dark); text-align: center; }

.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hidden { display: none !important; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #263238; color: #fff; padding: 12px 20px; border-radius: 8px;
  box-shadow: var(--shadow); z-index: 100; font-size: 14px; opacity: 0; transition: opacity .2s;
}
.toast.show { opacity: 1; }

.stars { font-size: 30px; cursor: pointer; color: #ddd; }
.stars span.on { color: #ffb300; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.auth-tabs button { flex: 1; background: #eef2f6; color: var(--text); }
.auth-tabs button.active { background: var(--brand); color: #fff; }

/* ── 알림 벨 (헤더 공통) ─────────────────────────── */
.notif-wrap { position: relative; margin-left: 14px; display: inline-flex; align-items: center; }
.notif-wrap.hidden { display: none !important; }
.notif-bell {
  position: relative; background: rgba(255,255,255,.16); color: #fff;
  border: none; border-radius: 999px; width: 38px; height: 38px; padding: 0;
  font-size: 18px; line-height: 1; cursor: pointer; transition: background .15s;
}
.notif-bell:hover { background: rgba(255,255,255,.28); }
.notif-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
  box-shadow: 0 0 0 2px var(--brand);
}
.notif-panel {
  position: absolute; top: 46px; right: 0; width: 340px; max-width: 92vw;
  background: #fff; color: var(--text); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.18);
  display: none; z-index: 200; overflow: hidden;
}
.notif-panel.open { display: block; }
.notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafc;
}
.notif-head b { font-size: 15px; }
.notif-head-actions { display: flex; gap: 2px; }
.notif-readall { background: none; color: var(--brand); padding: 4px 6px; font-size: 12px; font-weight: 600; }
.notif-readall:hover { background: none; text-decoration: underline; }
.notif-readall.hidden { display: none; }
/* 받은 알림 / 보관함 탭 */
.notif-tabs { display: flex; border-bottom: 1px solid var(--line); background: #fff; }
.notif-tab {
  flex: 1; background: none; border: none; padding: 10px 8px; cursor: pointer;
  font-size: 13px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; transition: color .12s, border-color .12s;
}
.notif-tab:hover { color: var(--text); }
.notif-tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; margin: 0; }
.notif-item {
  display: flex; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  cursor: pointer; transition: background .12s; align-items: flex-start;
}
.notif-item:hover { background: #f4f7fa; }
.notif-item.unread { background: #eaf5fe; }
.notif-item.unread:hover { background: #ddeefb; }
.notif-item.archived { opacity: .78; }
.notif-ic { font-size: 18px; flex: 0 0 auto; line-height: 1.3; }
.notif-body { min-width: 0; flex: 1; }
.notif-title { font-size: 14px; font-weight: 600; }
.notif-sub { font-size: 13px; color: var(--muted); margin-top: 2px; word-break: break-word; }
.notif-time { font-size: 11px; color: #94a3b8; margin-top: 4px; }
/* 항목별 보관/복원 버튼 */
.notif-action {
  flex: 0 0 auto; background: none; border: none; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 4px 6px; border-radius: 8px;
  color: var(--muted); opacity: .55; transition: opacity .12s, background .12s;
}
.notif-item:hover .notif-action { opacity: 1; }
.notif-action:hover { background: rgba(0,0,0,.06); opacity: 1; }

/* ── 모바일 반응형 (스마트폰) ─────────────────────
   입력창과 정비 항목 체크박스를 터치하기 편한 2열 grid 로 배치 */
@media (max-width: 560px) {
  .container { padding: 16px 12px 48px; }

  /* 차량 정보 등 입력 행: 2열로 균등 분할 */
  .row { gap: 10px; }
  .row > * { flex: 1 1 calc(50% - 5px); min-width: 0; }

  /* 정비 항목 체크박스: 고정 2열 + 넉넉한 터치 영역 */
  .checkgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .checkgrid label { padding: 12px 10px; }

  /* iOS 에서 입력 시 자동 확대(zoom) 방지 위해 16px 유지 */
  input, select, textarea { font-size: 16px; }

  /* 주요 액션 버튼은 가로 꽉 차게 → 엄지로 누르기 쉽게 */
  #submitRequest { width: 100%; padding: 14px; }

  /* 상단바/내비게이션 줄바꿈 허용 */
  header.topbar { flex-wrap: wrap; row-gap: 6px; }
  header.topbar h1 { font-size: 18px; }
  header.topbar nav { flex-wrap: wrap; }

  .hero h2 { font-size: 19px; }
}

/* 여러 액션 버튼이 든 표 셀은 항상 줄바꿈 허용 (데스크톱 포함) */
.cell-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ══════════════════════════════════════════════════════════════════
   모바일 반응형 강화 (스마트폰 360px~600px)
   - 넓은 데이터 표(백오피스)를 카드형으로 전환 → 가로 스크롤 없이 열람
   - 툴바/모달/요약/견적 카드가 화면을 넘지 않도록 정리
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  /* 페이지 전체 가로 넘침 방지 */
  html, body { max-width: 100%; overflow-x: hidden; }
  .container { padding: 14px 12px 44px; }

  /* ── 넓은 표 → 카드형(라벨 위 / 값 아래) 변환 ─────
     td 를 flex 로 만들면 셀 안의 배지/텍스트/<br> 가 각각 flex item 으로
     쪼개져 어색하게 줄바꿈되므로, 라벨을 값 위에 블록으로 얹어 값이
     일반 인라인 텍스트로 자연스럽게 흐르도록 한다. */
  table.resp thead { display: none; }
  table.resp, table.resp tbody, table.resp tr, table.resp td { display: block; width: 100%; }
  table.resp tr {
    border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px;
    padding: 4px 14px; background: #fff; box-shadow: var(--shadow);
  }
  table.resp td {
    padding: 9px 0; border-bottom: 1px dashed var(--line);
    text-align: left; white-space: normal; word-break: break-word;
  }
  table.resp td:last-child { border-bottom: none; }
  table.resp td::before {
    content: attr(data-label); display: block;
    font-weight: 700; color: var(--muted); font-size: 12px; margin-bottom: 3px;
  }
  /* 액션 버튼 셀: 라벨 아래 버튼 나열(줄바꿈 허용) */
  table.resp td.cell-actions { display: block; }
  /* 빈 상태(colspan) 행은 라벨 없이 중앙 표시 */
  table.resp td[colspan] { text-align: center; }
  table.resp td[colspan]::before { content: none; }

  /* 표를 감싼 스크롤 박스는 카드형에서 스크롤 불필요 */
  .card [style*="overflow-x"] { overflow-x: visible !important; }

  /* ── 견적/요청 카드: 세로 정렬 ──────────────────── */
  .bid { flex-direction: column; align-items: stretch; gap: 10px; }
  .bid > div[style*="text-align:right"], .bid .price { text-align: left !important; }
  .bid button { width: 100%; }

  /* ── 관리자 통계/요약 그리드: 2열 ───────────────── */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat .v { font-size: 20px; }
  .summary-bar { gap: 10px; }
  .summary-item { flex: 1 1 calc(50% - 5px); padding: 14px 10px; }

  /* ── 툴바(검색/필터/날짜) 입력은 가로 꽉 차게 ───── */
  .card input[style*="max-width"], .card select[style*="max-width"] { max-width: 100% !important; width: 100%; }
  .card-head { flex-wrap: wrap; }

  /* ── 모달: 여백 축소 + 내부 행 세로 정렬 ────────── */
  .modal { padding: 18px; }
  .modal .row { flex-direction: column; gap: 8px; }
  .modal .row > * { width: 100%; }
  .confirm-actions { flex-wrap: wrap; }
  .confirm-actions button { flex: 1 1 auto; }

  /* ── 정비 항목 관리 추가 폼 등 일반 .row 도 세로 ── */
  .qr-box img { width: 170px; height: 170px; }
  .pin { font-size: 28px; letter-spacing: 4px; }

  /* 알림 패널: 벨 기준 배치가 화면 밖으로 잘리므로 뷰포트 기준 고정 배치 */
  .notif-panel {
    position: fixed; top: 58px; left: 8px; right: 8px;
    width: auto; max-width: none;
  }
}

/* 초소형(≤400px) 미세 조정 */
@media (max-width: 400px) {
  header.topbar h1 { font-size: 16px; }
  .card { padding: 16px 14px; }
  table.resp td::before { flex-basis: 40%; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   메인 랜딩 (chagayou.com) — 서비스 특징 / 스토어 / 공식 인증 정비소
   ══════════════════════════════════════════════════════════════════ */
.lp-title { font-size: 20px; margin: 8px 0 14px; }
.lp-features { margin-bottom: 20px; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.feature-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow);
}
.feature-card .fc-ic { font-size: 30px; }
.feature-card h3 { margin: 10px 0 6px; font-size: 16px; color: var(--text); }
.feature-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.55; }

/* 차가유 스토어 카드 */
.store-card { background: linear-gradient(135deg, #e8f5e9 0%, #e6f4fd 100%); border-color: #c8e6c9; }
.store-card-body { display: flex; align-items: center; gap: 20px; }
.store-card-text { flex: 1; min-width: 0; }
.store-badge {
  display: inline-block; background: #2e7d32; color: #fff; font-size: 12px; font-weight: 700;
  padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
/* 네이버 스마트스토어 뱃지 (네이버 그린) */
.store-badge.naver { background: #03c75a; letter-spacing: .2px; }
.store-card h2 { margin: 0 0 6px; }
.store-desc { color: var(--text); font-size: 14px; margin: 0 0 16px; }
.store-btn { background: #03c75a; display: inline-block; text-decoration: none; }
.store-btn:hover { background: #02a94c; }
.store-card-visual { font-size: 56px; flex: 0 0 auto; line-height: 1; }

/* 공식 인증 정비소 카드 (1:1 정사각형 간판) */
.certified-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 14px; }
.cert-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.cert-thumb { position: relative; width: 100%; aspect-ratio: 1 / 1; background: #f1f5f9; overflow: hidden; }
.cert-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* 간판 이미지 없을 때: 상호 첫 글자 플레이스홀더 */
.cert-thumb.noimg::after {
  content: attr(data-initial);
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-size: 52px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
}
.cert-info { padding: 12px 14px; }
.cert-name { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cert-badge { background: #e8f5e9; color: #2e7d32; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.cert-addr { font-size: 13px; color: var(--muted); margin-top: 6px; word-break: keep-all; }

/* ── 포털 상단 내비게이션 (정비소/관리자 페이지 이동 탭) ── */
.portal-nav { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 18px; }
.portal-nav a {
  padding: 9px 16px; border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600;
  background: #fff; color: var(--text); border: 1px solid var(--line); transition: all .15s;
}
.portal-nav a:hover { border-color: var(--brand); color: var(--brand); }
.portal-nav a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

@media (max-width: 560px) {
  .store-card-visual { display: none; }
  .certified-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .feature-card { padding: 16px 14px; }
}

/* ── 최초 로그인 비밀번호 변경 안내 배너 ── */
.pw-change-banner {
  background: #fff3e0; border: 1px solid #ffcc80; color: #e65100;
  border-radius: var(--radius); padding: 14px 18px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pw-change-banner b { font-size: 14px; }
.pw-change-banner button { margin-left: auto; padding: 8px 16px; font-size: 13px; }

/* ── 도매몰(스토어) 상품 그리드 ── */
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin-top: 16px; }
.prod-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.prod-thumb { width: 100%; aspect-ratio: 4 / 3; background: #f1f5f9; object-fit: cover; display: flex; align-items: center; justify-content: center; font-size: 40px; color: #cbd5e1; }
.prod-thumb img { width: 100%; height: 100%; object-fit: cover; }
.prod-body { padding: 12px 14px; flex: 1; display: flex; flex-direction: column; }
.prod-cat { font-size: 11px; color: var(--muted); font-weight: 600; }
.prod-name { font-size: 14px; font-weight: 700; margin: 4px 0; flex: 1; }
.prod-price { font-size: 17px; font-weight: 800; color: var(--accent); }
.prod-card .qty-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.prod-card .qty-row input { width: 64px; text-align: center; }

/* 장바구니 / 리워드 요약 바 */
.mini-summary { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.mini-summary .ms {
  flex: 1 1 150px; background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 14px 16px; box-shadow: var(--shadow);
}
.mini-summary .ms .v { font-size: 22px; font-weight: 800; color: var(--brand); }
.mini-summary .ms .k { font-size: 12px; color: var(--muted); }

/* ── 장바구니 푸터 (결제 진입) ── */
.cart-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line);
}
.cart-footer b { font-size: 18px; color: var(--accent); }
.cart-footer button { min-width: 200px; }

/* ── 결제 모달: 주문 상품 요약 ── */
.co-items { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin: 6px 0 6px; background: #fafcff; }
.co-item { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; border-bottom: 1px dashed var(--line); }
.co-item:last-child { border-bottom: none; }
.co-item.co-sum { font-weight: 700; }
.co-item.co-sum b { color: var(--accent); }

/* ── 결제 수단 선택 옵션 ── */
.pay-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.pay-opt {
  display: flex; align-items: center; gap: 10px; margin: 0; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; background: #fff;
}
.pay-opt input[type=radio] { width: auto; margin: 0; }
.pay-opt:has(input:checked) { border-color: var(--brand); background: #e6f4fd; }
.pay-opt .hint { font-weight: 400; }

/* ── 무통장 계좌 안내 박스 ── */
.bank-box {
  background: #e8f5e9; border: 1px solid #a5d6a7; border-radius: 10px;
  padding: 14px 16px; margin: 8px 0; line-height: 1.7;
}
.bank-line { font-size: 14px; }
.bank-line .bank-label { display: inline-block; min-width: 68px; color: var(--muted); font-weight: 600; }
.bank-box b { color: #1b5e20; }
.bank-box .pay-amt { color: var(--accent); font-size: 18px; }

/* ── 비대면 카드결제 안내 문구 ── */
.card-guide {
  background: #fff3e0; border: 1px solid #ffcc80; color: #e65100;
  border-radius: 10px; padding: 14px 16px; margin: 8px 0; font-size: 14px;
  font-weight: 500; line-height: 1.6; white-space: pre-line;
}

@media (max-width: 560px) {
  .pay-methods { grid-template-columns: 1fr; }
  .cart-footer button { min-width: 100%; }
}

/* 교육관 동영상 카드 */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; margin-top: 14px; }
.video-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-body { padding: 14px 16px; }
.video-title { font-size: 15px; font-weight: 700; }
.video-cat { display: inline-block; font-size: 11px; font-weight: 700; color: var(--brand); background: #e6f4fd; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; }
.video-desc { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.reward-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.reward-tag { background: #fff8e1; color: #f57f17; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; border: 1px solid #ffe082; }
.reward-row button { padding: 8px 14px; font-size: 13px; }
.reward-row button.claimed { background: #eceff1; color: #607d8b; pointer-events: none; }

/* ── 사이트 하단 Footer (홈페이지 하단) ── */
.site-footer {
  background: #1f2937;
  color: #cbd5e1;
  margin-top: 40px;
  padding: 28px 16px 36px;
  font-size: 13px;
  line-height: 1.7;
}
.site-footer .footer-inner { max-width: 960px; margin: 0 auto; }
.site-footer .footer-links {
  display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center;
  padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid #374151;
}
.site-footer .footer-links a {
  color: #e5e7eb; text-decoration: none; font-weight: 600; font-size: 14px;
  transition: color .15s;
}
.site-footer .footer-links a:hover { color: #fff; text-decoration: underline; }
.site-footer .footer-links .sep { color: #4b5563; }
.site-footer .biz-name { color: #fff; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.site-footer .biz-info { color: #94a3b8; margin: 0; }
.site-footer .biz-info span { white-space: nowrap; }
.site-footer .biz-info .dot { margin: 0 8px; color: #4b5563; }
.site-footer .copyright { margin-top: 14px; color: #64748b; font-size: 12px; }

/* ── 정책 페이지 (이용약관 / 개인정보처리방침 / 취소·환불) ── */
.policy-page { max-width: 860px; margin: 0 auto; padding: 24px 16px 60px; }
.policy-page .policy-back { display: inline-block; margin-bottom: 16px; color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.policy-page .policy-back:hover { text-decoration: underline; }
.policy-page h1 { font-size: 24px; margin: 0 0 6px; }
.policy-page .policy-meta { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.policy-page .card h2 { font-size: 16px; margin: 22px 0 8px; }
.policy-page .card h2:first-child { margin-top: 0; }
.policy-page .card p, .policy-page .card li { font-size: 14px; color: var(--text); }
.policy-page .card ul, .policy-page .card ol { padding-left: 20px; margin: 6px 0; }
.policy-page .card li { margin: 4px 0; }
.policy-page .policy-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 14px; }
.policy-page .policy-table th, .policy-page .policy-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.policy-page .policy-table th { background: #f4f7fa; font-weight: 700; }

/* ── 타이어(공용): 관리자 상세 필드 · 견적/비교 카드 ───────────────── */
.tire-fields { border: 1px dashed var(--accent); border-radius: 10px; padding: 12px 14px; margin-top: 12px; background: #fff9f2; }
.tire-sec-title { font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.tire-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tire-thumb { position: relative; display: inline-block; }
.tire-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.tire-thumb button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; padding: 0; border-radius: 50%;
  background: #c62828; color: #fff; border: none; font-size: 13px; line-height: 1; cursor: pointer; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.svc-chips label { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 999px; cursor: pointer; font-weight: 500; background: #fff; }
.svc-chips input { width: auto; }
.seg { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg button { background: #eef2f6; color: var(--text); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; }
.seg button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.tire-quote-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; background: var(--card); }
.tire-quote-card .amt { font-size: 20px; font-weight: 700; color: var(--accent); }
.tire-shop-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 16px; }
.tire-shop-group > .grp-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; font-weight: 700; }
.proposal-form { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; background: #fafcff; }
.calc-line { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.calc-total { font-size: 18px; font-weight: 700; color: var(--accent); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }

/* ── 비교 화면 개선: 정렬바 · 배지 · 카드 그리드 · 비교하기 ───────────── */
.sort-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.sort-bar .sort-label { font-size: 13px; color: var(--muted); }
.sort-bar button { background: #eef2f6; color: var(--text); border: 1px solid var(--line); padding: 7px 13px; border-radius: 999px; font-size: 13px; }
.sort-bar button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
/* 그룹 내부 카드들을 반응형 그리드로 */
.tire-compare-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
/* 배지들 */
.tire-badges { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 6px; }
.tbadge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.tbadge.cheap { background: #e8f5e9; color: #1b5e20; }
.tbadge.popular { background: #fff3e0; color: #e65100; }
.tbadge.today { background: #e3f2fd; color: #0d47a1; }
.tbadge.reco { background: #f57c00; color: #fff; }
/* 추천형 강조 카드 */
.tire-quote-card.tier-recommended { border: 2px solid var(--accent); box-shadow: 0 3px 12px rgba(245,124,0,.15); position: relative; }
.tire-quote-card.tier-recommended::before { content: '⭐ 추천'; position: absolute; top: -10px; left: 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.tire-quote-card .cmp-check { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-top: 8px; color: var(--muted); }
.tire-quote-card .cmp-check input { width: auto; }
.avail-line { font-size: 13px; color: #0d47a1; font-weight: 600; }
/* 비교하기 플로팅 바 */
.compare-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60;
  background: var(--text); color: #fff; border-radius: 999px; padding: 10px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.compare-bar button { padding: 7px 14px; font-size: 13px; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.compare-table th, .compare-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; white-space: nowrap; }
.compare-table th { background: #f4f7fa; position: sticky; left: 0; }
.compare-table .amt-row td { font-weight: 700; color: var(--accent); }
@media (max-width: 640px) {
  .tire-compare-grid { grid-template-columns: 1fr; }
  .sort-bar { position: sticky; top: 0; background: var(--card); padding: 6px 0; z-index: 5; }
}

/* ── 타이어 상세 모달 레이아웃 (가로 라벨/내용 · 추가요청 전체폭) ───────── */
.tire-detail { writing-mode: horizontal-tb; display: flex; flex-direction: column; gap: 12px; }
.tire-detail .td-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tire-detail .td-cell { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: #f8fafc; min-width: 0; }
.tire-detail .td-cell .k { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.tire-detail .td-cell .v { font-weight: 700; word-break: keep-all; overflow-wrap: break-word; }
.tire-detail .td-sec { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.tire-detail .td-sec-title { font-weight: 700; color: var(--text); }
/* 라벨:내용 가로 배치 */
.tire-detail .td-row { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.tire-detail .td-row .k { flex: 0 0 auto; min-width: 88px; color: var(--muted); font-weight: 600; }
.tire-detail .td-row .v { flex: 1 1 220px; min-width: 0; word-break: keep-all; overflow-wrap: break-word; }
/* 추가 요청사항: 전체 폭 · 가로쓰기 · 줄바꿈 보존 */
.tire-detail .td-note {
  width: 100%;
  writing-mode: horizontal-tb;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: break-word;
  line-height: 1.5;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
/* 모바일에서도 가로 출력 유지 (2열 그리드로만 축소, 라벨/내용은 계속 가로) */
@media (max-width: 640px) {
  .tire-detail .td-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── 관리자 타이어 통계 ─────────────────────────────────────── */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat-tile { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: #fff; }
.stat-tile .v { font-size: 22px; font-weight: 800; color: var(--text); }
.stat-tile .v.accent { color: var(--accent); }
.stat-tile .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat-bar-row { display: flex; align-items: center; gap: 10px; margin: 6px 0; font-size: 13px; }
.stat-bar-row .lbl { width: 74px; color: var(--muted); flex: 0 0 auto; }
.stat-bar-row .track { flex: 1; background: #eef2f6; border-radius: 6px; overflow: hidden; height: 18px; }
.stat-bar-row .fill { height: 100%; background: var(--accent); border-radius: 6px; min-width: 2px; }
.stat-bar-row .val { width: 110px; text-align: right; flex: 0 0 auto; font-weight: 600; }

/* ── 차가유 마케팅 패키지 상품 (메인 박스 · /product 결제 페이지) ── */
.product-card { background: linear-gradient(135deg, #e6f4fd 0%, #eef6ff 100%); border-color: #bcdffb; }
.product-badge {
  display: inline-block; background: var(--brand); color: #fff;
  font-size: 12px; font-weight: 800; padding: 4px 12px; border-radius: 999px; margin-bottom: 10px;
}
.product-box-text h2 { margin: 0 0 6px; font-size: 20px; }
.product-summary { color: var(--muted); margin: 0 0 14px; }
.product-feature-list { list-style: none; padding: 0; margin: 0 0 16px; }
.product-feature-list li { padding: 6px 0; font-weight: 600; color: var(--text); border-bottom: 1px dashed #d7e6f5; }
.product-feature-list li:last-child { border-bottom: none; }
.product-price-row { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.product-price { font-size: 28px; font-weight: 800; color: var(--accent); }
.product-vat { font-size: 13px; color: var(--muted); }

/* 결제하기 버튼 — 모바일에서도 크게 보이도록 폭 100% + 큰 터치 영역 */
.pay-btn-lg, .product-buy-btn {
  display: block; width: 100%; text-align: center; text-decoration: none;
  padding: 16px 20px; font-size: 17px; font-weight: 800; border-radius: 12px;
}
.product-buy-btn { color: #fff; }

/* /product 결제 페이지 상세 */
.product-detail h3 { margin: 18px 0 8px; font-size: 15px; }
.product-desc-full { color: var(--text); font-size: 14px; line-height: 1.7; margin: 0 0 18px; }
.product-pay-box {
  margin-top: 18px; padding: 18px; border: 1px solid #bcdffb; border-radius: 12px; background: #fff;
}
.pay-note { text-align: center; margin-top: 6px; }
/* 결제 안내(보조 설명) — 버튼보다 강조되지 않되 충분히 읽히는 크기 */
.pay-contact-note {
  text-align: center; margin: 12px 0 0; color: var(--muted);
  font-size: 14px; font-weight: 600;
}

@media (max-width: 560px) {
  .product-price { font-size: 24px; }
  .pay-btn-lg, .product-buy-btn { padding: 18px 20px; font-size: 18px; }
}
