/* KT 모바일샵 - 모바일 전용 2단 헤더
   PC에서는 신규 요소를 전부 숨겨 기존 헤더를 그대로 유지합니다. */
.ms-mobile-head-actions,
.ms-mobile-category-nav,
.ms-mobile-head-menu,
.ms-mobile-head-phone{
  display:none;
}

@media (max-width:760px){
  .shop-header{z-index:70;}
  .shop-header__inner{
    width:calc(100% - 24px);
    height:58px;
    gap:6px;
  }
  .shop-header__account{display:none !important;}
  .shop-brand{flex:0 0 auto;min-width:0;}
  .shop-brand__name{white-space:nowrap;}

  .ms-mobile-head-actions{
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:4px;
    margin-left:auto;
    min-width:0;
  }
  .ms-mobile-head-account,
  .ms-mobile-head-signup,
  .ms-mobile-head-logout{
    display:grid;
    place-items:center;
    height:34px;
    padding:0 6px;
    border-radius:9px;
    box-sizing:border-box;
    white-space:nowrap;
    font-size:9px;
    font-weight:900;
  }
  .ms-mobile-head-account{
    border:1px solid #dbe3ef;
    background:#fff;
    color:#334155;
  }
  .ms-mobile-head-signup{
    border:1px solid #dbe3ef;
    background:#f6f9ff;
    color:#1769ff;
  }
  .ms-mobile-head-logout{
    border:0;
    background:transparent;
    color:#64748b;
    padding-left:3px;
    padding-right:3px;
  }

  .ms-mobile-head-phone{
    display:flex;
    align-items:center;
    gap:3px;
    height:34px;
    padding:0 7px;
    border-radius:9px;
    background:#f4f7fb;
    color:#1769ff;
    white-space:nowrap;
    box-sizing:border-box;
  }
  .ms-mobile-head-phone span{
    font-size:10px;
    line-height:1;
  }
  .ms-mobile-head-phone strong{
    font-size:10px;
    font-weight:950;
    letter-spacing:-.03em;
  }

  .ms-mobile-head-menu-button{
    position:relative;
    display:grid;
    place-items:center;
    flex:0 0 34px;
    width:34px;
    height:34px;
    padding:0;
    border:1px solid #dbe3ef;
    border-radius:9px;
    background:#fff;
    box-sizing:border-box;
    appearance:none;
    cursor:pointer;
  }
  .ms-mobile-head-menu-button span{
    position:absolute;
    left:9px;
    width:14px;
    height:2px;
    border-radius:2px;
    background:#111827;
    transition:top .18s ease,transform .18s ease,opacity .18s ease;
  }
  .ms-mobile-head-menu-button span:nth-child(1){top:9px;}
  .ms-mobile-head-menu-button span:nth-child(2){top:15px;}
  .ms-mobile-head-menu-button span:nth-child(3){top:21px;}
  .ms-mobile-head-menu-button.is-open span:nth-child(1){top:15px;transform:rotate(45deg);}
  .ms-mobile-head-menu-button.is-open span:nth-child(2){opacity:0;}
  .ms-mobile-head-menu-button.is-open span:nth-child(3){top:15px;transform:rotate(-45deg);}

  .ms-mobile-category-nav{
    display:grid;
    grid-template-columns:repeat(var(--ms-mobile-category-count,3),1fr);
    height:42px;
    padding:0 12px;
    background:#fff;
    border-top:1px solid #f1f3f7;
    border-bottom:1px solid #e7ebf1;
  }
  .ms-mobile-category-nav a{
    position:relative;
    display:grid;
    place-items:center;
    color:#667085;
    font-size:13px;
    font-weight:850;
  }
  .ms-mobile-category-nav a.is-active{color:#1769ff;}
  .ms-mobile-category-nav a.is-active::after{
    content:"";
    position:absolute;
    left:30%;
    right:30%;
    bottom:-1px;
    height:3px;
    border-radius:999px 999px 0 0;
    background:#1769ff;
  }

  .ms-mobile-head-menu{
    position:absolute;
    left:0;
    right:0;
    top:100px;
    z-index:72;
    display:block;
    background:rgba(255,255,255,.99);
    border-bottom:1px solid #dfe5ee;
    box-shadow:0 18px 34px rgba(15,23,42,.12);
  }
  .shop-header.no-mobile-categories .ms-mobile-head-menu{top:58px;}
  .ms-mobile-head-menu[hidden]{display:none !important;}
  .ms-mobile-head-menu__inner{
    width:calc(100% - 28px);
    margin:0 auto;
    padding:8px 0 14px;
  }
  .ms-mobile-head-menu__inner>a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    min-height:45px;
    padding:0 7px;
    border-bottom:1px solid #eef2f6;
    color:#334155;
    font-size:13px;
    font-weight:800;
  }
  .ms-mobile-head-menu__inner>a b{color:#94a3b8;font-size:17px;font-weight:500;}
  .ms-mobile-head-menu__phone{
    margin-top:8px;
    padding:0 13px !important;
    border:0 !important;
    border-radius:12px;
    background:#f3f7ff;
    color:#1769ff !important;
  }
  .ms-mobile-head-menu__phone strong{font-size:14px;}
}

@media (max-width:420px){
  .shop-header__inner{width:calc(100% - 16px);gap:3px;}
  .shop-brand__mark{font-size:12px;}
  .shop-brand__name{font-size:13px;}
  .ms-mobile-head-actions{gap:2px;}
  .ms-mobile-head-account,
  .ms-mobile-head-signup,
  .ms-mobile-head-logout{
    height:32px;
    padding:0 4px;
    font-size:8px;
  }
  .ms-mobile-head-phone{
    height:32px;
    padding:0 5px;
    gap:2px;
  }
  .ms-mobile-head-phone span{display:none;}
  .ms-mobile-head-phone strong{font-size:9px;}
  .ms-mobile-head-menu-button{width:32px;height:32px;flex-basis:32px;}
  .ms-mobile-head-menu-button span{left:9px;width:13px;}
  .ms-mobile-category-nav{padding:0 6px;}
  .ms-mobile-category-nav a{font-size:12px;}
}

/* ITGO MOBILE mobile header overrides */
@media(max-width:760px){
  .ms-mobile-head-phone{background:#eef0eb;color:#111814}
  .ms-mobile-head-signup{background:#f3f5ef;color:#111814;border-color:#dde1d8}
  .ms-mobile-category-nav a.is-active{color:var(--itgo-accent,#4f46e5)}
  .ms-mobile-category-nav a.is-active::after{background:var(--itgo-accent,#4f46e5)}
  .ms-mobile-head-menu__phone{background:var(--itgo-soft,#eef2ff);color:var(--itgo-accent,#4f46e5)!important}
}

/* Stable mobile carrier navigation and community links beside the account. */
.ms-mobile-brand-links{display:none}
@media(max-width:980px){
  .shop-header .ms-mobile-brand-links{display:flex;align-items:center;gap:8px;flex:0 0 auto;margin-left:0;margin-right:3px;padding-right:9px;border-right:1px solid #cbd5e1;height:16px}
  .shop-header .ms-mobile-brand-links:empty{display:none}
  .shop-header .ms-mobile-brand-links a{display:flex;align-items:center;min-height:36px;color:#475569;font-size:12px;font-weight:800;white-space:nowrap;text-decoration:none}
  .shop-header .ms-mobile-brand-links a.is-active{color:#1769ff}
  .shop-header .ms-mobile-brand-links a:focus-visible{outline:2px solid #93b7ff;outline-offset:2px;border-radius:4px}
  .shop-header .ms-mobile-category-nav--itgo{box-sizing:border-box;gap:4px!important}
  .shop-header .ms-mobile-category-nav--itgo>a{display:grid;place-items:center;box-sizing:border-box;min-width:46px!important;padding:0 8px!important;font-size:14px!important;line-height:1.3;font-weight:850!important;color:#475569!important}
  .shop-header .ms-mobile-category-nav--itgo>a>b{font-size:inherit}
  .shop-header .ms-mobile-category-nav--itgo>a.is-active{color:#fff!important}
}
@media(max-width:760px){
  .shop-header .shop-header__inner{gap:8px}
  .shop-header .shop-brand{flex:0 1 auto;min-width:0}
  .shop-header .shop-brand__name{overflow:hidden;text-overflow:ellipsis}
  .shop-header .ms-mobile-head-actions{flex:0 0 auto;margin-left:auto}
  .shop-header .ms-mobile-head-account,.shop-header .ms-mobile-head-signup,.shop-header .ms-mobile-head-logout{font-size:11px}
  .shop-header .ms-mobile-head-menu{top:100%}
}
@media(max-width:480px){
  .shop-header .shop-header__inner{gap:6px}
  .shop-header .ms-mobile-brand-links{gap:8px}
  .shop-header .ms-mobile-head-signup,.shop-header .ms-mobile-head-logout{display:none}
  .shop-header .ms-mobile-head-phone{width:auto;padding:0 5px;justify-content:center}
  .shop-header .ms-mobile-head-phone span{display:none}
  .shop-header .ms-mobile-head-phone strong{display:block;font-size:10px;white-space:nowrap}
  .shop-header .shop-brand__logo{max-width:88px;object-fit:contain}
}

@media(max-width:420px){
  .shop-header .ms-mobile-brand-links{gap:6px;padding-right:7px;margin-right:2px}
  .shop-header .ms-mobile-brand-links a{font-size:11px}
}

/* Separate the full community labels as well as the account link. */
@media(max-width:980px){
  .shop-header .ms-mobile-brand-links a+a::before{content:"";display:block;width:1px;height:14px;margin-right:8px;background:#cbd5e1;flex:0 0 1px}
}
@media(max-width:420px){
  .shop-header .ms-mobile-brand-links a+a::before{margin-right:6px}
}
