/* =============================================================================
   나라사랑모바일(군모바일) 퍼블리싱 — 변경 영역 전용
   범위: (1) GNB(메인 상단 헤더/카테고리)  (2) 상품상세 요금계산 구성기
   기준: Figma  PC-메인(7:9013) / 옵션선택_구성기(132:53257)
   * 전시영역(배너/상품리스트/기획전)·상세 본문 이미지 등은 관리자 제어 → 범위 외
   * 기존 사이트 CSS와의 충돌 방지를 위해 전 규칙을 .nsm-scope 하위로 스코핑
   * [쌍둥이 파일] fo-pc 와 fo-mobile 의 static/css/publish.css 는 동일 파일이어야 함. (수정 시 양쪽 함께 반영)
============================================================================= */
.nsm-scope{
  --red:#d82029;            /* 브랜드/구매 레드 (Figma 구매하기 #d82029) */
  --red-soft:#fdecec;
  --kakao:#fee500;
  --kakao-ink:#3c1e1e;
  --ink:#1f2733;
  --ink-2:#767f8c;          /* 라벨 그레이 */
  --ink-3:#9aa3b0;          /* 비활성 텍스트 */
  --line:#e3e6ea;
  --line-strong:#c9ced6;
  --fill:#f5f6f8;           /* 비활성 pill 배경 */
  --white:#fff;
  --navy:#16233f;
  --radius:10px;
  --font:"Pretendard","Apple SD Gothic Neo",-apple-system,BlinkMacSystemFont,"Malgun Gothic",sans-serif;
}
.nsm-scope, .nsm-scope *{box-sizing:border-box}
.nsm-scope{font-family:var(--font);color:var(--ink);line-height:1.5;-webkit-font-smoothing:antialiased}
.nsm-scope img{max-width:100%;display:block}
.nsm-scope button{font-family:inherit;cursor:pointer;border:none;background:none}

/* ---------------------------------------------------------------------------
   1) GNB
--------------------------------------------------------------------------- */
.nsm-scope .gnb-promo{background:var(--red);color:#fff;text-align:center;font-size:14px;font-weight:600;
  padding:9px 0;position:relative}
.nsm-scope .gnb-promo b{margin:0 10px;font-weight:800}
.nsm-scope .gnb-promo .go{display:inline-block;background:rgba(255,255,255,.16);border:1px solid rgba(255,255,255,.5);
  border-radius:14px;padding:2px 12px;font-size:12px;font-weight:600;margin-left:6px}
.nsm-scope .gnb-promo .close{position:absolute;right:20px;top:50%;transform:translateY(-50%);color:#fff;font-size:16px}

.nsm-scope .gnb-head{max-width:1200px;margin:0 auto;display:flex;align-items:center;gap:24px;padding:18px 20px}
.nsm-scope .gnb-logo{display:flex;align-items:center;flex:0 0 auto}
.nsm-scope .gnb-logo img{height:44px;width:auto;display:block}
.nsm-scope .gnb-search{flex:1 1 auto;max-width:520px;display:flex;align-items:center;border:2px solid var(--red);
  border-radius:24px;padding:8px 16px}
.nsm-scope .gnb-search input{flex:1;border:none;outline:none;font-size:14px;color:var(--ink)}
.nsm-scope .gnb-search input::placeholder{color:var(--ink-3)}
.nsm-scope .gnb-search .ico{color:var(--red);font-size:18px}
.nsm-scope .gnb-kakao{display:inline-flex;align-items:center;gap:7px;background:var(--kakao);color:var(--kakao-ink);
  border-radius:20px;padding:8px 15px;font-size:13px;font-weight:700;flex:0 0 auto}
.nsm-scope .gnb-kakao .ch{width:22px;height:22px;border-radius:6px;background:var(--kakao-ink);color:var(--kakao);
  display:grid;place-items:center;font-size:12px;font-weight:800}
.nsm-scope .gnb-util{display:flex;gap:20px;flex:0 0 auto;margin-left:auto;font-size:11px;color:var(--ink-2)}
.nsm-scope .gnb-util a{display:flex;flex-direction:column;align-items:center;gap:4px;color:inherit;text-decoration:none;white-space:nowrap}
.nsm-scope .gnb-util .n{width:24px;height:24px;background-position:center;background-repeat:no-repeat;background-size:24px 24px}
.nsm-scope .gnb-util .u-login .n{background-image:url('../images/common/ico_login.png')}
.nsm-scope .gnb-util .u-join .n{background-image:url('../images/common/ico_user.png')}
.nsm-scope .gnb-util .u-my .n{background-image:url('../images/common/ico_user.png')}
.nsm-scope .gnb-util .cart .n{background-image:url('../images/common/ico_shop.png')}
.nsm-scope .gnb-util .cart{position:relative}
.nsm-scope .gnb-util .cart .badge{position:absolute;top:-4px;right:-6px;background:var(--red);color:#fff;font-size:10px;
  min-width:16px;height:16px;border-radius:8px;display:grid;place-items:center;font-weight:700}

.nsm-scope .gnb-nav{border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.nsm-scope .gnb-nav .inner{max-width:1200px;margin:0 auto;display:flex;align-items:center;padding:0 20px}
.nsm-scope .gnb-nav .cats{display:flex;gap:28px;flex:1}
.nsm-scope .gnb-nav .cats a{display:block;padding:14px 0;font-size:15px;font-weight:700;color:var(--ink);text-decoration:none;
  border-bottom:3px solid transparent}
.nsm-scope .gnb-nav .cats a.on{color:var(--red);border-bottom-color:var(--red)}
.nsm-scope .gnb-nav .sub{display:flex;gap:18px;font-size:12.5px;color:var(--ink-2)}
.nsm-scope .gnb-nav .sub a{color:inherit;text-decoration:none}

/* ---------------------------------------------------------------------------
   2) 상품상세 요금계산 구성기 (3열: 이미지 | 옵션선택 | 월납부금)
--------------------------------------------------------------------------- */
.nsm-scope .cfg{max-width:1200px;margin:0 auto;display:grid;grid-template-columns:300px 1fr 312px;gap:56px;padding:24px 20px}
@media (max-width:1100px){.nsm-scope .cfg{grid-template-columns:1fr;gap:28px}}

/* 이미지 컬럼 */
.nsm-scope .cfg-img .main{position:relative;border:1px solid var(--line);border-radius:12px;overflow:hidden;aspect-ratio:1/1;
  background:var(--fill)}
.nsm-scope .cfg-img .main .badge5g{position:absolute;left:12px;top:12px;background:var(--red);color:#fff;font-weight:900;
  font-size:15px;padding:5px 10px;border-radius:8px}
.nsm-scope .cfg-img .thumbs{display:flex;gap:8px;margin-top:12px}
.nsm-scope .cfg-img .thumbs .t{flex:1;aspect-ratio:1/1;border:1px solid var(--line);border-radius:9px;overflow:hidden;
  background:var(--fill)}
.nsm-scope .cfg-img .thumbs .t.on{border-color:var(--red);border-width:2px}
.nsm-scope .cfg-img .kakao{width:100%;margin-top:16px;background:var(--kakao);color:var(--kakao-ink);border-radius:10px;
  padding:14px;font-size:15px;font-weight:800;display:flex;align-items:center;justify-content:center;gap:8px}
.nsm-scope .cfg-img .kakao .ch{width:24px;height:24px;border-radius:7px;background:var(--kakao-ink);color:var(--kakao);
  display:grid;place-items:center;font-weight:800;font-size:13px}

/* 옵션 컬럼 */
.nsm-scope .opt-row{display:grid;grid-template-columns:78px 1fr;gap:12px;align-items:start;padding:12px 0}
.nsm-scope .opt-row > .lb{color:var(--ink-2);font-size:15px;font-weight:600;padding-top:12px;line-height:1.3}
.nsm-scope .swatches{display:flex;gap:10px;align-items:center}
.nsm-scope .swatch{width:30px;height:30px;border-radius:50%;border:2px solid var(--white);
  box-shadow:0 0 0 1px var(--line-strong);cursor:pointer}
.nsm-scope .swatch.on{box-shadow:0 0 0 2px var(--red)}
.nsm-scope .swatch-name{font-size:13px;color:var(--ink-2);margin-top:8px}

.nsm-scope .pill{border:1.5px solid var(--line);border-radius:10px;background:var(--white);color:var(--ink);
  padding:12px 8px;font-size:15px;font-weight:700;text-align:center;cursor:pointer;line-height:1.25;min-height:50px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px}
.nsm-scope .pill .sub{font-size:12px;font-weight:500;color:var(--ink-2)}
.nsm-scope .pill.on{border-color:var(--red);color:var(--ink)}
.nsm-scope .pill.off{background:var(--fill);border-color:var(--fill);color:var(--ink-3)}
.nsm-scope .pill.off .sub{color:var(--ink-3)}
.nsm-scope .pill.nostock{border-style:dashed}
.nsm-scope .pill.nostock::after{content:'재고없음';display:block;font-size:10px;font-weight:500;color:var(--red);line-height:1.2;margin-top:2px}
.nsm-scope .stock-notice{margin:10px 0 0;padding:10px 12px;border-radius:8px;background:#fff4f4;color:var(--red);font-size:14px;font-weight:700;text-align:center;line-height:1.5}
.nsm-scope .stock-notice span{display:block;font-size:12px;font-weight:500;color:var(--ink-2)}
.nsm-scope .pill-row{display:flex;gap:10px}
.nsm-scope .pill-row > .pill{flex:1}
/* 할인방법 pill: 긴 라벨(공통지원금 할인(24개월)) 깔끔 정렬 - 공백에서만 줄바꿈 */
.nsm-scope .pill.dc-pill{padding:9px 6px;min-height:58px;gap:1px}
.nsm-scope .pill.dc-pill .dc-lb{font-size:13px;font-weight:700;line-height:1.3;word-break:keep-all}
.nsm-scope .pill.dc-pill .dc-lb small{display:block;font-size:12px;font-weight:600;line-height:1.35;white-space:nowrap}   /* 1002: 제목/괄호 2줄 고정 */
.nsm-scope .pill.dc-pill .sub{font-size:12px}
.nsm-scope .opt-help{font-size:13px;color:var(--red);margin-top:8px;font-weight:600}
.nsm-scope .opt-help.muted{color:var(--ink-3);font-weight:500}

.nsm-scope .rtpl-select{display:flex;align-items:center;justify-content:space-between;border:1.5px solid var(--ink);
  border-radius:10px;padding:14px 16px;font-weight:800;font-size:15px;max-width:240px}
.nsm-scope .rtpl-select .price{font-weight:600;color:var(--ink-2);font-size:13px}
.nsm-scope .rtpl-select .caret{color:var(--ink-2)}
/* 요금제 드롭다운(rtpl-list) + 빈 설명 숨김 - 옵션변경 팝업/상세 공통 */
.nsm-scope .rtpl-list{margin-top:6px;max-width:240px;border:1.5px solid var(--line);border-radius:10px;overflow:hidden;background:#fff;box-shadow:0 8px 24px rgba(20,30,50,.10)}
.nsm-scope .rtpl-item{padding:12px 16px;font-size:14px;font-weight:600;color:var(--ink-2);cursor:pointer;border-bottom:1px solid var(--line)}
.nsm-scope .rtpl-item:last-child{border-bottom:0}
.nsm-scope .rtpl-item:hover,.nsm-scope .rtpl-item:active{background:var(--fill)}
.nsm-scope .rtpl-detail:empty{display:none}
.nsm-scope .rtpl-detail{margin-top:12px;background:var(--fill);border-radius:10px;padding:16px 18px;font-size:14px;
  color:var(--ink-2);line-height:1.9}
/* 1015: 요금제 설명 항목명·값 열 정렬 */
.nsm-scope .rtpl-dl{display:grid;grid-template-columns:max-content 1fr;column-gap:14px;row-gap:6px;margin:0;line-height:1.6}
.nsm-scope .rtpl-dl dt{font-weight:700;color:var(--ink);white-space:nowrap}
.nsm-scope .rtpl-dl dt:empty{display:none}
.nsm-scope .rtpl-dl dt:empty + dd{grid-column:1 / -1}
.nsm-scope .rtpl-dl dd{margin:0;word-break:keep-all;overflow-wrap:anywhere}

.nsm-scope .selfdc{margin-top:10px;background:var(--fill);border-radius:10px;padding:12px 16px;font-size:14px;color:var(--ink);font-weight:800}   /* 0930: 문구 전체 진하게 */
.nsm-scope .selfdc b{color:var(--red);font-weight:800;margin:0 4px}

/* 월납부금 카드 */
.nsm-scope .paycard{border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 6px 20px rgba(20,30,50,.05)}
.nsm-scope .pay-blk{padding:14px 0;border-bottom:1px dashed var(--line)}
.nsm-scope .pay-blk:first-child{padding-top:2px}
.nsm-scope .pay-head{display:flex;align-items:center;gap:8px;font-size:15px;font-weight:800}
.nsm-scope .pay-head .bdg{width:22px;height:22px;border-radius:6px;background:var(--red);color:#fff;font-size:12px;
  font-weight:800;display:grid;place-items:center}
.nsm-scope .pay-head .amt{margin-left:auto;font-size:16px}
.nsm-scope .pay-line{display:flex;justify-content:space-between;font-size:13px;color:var(--ink-2);margin-top:7px}
.nsm-scope .pay-line.em{color:var(--red);font-weight:700}
.nsm-scope .pay-line.strong{color:var(--ink);font-weight:700}
.nsm-scope .pay-total{display:flex;align-items:center;gap:8px;padding:16px 0 4px}
.nsm-scope .pay-total .bdg{width:22px;height:22px;border-radius:6px;background:var(--red);color:#fff;font-size:12px;
  font-weight:800;display:grid;place-items:center}
.nsm-scope .pay-total .plus{font-weight:800;color:var(--ink-2)}
.nsm-scope .pay-total .lb{font-size:15px;font-weight:800}
.nsm-scope .pay-total .sum{margin-left:auto;font-size:30px;font-weight:900;letter-spacing:-1px}
.nsm-scope .pay-total .sum small{font-size:16px;font-weight:800}
.nsm-scope .pay-btns{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.nsm-scope .btn{border-radius:10px;padding:15px;font-size:16px;font-weight:800;text-align:center}
.nsm-scope .btn-cart{background:var(--white);border:1.5px solid var(--line-strong);color:var(--ink)}
.nsm-scope .btn-buy{background:var(--red);color:#fff}
.nsm-scope .btn-line{background:var(--white);border:1.5px solid var(--line);color:var(--ink-2);font-size:15px;font-weight:700}
.nsm-scope .pay-inq{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}
.nsm-scope .pay-card-benefit{margin-top:14px;background:var(--red-soft);border:1px solid #f3c9cb;border-radius:12px;
  padding:14px 16px;display:flex;gap:12px;align-items:center}
.nsm-scope .pay-card-benefit .ic{width:34px;height:24px;border-radius:5px;background:var(--red);flex:0 0 auto}
.nsm-scope .pay-card-benefit .t{font-size:14px;font-weight:800;color:var(--ink)}
.nsm-scope .pay-card-benefit .d{font-size:12px;color:var(--ink-2)}

/* 재고 4차원: 품절 단품 선택 시 담기/구매 버튼 비활성 */
.nsm-scope .btn:disabled,.nsm-scope .btn.is-soldout{opacity:.45;cursor:not-allowed;filter:grayscale(1)}

/* T12: 요금계산 결제카드(.cfg-pay) 스크롤 시 따라다님 - PC 3열 레이아웃(>=1101px)에서만 sticky.
   모바일/좁은 화면(<=1100px, 1열 스택)은 자연 흐름 유지. */
@media (min-width:1101px){
  .nsm-scope .cfg-pay{position:sticky;top:150px;align-self:start;max-height:calc(100vh - 170px);overflow-y:auto}
}
