/* ============================================================
   30-pages.css — 하위 페이지 전용 + 우측 하단 상담 아이콘(FAB)
   머니콜에서 검증한 구조를 비상금마켓 색·부품으로 옮긴 파일입니다.
   (근거 문서: "머니콜 작업 내역" [2][3][4][10][11])

   ★ 이 파일은 기존 CSS 를 고치지 않고 '덮어쓰기'만 합니다.
     메인(index)의 모양은 그대로 두고,
     · 하단 상담 띠 → 오른쪽 아래 아이콘 2개
     · 하위 페이지(body[data-page])의 펼친 레이아웃
     만 여기서 정합니다.
   ============================================================ */

/* ═══ 1. 오른쪽 아래 상담 아이콘 (옛 하단 띠 .site-cta 대체) ═══
   화면을 가로로 가리지 않게 아이콘만 띄우고,
   위에 말풍선으로 오늘 현황을 보여줍니다 (js: setupFabBubble). */
.site-cta { display: none !important; }   /* 옛 하단 띠는 쓰지 않습니다 */
/* 띠가 차지하던 자리를 비워두던 아래 여백(20-components.css)도 되돌립니다 */
body { padding-bottom: 0; }

.mc-fab {
  position: fixed; right: clamp(14px, 2vw, 24px); bottom: clamp(14px, 2vw, 24px);
  z-index: 900;
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.mc-fab__btn {
  display: grid; place-items: center;
  width: 56px; height: 56px; border-radius: 50%;
  box-shadow: 0 10px 24px rgba(var(--shadow-rgb), .22);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.mc-fab__btn:hover { transform: translateY(-3px); box-shadow: 0 14px 30px rgba(var(--shadow-rgb), .28); }
.mc-fab__btn:active { transform: scale(var(--press)); }
.mc-fab__btn--kakao { background: var(--kakao-bg); }
.mc-fab__btn--tel { background: var(--brand-500); color: var(--on-brand); }
.mc-fab__btn--tel .ico { width: 28px; height: 28px; }
.mc-fab__btn img { width: 30px; height: 30px; }

/* 말풍선 : 아이콘 위쪽에 떴다가 사라집니다 */
.mc-fab__bubble {
  max-width: min(72vw, 260px);
  background: var(--surface); color: var(--ink-900);
  border-radius: 14px; padding: 10px 14px;
  box-shadow: 0 8px 22px rgba(var(--shadow-rgb), .18);
  font-size: clamp(12px, 1.3vw, 14px); font-weight: 700; line-height: 1.45;
  text-align: right; white-space: nowrap;
  position: relative;
  opacity: 0; transform: translateY(6px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
  pointer-events: none;
}
.mc-fab__bubble.is-on { opacity: 1; transform: none; }
/* 말풍선 꼬리 — 오른쪽 아래 */
.mc-fab__bubble::after {
  content: ""; position: absolute; right: 20px; bottom: -6px;
  width: 12px; height: 12px; background: var(--surface);
  transform: rotate(45deg);
  box-shadow: 3px 3px 6px rgba(var(--shadow-rgb), .06);
}
.mc-fab__bubble b { color: var(--brand-ink); font-weight: 800; }

@media (max-width: 768px) {
  .mc-fab__btn { width: 52px; height: 52px; }
  .mc-fab__btn img { width: 27px; height: 27px; }
  .mc-fab__btn--tel .ico { width: 25px; height: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .mc-fab__bubble { transition: none; }
}

/* ═══ 2. 하위 페이지 제목 영역 ═══
   메인은 키비주얼이 있지만 하위 페이지는 제목부터 시작합니다. */
.mc-pagehead {
  background: linear-gradient(165deg, var(--brand-50), var(--surface) 72%);
  padding-block: clamp(44px, 6vw, 84px) clamp(28px, 4vw, 48px);
  text-align: center;
}
/* 작은 눈썹 글씨 — 본문 .section-label 과 같은 역할, 가운데 정렬용 */
.mc-pagehead .section-label { display: inline-block; }
.mc-pagehead__title {
  margin-top: var(--space-4);
  color: var(--ink-900);
  font-size: clamp(28px, 4.6vw, 46px);
  line-height: 1.28; letter-spacing: -.02em;
  font-weight: var(--fw-bold);
}
.mc-pagehead__title em { font-style: normal; color: var(--brand-ink); }
.mc-pagehead__lead {
  margin-top: var(--space-4);
  color: var(--ink-500);
  font-size: clamp(15px, 1.7vw, 19px);
  line-height: 1.7;
}
/* 제목 영역 바로 다음 섹션은 위 여백을 줄여 붙입니다 */
.mc-pagehead + section { padding-top: clamp(24px, 3vw, 40px); }

/* ═══ 3. 하위 페이지 : 같은 내용을 '펼쳐서' 보여줍니다 ═══
   메인은 옆으로 넘겨 보는 구조(가로 스와이프)지만,
   하위 페이지는 그 항목만 보러 온 자리이므로 전부 펼쳐 크게 보여줍니다. */

/* ── 상품 소개(product) : 스와이프 줄 → 2열 그리드 ──
   카드가 4장이라 2열 2줄이 빈칸 없이 딱 맞습니다.
   (3열이면 3+1 로 한 줄이 비어 어색합니다 — 작업 문서 [11]의 원칙) */
[data-page="product"] .d-cards {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-columns: auto;
  overflow: visible;
  gap: clamp(16px, 2vw, 24px);
  padding-bottom: 0;
}
@media (max-width: 768px) {
  [data-page="product"] .d-cards { grid-template-columns: 1fr; }
}

/* ── 실제 고객 후기(review) : 카루셀 → 3열 그리드 ──
   후기 8장 + 브랜드 카드 1장 = 9장이라 3×3 이 빈칸 없이 딱 맞습니다. */
.p-review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 1.8vw, 22px);
  margin-top: clamp(24px, 3vw, 40px);
}
@media (max-width: 900px) { .p-review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .p-review-grid { grid-template-columns: 1fr; } }

/* 브랜드 카드 — 후기 그리드의 마지막 칸 (상담 유도)
   ★ 다른 후기 카드와 크기가 같아 보이도록 flex 세로 채움 */
.p-review-brand {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: var(--space-4);
  text-align: center;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--brand-600), var(--brand-700));
  color: var(--on-brand);
}
.p-review-brand__logo { width: min(180px, 70%); height: auto; }
.p-review-brand__copy {
  font-size: clamp(16px, 1.8vw, 20px); font-weight: var(--fw-bold);
  line-height: 1.5;
}
.p-review-brand__cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: var(--surface); color: var(--brand-ink);
  font-weight: var(--fw-bold); font-size: clamp(14px, 1.5vw, 16px);
  transition: transform var(--dur-fast) var(--ease);
}
.p-review-brand__cta:hover { transform: translateY(-2px); }
.p-review-brand__cta svg { width: 18px; height: 18px; transition: transform var(--dur-fast) var(--ease); }
.p-review-brand__cta:hover svg { transform: translateX(4px); }

/* ── 문의 방법(request) : 절차 3칸을 넉넉하게 ── */
[data-page="request"] .d-steps {
  overflow: visible;
  grid-auto-flow: row;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-columns: auto;
}
@media (max-width: 768px) {
  [data-page="request"] .d-steps { grid-template-columns: 1fr; }
}

/* ── 하위 페이지 공용 : 아이콘 포인트 카드 (about '이런 분께' 등) ── */
.p-points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
  margin-top: clamp(24px, 3vw, 40px);
}
@media (max-width: 768px) { .p-points { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .p-points { grid-template-columns: 1fr; } }
.p-point {
  display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3);
  padding: clamp(20px, 2.4vw, 30px) clamp(18px, 2vw, 26px);
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(var(--shadow-rgb), .05);
}
.p-point > .ico { width: 38px; height: 38px; color: var(--brand-500); }
.p-point b { font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--ink-900); line-height: var(--lh-tight); }
.p-point small { font-size: var(--fs-sm); color: var(--ink-500); line-height: var(--lh-normal); }

/* ── 상품 소개(product) : 상품별 자세한 설명 블록 ── */
.p-detail { display: flex; flex-direction: column; gap: clamp(14px, 1.8vw, 20px); margin-top: clamp(24px, 3vw, 40px); }
.p-detail__row {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(16px, 2vw, 26px);
  padding: clamp(22px, 2.6vw, 34px);
  background: var(--surface);
  border: var(--border-w) solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 12px rgba(var(--shadow-rgb), .05);
}
@media (max-width: 560px) { .p-detail__row { grid-template-columns: 1fr; } }
.p-detail__ico {
  display: grid; place-items: center; flex: none;
  width: 56px; height: 56px; border-radius: var(--radius-pill);
  background: var(--brand-50);
}
.p-detail__ico .ico { width: 30px; height: 30px; color: var(--brand-500); }
.p-detail__row h3 { font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--ink-900); }
.p-detail__cap {
  display: inline-block; margin-left: var(--space-2);
  font-size: var(--fs-xs); font-weight: var(--fw-bold);
  color: var(--brand-ink); background: var(--brand-50);
  padding: 3px 10px; border-radius: var(--radius-pill);
  vertical-align: middle;
}
.p-detail__row p { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--ink-500); line-height: 1.75; }
.p-detail__row ul { margin-top: var(--space-3); display: flex; flex-direction: column; gap: var(--space-2); }
.p-detail__row li { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); color: var(--ink-700, var(--ink-900)); }
.p-detail__row li .ico { width: 16px; height: 16px; color: var(--brand-500); flex: none; }

/* ── 문의 방법(request) : 단계별 자세한 과정 (세로 타임라인) ── */
.p-flow {
  position: relative;
  margin-top: clamp(24px, 3vw, 40px);
  display: flex; flex-direction: column; gap: clamp(20px, 2.6vw, 32px);
  padding-left: 34px;
}
/* 왼쪽 세로선 */
.p-flow::before {
  content: ""; position: absolute; left: 10px; top: 10px; bottom: 10px;
  width: 2px; border-radius: 1px; background: var(--brand-100);
}
.p-flow__item { position: relative; }
/* 단계 점 */
.p-flow__item::before {
  content: ""; position: absolute; left: -30px; top: 6px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-500);
  box-shadow: 0 0 0 4px var(--brand-50);
}
.p-flow__step {
  display: inline-block;
  font-size: var(--fs-xs); font-weight: var(--fw-bold); color: var(--brand-ink);
  background: var(--brand-50); padding: 3px 10px; border-radius: var(--radius-pill);
}
.p-flow__item h3 { margin-top: var(--space-2); font-size: var(--fs-h4); font-weight: var(--fw-bold); color: var(--ink-900); }
.p-flow__item p { margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--ink-500); line-height: 1.75; }
.p-flow__note {
  margin-top: var(--space-3); width: fit-content;
  display: flex; align-items: center; gap: var(--space-2);
  font-size: var(--fs-xs); color: var(--ink-500);
  background: var(--surface-alt, var(--surface));
  border: var(--border-w) solid var(--line);
  padding: 6px 12px; border-radius: var(--radius-pill);
}
.p-flow__note .ico { width: 15px; height: 15px; color: var(--brand-500); flex: none; }

/* ── FAQ(faq) : 분류 제목 + 큰 글씨 ── */
.faq-group {
  margin: clamp(36px, 4.5vw, 60px) 0 var(--space-5);
  font-size: clamp(17px, 2vw, 22px); font-weight: 800; color: var(--ink-900);
  display: flex; align-items: center; gap: 10px;
}
.faq-group::before {
  content: ""; width: 4px; height: 20px; border-radius: 2px;
  background: var(--brand-500); flex: none;
}
.faq-group:first-of-type { margin-top: 0; }
[data-page="faq"] .faq-item__q { font-size: clamp(16px, 1.8vw, 19px); }
