/* ============================================================
   지점안내 페이지 — 피그마 sub_지점안내_1920 (52:6191) 1920x2986
   카드 규격은 css/card.css 공용 (card card--branch)
   ============================================================ */

:root {
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", sans-serif;
  --serif: "Nanum Myeongjo", "NanumMyeongjo", serif;
  --en: "Cormorant Infant", "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: #111; background: #fff; -webkit-font-smoothing: antialiased; overflow-x: clip; } /* clip — hidden과 달리 body를 스크롤 컨테이너로 만들지 않아 세로 이중 스크롤바 원천 차단 */ }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; background: none; border: 0; cursor: pointer; }

#page { position: relative; width: 1920px; height: 2986px; transform-origin: 0 0; background: #fff; }

/* ---------- 지점 그리드: 3열 x N행 — 행 간격 60 / 열 간격 40 (피그마 4040:5117: 행 피치 455−카드 395) ---------- */
.br-grid {
  position: absolute; left: 260px; top: 720px;
  display: grid; grid-template-columns: repeat(3, 440px); gap: 60px 40px;
}

/* ============================================================
   모바일 (html.is-m — 360 캔버스) — 피그마 지점안내_360 4110:8383
   360x(동적): GNB 60 / 히어로 60~260 / 카드 320~ (1열, 피치 299) / 푸터
   (높이는 branches.php에서 지점 수로 계산) — 카드 스펙은 card.css의
   .card--branch 모바일 오버라이드 참조
   ============================================================ */
html.is-m #page { width: 360px; }

/* ---------- 히어로 (60~260) — 모바일 전용 크롭(br-hero-m.jpg, 딤 포함) ---------- */
html.is-m .sub-hero { top: 60px; height: 200px; }
html.is-m .sub-hero__img:not(.sub-hero__img--m) { display: none; }
html.is-m .sub-hero__tit { left: 0; top: 82px; width: 100%; text-align: center; }

/* 데스크톱 히어로 타이틀 위치 (inline style → CSS 이동, 모바일 오버라이드용) */
.sub-hero__tit { left: 823px; top: 302px; }

/* ---------- 지점 그리드 — 1열 320, 행 간격 32 ---------- */
html.is-m .br-grid {
  left: 20px; top: 320px; width: 320px;
  grid-template-columns: 320px; gap: 32px;
}

/* ============================================================
   태블릿 (html.is-t — 1024 캔버스) — 피그마 지점안내_1024 277:8481 기반
   flow 스택(절대좌표 무시) — 지점 수가 바뀌어도 높이 자동.
   캔버스 1024 → main.js base=1024로 tPad(바 68 자리)·t-native 푸터 자동.
   히어로 68~408 / 그리드 720 중앙 2열(카드 348, 간격 행40·열24) /
   마지막 행 → 푸터 간격 100(data-dyn-gap-t).
   ============================================================ */
html.is-t #page { width: 1024px; height: auto; }

/* 히어로 (68~408) — 데스크톱 이미지 커버 + 타이틀 중앙 40px */
html.is-t .sub-hero { top: 68px; width: 1024px; height: 340px; }
html.is-t .sub-hero__img--m { display: none; }
html.is-t .sub-hero__tit { left: 0; top: 146px; width: 100%; text-align: center; font-size: 40px; line-height: 46px; }

/* 지점 그리드 — 720 중앙 2열, 첫 행까지 100 */
html.is-t main { padding-top: 408px; }
html.is-t .br-grid {
  position: static; width: 720px; margin: 100px auto 0;
  grid-template-columns: 348px 348px; gap: 40px 24px;
}
html.is-t .card { width: 348px; }
html.is-t .card__img { width: 348px; height: 218px; }
/* 지점 카드 텍스트 — 피그마 1024: img→18 이름 19 Bold / 이름→8 주소 15 */
html.is-t .card--branch .card__name { margin-top: 18px; font-weight: 700; font-size: 19px; line-height: 23px; }
html.is-t .card--branch .card__desc { margin-top: 8px; font-size: 15px; line-height: 22px; }
/* 바로가기 바 — 터치 우준 태블릿에서는 렌더에서 제외(모바일과 동일) */
html.is-t .card__goto { display: none; }

/* ---------- 토스트 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%) translateY(10px);
  background: #333; color: #fff; padding: 12px 24px; border-radius: 6px;
  font-size: 15px; z-index: 999; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }
