/* site-local: 로컬체험단 전역 스타일 (모든 페이지에 로드)
   views/partials/header.ejs 에서 로드.

   컨셉: 리뷰노트 스타일 — 딥 티얼 + 화이트 + 옐로우 악센트, 정보 밀집
   팔레트:
     --brand:       #0d9488 (teal-600, 메인)
     --brand-deep:  #0f766e (teal-700, 강조)
     --brand-light: #f0fdfa (teal-50, 배경 틴트)
     accent-amber:  #f59e0b (보조, 2번 hero 카드)
     surface:       #f8fafc (body, 라이트 그레이)
*/

/* ============================================================
   1. CSS 변수 오버라이드 — 티얼 팔레트
   ============================================================ */
body.site-local {
  --brand: #0d9488 !important;
  --brand-deep: #0f766e !important;
  --brand-light: #f0fdfa !important;
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  background: #f8fafc !important;
  color:#0f172a;
}

/* ============================================================
   2. site-theme.css 하드코딩 색상 → 티얼 오버라이드
   ============================================================ */
body.site-local .ms-topbar {
  background: linear-gradient(90deg, #0f766e, #0d9488) !important;
}
body.site-local .ms-header {
  border-bottom: 1px solid rgba(13,148,136,0.18) !important;
}
body.site-local .ms-chip {
  background:#f0fdfa !important;
  color:#0f766e !important;
  border-color:rgba(13,148,136,0.25) !important;
}
body.site-local .hero-badge.primary,
body.site-local .campaign-badge.primary {
  background:#0d9488 !important;
  color:#fff !important;
}
body.site-local .hero-promo,
body.site-local .campaign-body .promo {
  background:#f0fdfa !important;
  color:#0f766e !important;
}
body.site-local.auth-login .auth-brand,
body.site-local.auth-join .join-shell {
  background: linear-gradient(140deg, #0f766e, #0d9488) !important;
}
body.site-local.auth-reg-influencer .reg-card,
body.site-local.auth-reg-advertiser .adv-reg-card {
  border-top: 4px solid #0d9488 !important;
}

/* ============================================================
   3. 헤더 컨테이너 폭 — 거의 풀폭 1600px
   site-local 의 현재 header.ejs 가 .ms-head-main + .ms-header-extra 구조 사용
   ============================================================ */
body.site-local .ms-head-main {
  max-width:1600px !important;
  padding:18px 40px 14px !important;
  grid-template-columns:auto minmax(280px,1fr) auto !important;
  gap:28px !important;
}
body.site-local .site-header-extra {
  max-width:1600px !important;
  padding:0 40px 14px !important;
}
body.site-local .ms-topbar > div,
body.site-local .ms-topbar-inner {
  max-width:1600px !important;
  padding:8px 40px !important;
}

/* ============================================================
   4. 헤더 비주얼 — 화이트 + 티얼 액센트 + 파비콘 로고
   ============================================================ */
body.site-local .ms-header {
  background:#fff !important;
  border-bottom:1px solid #e2e8f0 !important;
  box-shadow:0 1px 0 rgba(15,23,42,0.02) !important;
  backdrop-filter:none !important;
}

/* 브랜드 마크 — 파비콘(favicon-local.svg) 적용 */
body.site-local .ms-head-main .ms-brand {
  align-items:center !important;
  gap:14px !important;
}
body.site-local .ms-head-main .ms-brand-mark {
  display:flex !important;
  width:46px !important;
  height:46px !important;
  border-radius:10px !important;
  background:url('/img/favicon-local.svg') center/cover no-repeat !important;
  box-shadow:0 8px 20px rgba(13,148,136,0.25) !important;
  color:transparent !important;
  font-size:0 !important;
  overflow:hidden !important;
}
body.site-local .ms-head-main .ms-brand-text strong {
  font-family:"Pretendard","Noto Sans KR",sans-serif !important;
  font-size:22px !important;
  font-weight:900 !important;
  color:#0f766e !important;
  letter-spacing:-0.035em !important;
}
body.site-local .ms-head-main .ms-brand-text span {
  color:#64748b !important;
  font-weight:600 !important;
  font-size:12px !important;
  margin-top:2px !important;
}

/* 검색창 — 라운드 pill + 티얼 액센트 */
body.site-local .ms-head-main .ms-search-box {
  height:44px !important;
  border:1.5px solid #e2e8f0 !important;
  border-radius:10px !important;
  background:#f8fafc !important;
  box-shadow:none !important;
  transition:border-color .15s, background .15s, box-shadow .15s;
  padding:0 !important;
}
body.site-local .ms-head-main .ms-search-box:focus-within {
  border-color:#0d9488 !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(13,148,136,0.12) !important;
}
body.site-local .ms-head-main .ms-search-box input {
  color:#0f172a !important;
  font-size:14px !important;
  padding:0 18px !important;
  background:transparent !important;
}
body.site-local .ms-head-main .ms-search-box input::placeholder {
  color:#94a3b8 !important;
}
body.site-local .ms-head-main .ms-search-box button {
  background:transparent !important;
  border-left:1px solid #e2e8f0 !important;
  border-radius:0 8px 8px 0 !important;
  color:#0f766e !important;
  font-weight:800 !important;
  width:78px !important;
  flex-shrink:0 !important;
}
body.site-local .ms-head-main .ms-search-box button:hover {
  background:#f0fdfa !important;
}

/* 액션 버튼 — 깔끔한 사각형 (라운드 약간) */
body.site-local .ms-head-main .ms-actions {
  gap:8px !important;
}
body.site-local .ms-head-main .ms-actions .ms-btn {
  background:#fff !important;
  border:1.5px solid #e2e8f0 !important;
  color:#334155 !important;
  border-radius:8px !important;
  font-weight:700 !important;
  height:40px !important;
  min-height:40px !important;
  font-size:13px !important;
  padding:0 16px !important;
  box-shadow:none !important;
  transition:background .15s, border-color .15s, color .15s;
}
body.site-local .ms-head-main .ms-actions .ms-btn:hover {
  background:#f0fdfa !important;
  border-color:#0d9488 !important;
  color:#0f766e !important;
  transform:none !important;
}
body.site-local .ms-head-main .ms-actions a[href="/auth/register"],
body.site-local .ms-head-main .ms-actions .ms-btn.primary {
  background:#0d9488 !important;
  border:1.5px solid #0d9488 !important;
  color:#fff !important;
  font-weight:800 !important;
}
body.site-local .ms-head-main .ms-actions a[href="/auth/register"]:hover,
body.site-local .ms-head-main .ms-actions .ms-btn.primary:hover {
  background:#0f766e !important;
  border-color:#0f766e !important;
  color:#fff !important;
}
body.site-local .ms-head-main .ms-ham span { background:#334155 !important; }

/* 카테고리 네비 — 텍스트 라인 스타일 (리뷰노트처럼 심플) */
body.site-local .site-header-extra {
  background:#fff !important;
  border-top:1px solid #f1f5f9 !important;
}
body.site-local .site-header-extra .menu-list.menu-textline {
  padding:12px 0 !important;
  gap:4px !important;
}
body.site-local .site-header-extra .menu-textline .menu-item {
  height:38px !important;
  padding:0 16px !important;
  color:#475569 !important;
  font-size:13px !important;
  font-weight:700 !important;
  border-radius:8px !important;
  transition:background .15s, color .15s !important;
}
body.site-local .site-header-extra .menu-textline .menu-item::before {
  content:"" !important;
  display:none !important;
}
body.site-local .site-header-extra .menu-textline .menu-item:hover {
  background:#f0fdfa !important;
  color:#0f766e !important;
}

/* ============================================================
   5. 서브페이지 컨테이너 폭 — 홈과 동일 1600px
   ============================================================ */
.site-local .list-shell {
  max-width:1600px !important;
  padding:24px 40px 72px !important;
}
.site-local .detail-wrap {
  max-width:1600px !important;
  padding:0 40px !important;
  grid-template-columns:minmax(0,1fr) 360px !important;
  gap:40px !important;
}
.site-local .reco-page {
  max-width:1600px !important;
  padding:32px 40px !important;
}
.site-local .main-wrap { max-width:1600px !important; }
.site-local .my-layout {
  max-width:1600px !important;
  padding:24px 40px !important;
}
.site-local .footer-inner { max-width:1600px !important; }
.site-local .header-inner,
.site-local .tab-bar-inner { max-width:1600px !important; }

/* ============================================================
   6. 캠페인 리스트 페이지 — 5 cols + 심플 카드 스타일
   ============================================================ */
.site-local .list-shell .grid.cols-5,
.site-local .list-shell .grid.cols-4,
.site-local .list-shell .grid.cols-3 {
  grid-template-columns:repeat(5,minmax(0,1fr)) !important;
  gap:16px !important;
}
.site-local .list-shell .hero {
  border:1px solid #e2e8f0 !important;
  border-radius:12px !important;
  background:#fff !important;
  padding:22px 24px !important;
}
.site-local .list-shell .hero h1 { color:#0f172a !important; letter-spacing:-0.025em; }
.site-local .list-shell .hero p { color:#64748b !important; }
.site-local .list-shell .filter {
  border:1px solid #e2e8f0 !important;
  border-radius:10px !important;
  background:#fff !important;
}
.site-local .list-shell .sel,
.site-local .list-shell .inp {
  border:1px solid #e2e8f0 !important;
  border-radius:8px !important;
  background:#f8fafc !important;
}
.site-local .list-shell .sel:focus,
.site-local .list-shell .inp:focus {
  border-color:#0d9488 !important;
  background:#fff !important;
  outline:none;
}
.site-local .list-shell .btn {
  background:#0d9488 !important;
  border:none !important;
  border-radius:8px !important;
  box-shadow:0 2px 8px rgba(13,148,136,0.22) !important;
}
.site-local .list-shell .card {
  border-radius:10px !important;
  border:1px solid #e2e8f0 !important;
  background:#fff !important;
  box-shadow:none !important;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}
.site-local .list-shell .card:hover {
  transform:translateY(-3px) !important;
  border-color:#5eead4 !important;
  box-shadow:0 10px 24px rgba(13,148,136,0.12) !important;
}
.site-local .list-shell .card .title { color:#0f172a !important; }
.site-local .list-shell .card .promo {
  background:#f0fdfa !important;
  color:#0f766e !important;
}
.site-local .list-shell .card .badge.primary {
  background:#0d9488 !important;
  color:#fff !important;
}
.site-local .list-shell .pages a {
  border:1px solid #e2e8f0 !important;
  background:#fff !important;
  color:#475569 !important;
}
.site-local .list-shell .pages a:hover {
  border-color:#0d9488 !important;
  color:#0f766e !important;
}
.site-local .list-shell .pages a.active {
  background:#0d9488 !important;
  border-color:#0d9488 !important;
  color:#fff !important;
}

/* ============================================================
   7. 디테일 / AI 추천
   ============================================================ */
.site-local .detail-card,
.site-local .detail-section {
  background:#fff !important;
  border:1px solid #e2e8f0 !important;
  border-radius:10px !important;
  box-shadow:none !important;
}
.site-local .reco-page .reco-card {
  border:1px solid #e2e8f0 !important;
  border-radius:10px !important;
  background:#fff !important;
}

/* ============================================================
   8. 반응형
   ============================================================ */
@media(max-width:1400px) {
  body.site-local .ms-head-main { padding:16px 28px 12px !important; }
  body.site-local .site-header-extra { padding:0 28px 12px !important; }
  body.site-local .ms-topbar > div,
  body.site-local .ms-topbar-inner { padding:6px 28px !important; }
  .site-local .list-shell { padding:20px 28px 60px !important; }
  .site-local .detail-wrap { padding:0 28px !important; }
  .site-local .reco-page { padding:28px !important; }
  .site-local .my-layout { padding:20px 28px !important; }
  .site-local .list-shell .grid.cols-5,
  .site-local .list-shell .grid.cols-4,
  .site-local .list-shell .grid.cols-3 {
    grid-template-columns:repeat(4,minmax(0,1fr)) !important;
  }
}
@media(max-width:1100px) {
  .site-local .list-shell .grid.cols-5,
  .site-local .list-shell .grid.cols-4,
  .site-local .list-shell .grid.cols-3 {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
  .site-local .detail-wrap { grid-template-columns:1fr !important; }
}
@media(max-width:900px) {
  body.site-local .ms-head-main { padding:12px 16px !important; }
  body.site-local .site-header-extra { padding:0 16px 10px !important; }
  body.site-local .ms-topbar > div,
  body.site-local .ms-topbar-inner { padding:6px 16px !important; }
  .site-local .list-shell { padding:14px 16px 56px !important; }
  .site-local .detail-wrap { padding:0 16px !important; }
  .site-local .reco-page { padding:18px 16px !important; }
  .site-local .my-layout { padding:16px !important; }
  .site-local .list-shell .grid.cols-5,
  .site-local .list-shell .grid.cols-4,
  .site-local .list-shell .grid.cols-3 {
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
  }
}
@media(max-width:640px) {
  .site-local .list-shell { padding:12px 12px 56px !important; }
  .site-local .list-shell .grid.cols-5,
  .site-local .list-shell .grid.cols-4,
  .site-local .list-shell .grid.cols-3 {
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
  }
}

/* ============================================================
   포커스 인디케이터 — local 브랜드 컬러 (#0d9488)
   ============================================================ */
body.site-local a:focus-visible,
body.site-local button:focus-visible,
body.site-local input:focus-visible,
body.site-local textarea:focus-visible,
body.site-local select:focus-visible,
body.site-local [tabindex]:focus-visible {
  outline: 2px solid #0d9488 !important;
  outline-offset: 2px !important;
}
body.site-local .campaign-card:focus-visible,
body.site-local .cp-card:focus-visible,
body.site-local .card:focus-visible,
body.site-local .nh3-card:focus-visible,
body.site-local .op-hero5-card:focus-visible,
body.site-local .op-brand-card:focus-visible,
body.site-local .op-midban-card:focus-visible,
body.site-local .uh3-card:focus-visible,
body.site-local .lh2-card:focus-visible {
  outline: none !important;
  box-shadow: 0 0 0 3px #0d9488, 0 8px 24px rgba(0,0,0,0.08) !important;
}
