/* =========================
   Reset
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
a {
  text-decoration: none;
}
ul {
  list-style: none;
}
html,
body {
  height: 100%;
  overflow-x: hidden;
}
body {
  font-family: Apple SD Gothic Neo, Malgun Gothic, sans-serif;
}

/* =========================
   Scale variables (viewport-aware)
========================= */
:root {
  --h: clamp(64px, 5vw, 86px); /* header height */
  --gap: clamp(14px, 2vw, 28px); /* gaps */
  --nav-fs: clamp(13px, 1.05vw, 18px); /* top nav font-size */
  --logo-w: clamp(120px, 10.5vw, 190px); /* logo width */
  --icon: clamp(26px, 2.25vw, 36px); /* login/lang icon */
  --chip-h: clamp(24px, 2.2vw, 34px); /* N.LIVE, mall height */
  --ham-box: clamp(40px, 3.4vw, 52px); /* hamburger box */
  --ham-w: clamp(22px, 2.4vw, 30px); /* hamburger line width */
  --ham-h: clamp(3px, 0.35vw, 4px); /* hamburger line height */
  --ham-gap: clamp(3px, 0.35vw, 4px); /* hamburger line gap */
}

/* =========================
   HEADER
========================= */
.ns-header {
  position: sticky;
  top: 0;
  z-index: 1500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  height: var(--h);
  background: #fff;
  font-weight: bold;
  overflow: visible;
}
.ns-logo {
  flex: 0 0 auto;
  width: var(--logo-w);
  padding-top: 5px;
}
.ns-nav {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.ns-header-right {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: var(--gap);
}

/* SVG logo color */
#logo-svg .logo-title {
  fill: #000;
}
#logo-svg .logo-fill {
  fill: #e60012;
}
#logo-svg .logo-line {
  fill: transparent;
}

/* 1차 메뉴 */
.mom {
  display: flex;
  align-items: center;
  gap: var(--gap);
  flex-wrap: nowrap;
  max-width: 100%;
}
.mom > li {
  flex: 0 0 auto;
}
.mom > li > a {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  padding: 0 clamp(8px, 0.9vw, 14px);
  color: #000;
  font-size: var(--nav-fs);
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
}

/* 아이콘 */
.login,
.kr {
  width: var(--icon);
  height: var(--icon);
  display: block;
}
.nlive,
.mall {
  height: var(--chip-h);
  display: block;
}

/* 햄버거(항상 보임) */
#ns-trigger {
  display: grid;
  place-items: center;
  width: var(--ham-box);
  height: var(--ham-box);
}
.ham {
  cursor: pointer;
}
.ham .line {
  width: var(--ham-w);
  height: var(--ham-h);
  background: #000;
  display: block;
  margin: var(--ham-gap);
  transition: all 0.3s;
}
.ham.on .line:nth-child(1) {
  transform: translateY(calc(var(--ham-h) + var(--ham-gap))) rotate(45deg);
}
.ham.on .line:nth-child(2) {
  opacity: 0;
}
.ham.on .line:nth-child(3) {
  transform: translateY(calc(-1 * (var(--ham-h) + var(--ham-gap))))
    rotate(-45deg);
}

/* =========================
   상단 드롭다운 서브
========================= */
.ns-sub-wrap {
  display: none;
  position: absolute;
  top: var(--h);
  left: 0;
  width: 100%;
  background: #fff;
  border-top: 1px solid #ddd;
  z-index: 1000;
}
.ns-sub-wrap .son {
  display: none;
  padding: 20px 100px;
}
.ns-sub-wrap .son ul {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 50px;
  padding: 15px 50px;
}
.ns-sub-wrap .son ul li > a {
  display: flex;
  justify-content: space-between;
  padding: 8px 12px;
  color: #333;
  white-space: nowrap;
  border-bottom: 1px solid #ccc;
  width: 250px;
  font-size: clamp(12px, 0.95vw, 15px);
}
.ns-sub-wrap .grandson {
  display: block !important;
  position: relative;
  padding: 20px 0;
}
.ns-sub-wrap .grandson li a {
  display: block;
  padding: 5px 15px;
  color: #333;
  font-weight: 500;
}

/* header.on 일 때 노출 */
.ns-header.on + .ns-sub-wrap,
.ns-header.on .ns-sub-wrap {
  display: block;
}

/* =========================
   사이드메뉴
========================= */
.ns-sidemenu_mom {
  position: fixed;
  top: var(--h);
  right: -100%;
  width: 100%;
  height: calc(100% - var(--h));
  background: #fff;
  box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
  z-index: 1400;
  transition: right 0.3s;
  display: block;
  overflow-y: auto;
  font-weight: bold;
}
.ns-sidemenu_mom.active {
  right: 0;
}
.ns-sidemenu_mom > li {
  border-bottom: 1px solid #ddd;
}
.ns-sidemenu_mom li a {
  display: block;
  line-height: clamp(44px, 4.2vw, 60px);
  padding-left: 20px;
  color: #333;
  font-size: clamp(14px, 1vw, 18px);
}
.ns-sidemenu_son {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 10px 20px;
}
.ns-sidemenu_grandson {
  display: none;
  padding-left: 15px;
  margin-top: 5px;
}

/* =========================
   Responsive
========================= */
@media (max-width: 1440px) {
  .mom {
    gap: clamp(12px, 1.6vw, 16px);
  }
}

/* ✅ 1200px 이하에서는 상단 메뉴(.mom)를 숨김 */
@media (max-width: 1200px) {
  .ns-nav {
    display: none !important;
  } /* .mom 포함한 네비 전체 숨김 */
  .ns-sub-wrap {
    display: none !important;
  } /* 데스크탑용 드롭다운도 강제 숨김 */
}

@media (max-width: 767px) {
  .ns-sidemenu_son {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 469px) {
  .ns-sidemenu_son {
    grid-template-columns: 1fr;
  }
}

/* =========================
   FOOTER
========================= */
.ns-footer {
  background: #f5f5f5;
  font-size: clamp(13px, 0.95vw, 16px);
  color: #333;
}
.footer-link {
  max-width: 1200px;
  width: clamp(280px, 92vw, 1200px);
  margin: auto;
  padding: 30px 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.links {
  flex: 1 1 520px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  line-height: 1.6;
  word-break: keep-all;
}
.links a {
  color: #333;
  white-space: nowrap;
  font-size: clamp(13px, 0.95vw, 16px);
}
.footer-right {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
  min-width: 220px;
}
.dropdown-btn {
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 25px;
  cursor: pointer;
  background: #fff;
  font-size: clamp(13px, 0.95vw, 16px);
}
.sns-icons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
.footer-right img {
  width: 40px;
  height: 40px;
}
.footer_p {
  max-width: 1200px;
  width: clamp(280px, 92vw, 1200px);
  margin: 10px auto 40px;
  color: #333;
  line-height: 1.8;
  font-size: clamp(13px, 0.95vw, 16px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1600;
}
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 420px);
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  text-align: start;
}
.modal-section {
  margin-bottom: 20px;
}
.modal-section h3 {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: clamp(14px, 1vw, 18px);
}
.modal-section ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.modal-section ul li {
  width: calc(50% - 5px);
}
.close-btn {
  float: right;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
}

/* 데스크탑에서만 링크 구분자 표시 */
@media (min-width: 1025px) {
  .links a + a::before {
    content: "|";
    opacity: 0.45;
    margin: 0 10px 0 6px;
  }
}
